-
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
Rollup of 5 pull requests #116848
Closed
Closed
Rollup of 5 pull requests #116848
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
When encountering method call chains of `Iterator`, check for trailing `;` in the body of closures passed into `Iterator::map`, as well as calls to `<T as Clone>::clone` when `T` is a type param and `T: !Clone`. Fix rust-lang#9082.
Also add a few methods to instantiate instances and get an instance definition. We're still missing support to actually monomorphize the instance body.
Using hash set instead of vec to weed out duplicates
Special case iterator chain checks for suggestion When encountering method call chains of `Iterator`, check for trailing `;` in the body of closures passed into `Iterator::map`, as well as calls to `<T as Clone>::clone` when `T` is a type param and `T: !Clone`. Fix rust-lang#9082.
Add MonoItems and Instance to stable_mir Also add a few methods to instantiate instances and get an instance definition. We're still missing support to actually monomorphize the instance body. This is related to rust-lang/project-stable-mir#36 r? `@oli-obk` `@oli-obk` is that what you were thinking? I incorporated `@bjorn3` idea of just adding a Shim instance definition in rust-lang#116465.
…li-obk Implement an internal lint encouraging use of `Span::eq_ctxt` Adds a new Rustc internal lint that forbids use of `.ctxt() == .ctxt()` for spans, encouraging use of `.eq_ctxt()` instead (see rust-lang#49509). Also fixed a few violations of the lint in the Rustc codebase (a fun additional way I could test my code). Edit: MIR opt folks I believe that's why you're CC'ed, just a heads up. Two things I'm not sure about: 1. The way I chose to detect calls to `Span::ctxt`. I know adding diagnostic items to methods is generally discouraged, but after some searching and experimenting I couldn't find anything else that worked, so I went with it. That said, I'm happy to implement something different if there's a better way out there. (For what it's worth, if there is a better way, it might be worth documenting in the rustc-dev-guide, which I'm happy to take care of) 2. The error message for the lint. Ideally it would probably be good to give some context as to why the suggestion is made (e.g. `rustc::default_hash_types` tells the user that it's because of performance), but I don't have that context so I couldn't put it in the error message. Happy to iterate on the error message based on feedback during review. r? `@oli-obk`
…compiler-errors Make `handle_options` public again. r? `@compiler-errors`
… r=petrochenkov Fix duplicate labels emitted in `render_multispan_macro_backtrace()` This PR replaces the `Vec` used to store labels with an `FxIndexSet` in order to eliminate duplicates Fixes rust-lang#116836
@bors r+ rollup=never p=5 |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 17, 2023
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#116717 (Special case iterator chain checks for suggestion) - rust-lang#116719 (Add MonoItems and Instance to stable_mir) - rust-lang#116787 (Implement an internal lint encouraging use of `Span::eq_ctxt`) - rust-lang#116827 (Make `handle_options` public again.) - rust-lang#116838 (Fix duplicate labels emitted in `render_multispan_macro_backtrace()`) r? `@ghost` `@rustbot` modify labels: rollup
💔 Test failed - checks-actions |
The job Click to see the possible cause of the failure (guessed by this bot)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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.
Successful merges:
Span::eq_ctxt
#116787 (Implement an internal lint encouraging use ofSpan::eq_ctxt
)handle_options
public again. #116827 (Makehandle_options
public again.)render_multispan_macro_backtrace()
#116838 (Fix duplicate labels emitted inrender_multispan_macro_backtrace()
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup