-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rollup of 8 pull requests #42032
Closed
Closed
Rollup of 8 pull requests #42032
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit extends the current unused macro linter to support directives like #[allow(unused_macros)] or #[deny(unused_macros)] directly next to the macro definition, or in one of the modules the macro is inside. Before, we only supported such directives at a per crate level, due to the crate's NodeId being passed to session.add_lint. We also had to implement handling of the macro's NodeId in the lint visitor.
Part of rust-lang#29378 . - In particular explains *why* we would use the builder instead of the free function. - Changes the parent-child explanation for a spawned-caller. - Add link to `io::Result` in `thread::Builder` - Corrects the `thread::Builder::spawn` documentation.
Make diagnostic note for existing method with unsatisfied trait bounds multiline for cleaner output. ``` = note: the method `count` exists but the following trait bounds were not satisfied: `[closure@../../src/test/compile-fail/issue-36053-2.rs:17:39: 17:53] : std::ops::FnMut<(&_,)>` `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>> [closure@../../src/test/compile-fail/issue-36053-2.rs:17:39: 17:53]> : std::iter::Iterator` Before: ``` = note: the method `count` exists but the following trait bounds were not satisfied: `[closure@../../src/test/compile-fail/issue-36053-2.rs:17:39: 17:53] : std::ops::FnMut<(&_,)>`, `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@../../src/test/compile-fail/issue-36053-2.rs:17:39: 17:53]> : std::iter::Iterator` ```
…r=arielb1 Make unsatisfied trait bounds note multiline Make diagnostic note for existing method with unsatisfied trait bounds multiline for cleaner output. ``` = note: the method `count` exists but the following trait bounds were not satisfied: `[closure@../../src/test/compile-fail/issue-36053-2.rs:17:39: 17:53] : std::ops::FnMut<(&_,)>` `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>> [closure@../../src/test/compile-fail/issue-36053-2.rs:17:39: 17:53]> : std::iter::Iterator` ``` Before: ``` = note: the method `count` exists but the following trait bounds were not satisfied: `[closure@../../src/test/compile-fail/issue-36053-2.rs:17:39: 17:53] : std::ops::FnMut<(&_,)>`, `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@../../src/test/compile-fail/issue-36053-2.rs:17:39: 17:53]> : std::iter::Iterator` ```
Add lint for unused macros Addresses parts of rust-lang#34938, to add a lint for unused macros. We now output warnings by default when we encounter a macro that we didn't use for expansion. Issues to be resolved before this PR is ready for merge: - [x] fix the NodeId issue described above - [x] remove all unused macros from rustc and the libraries or set `#[allow(unused_macros)]` next to them if they should be kept for some reason. This is needed for successful boostrap and bors to accept the PR. -> rust-lang#41934 - [x] ~~implement the full extent of rust-lang#34938, that means the macro match arm checking as well.~~ *let's not do this for now*
Rewrite make-win-dist.py in Rust Fixes rust-lang#41568
…umeGomez [Doc] Explain why `thread::yield_now` could be used. Part of rust-lang#29378. r? @steveklabnik
…eGomez [Doc] Implrove `thread::Builder`'s doc. Part of rust-lang#29378 . - Explains *why* we would use the builder instead ofthe free function. - Changes the parent-child explanation for a spawned-caller in `thread::Builder::spawn` - Adds a link to `io::Result` in `thread::Builder` - Corrects the return type doc in `thread::Builder::spawn` r? @rust-lang/docs
[Doc] Add links to the `thread::LocalKey` doc. Part of rust-lang#29378 . I do not know exactly what should be done for the `cleanup` part, if you have any idea I'll gladly do it. r? @rust-lang/docs
…umeGomez rustdoc: Display `extern "C" fn` instead of `extern fn` It was decided in rust-lang/style-team#52 to be explicit about the ABI so rustdoc should follow suit.
Fix regression in `macro_rules!` name matching Fixes rust-lang#41803. r? @nrc
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
@bors r+ p=10 |
📌 Commit 747f7d2 has been approved by |
⌛ Testing commit 747f7d2 with merge be3a003... |
💔 Test failed - status-appveyor |
seems like some sscache error? |
Hmm... No, I think that's a dist failure... probably related to #41932. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
thread::yield_now
could be used. #41982, [Doc] Implrovethread::Builder
's doc. #41994, [Doc] Add links to thethread::LocalKey
doc. #41995, rustdoc: Displayextern "C" fn
instead ofextern fn
#42001, Fix regression inmacro_rules!
name matching #42005