-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
[rustdoc] Remove duplicated options in doctests compilation flags saved in argument file #129266
[rustdoc] Remove duplicated options in doctests compilation flags saved in argument file #129266
Conversation
I'd rather try to figure out why the duplicates are being added in the first place, if it's a problem. I'd also like to know if there's enough of a problem to justify the risk associated with this change. |
Oh. That's quite a bit misunderstanding on my end. I'll rewrite this PR with a |
But that's still not right, because of this: $ cat > test.rs
pub fn MyFunc() {}
^D
$ rustc --crate-type=lib test.rs
warning: function `MyFunc` should have a snake case name
--> test.rs:1:8
|
1 | pub fn MyFunc() {}
| ^^^^^^ help: convert the identifier to snake case: `my_func`
|
= note: `#[warn(non_snake_case)]` on by default
warning: 1 warning emitted
$ rustc --crate-type=lib -Anonstandard_style test.rs
$ rustc --crate-type=lib -Anonstandard_style -Wnonstandard_style test.rs
warning: function `MyFunc` should have a snake case name
--> test.rs:1:8
|
1 | pub fn MyFunc() {}
| ^^^^^^ help: convert the identifier to snake case: `my_func`
|
= note: `-W non-snake-case` implied by `-W nonstandard-style`
= help: to override `-W nonstandard-style` add `#[allow(non_snake_case)]`
warning: 1 warning emitted
$ rustc --crate-type=lib -Anonstandard_style -Wnonstandard_style -Anonstandard_style test.rs |
I wonder if it isn't only linked to
In comparison for
|
Closing in favor of #129278. |
When I took a look about what was stored in this file recently, I realized that a lot of options were duplicated. Using a set will prevent that. I used a
BTreeSet
to keep the original flags order just in case.r? @notriddle