Skip to content

Incorrect unused variable warning #2442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
brson opened this issue May 25, 2012 · 1 comment
Closed

Incorrect unused variable warning #2442

brson opened this issue May 25, 2012 · 1 comment

Comments

@brson
Copy link
Contributor

brson commented May 25, 2012

Running make check-stage2-std shows this warning:

compile_and_link: x86_64-unknown-linux-gnu/test/stdtest.stage2-x86_64-unknown-linux-gnu
/home/brian/dev/rust/src/libstd/rope.rs:1293:16: 1293:19 warning: unused variable: `pos`
/home/brian/dev/rust/src/libstd/rope.rs:1293         let mut pos     = 0u;

but pos is used in the following loop.

@nikomatsakis
Copy link
Contributor

this warning is correct. pos is assigned to but never used.

celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Add a few more options to compiletest which I'm planning to use on our benchmarks. rust-lang#2442 
  - "--report-time": Will report how long it took to run a test. This includes the time taken to process the expected file.
  - "--kani-flag": Allow us to pass extra arguments to all tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants