Skip to content
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

rustc doesn't allow -W/--warn more than once #11458

Closed
lucy opened this issue Jan 10, 2014 · 5 comments · Fixed by #11574
Closed

rustc doesn't allow -W/--warn more than once #11458

lucy opened this issue Jan 10, 2014 · 5 comments · Fixed by #11574

Comments

@lucy
Copy link
Contributor

lucy commented Jan 10, 2014

~ > rustc --warn unnecessary-qualification --warn non-camel-case-types hi.rs
error: Option 'warn' given more than once.
task 'rustc' failed at 'explicit failure', /build/rust-git/src/rust/src/librustc/driver/driver.rs:1120
task '<main>' failed at 'explicit failure', /build/rust-git/src/rust/src/librustc/lib.rs:453

-W is supposed to work like -A, -D and -F which can appear multiple times.

@sanxiyn
Copy link
Member

sanxiyn commented Jan 14, 2014

I believe this was broken in #6719. Tagging @kud1ing and @bstrie.

@kud1ing
Copy link

kud1ing commented Jan 14, 2014

The change was meant to improve usability, since there was no hint that "-W help" exists.
It should be reverted then.

@thestinger
Copy link
Contributor

If passing it more than once becomes possible, the ability to pass comma-separated warnings should probably be removed. It's strange to have that for lints but not for -Z.

@lucy
Copy link
Contributor Author

lucy commented Jan 14, 2014

@thestinger How do you pass comma separated warnings?

~ > rustc -W unnecessary-qualification,non-camel-case-types main.rs                                                                                          ↲
error: unknown warn flag: unnecessary_qualification,non_camel_case_types

@thestinger
Copy link
Contributor

@neeee: Ah, it was removed...

bors added a commit that referenced this issue Jan 16, 2014
@bors bors closed this as completed in 3b32ea8 Jan 16, 2014
flip1995 pushed a commit to flip1995/rust that referenced this issue Sep 25, 2023
fix cast_lossless with macro call

changelog: fix [`cast_lossless`] in the case when the cast operand is a macro call

fix rust-lang#11458
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

Successfully merging a pull request may close this issue.

4 participants