-
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 #98284
Merged
Merged
Rollup of 5 pull requests #98284
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
Currently fails. ---- [pretty] src/test/pretty/where-clauses.rs stdout ---- error: pretty-printed source does not match expected source expected: ------------------------------------------ // pp-exact fn f<'a, 'b, T>(t: T) -> isize where T: 'a, 'a: 'b, T: Eq { 0 } // This is legal syntax, sometimes generated by macros. `where T: $($bound+)*` fn zero_bounds<'a, T>() where 'a:, T: {} fn main() {} ------------------------------------------ actual: ------------------------------------------ // pp-exact fn f<'a, 'b, T>(t: T) -> isize where T: 'a, 'a: 'b, T: Eq { 0 } // This is legal syntax, sometimes generated by macros. `where T: $($bound+)*` fn zero_bounds<'a, T>() where 'a, T {} fn main() {} ------------------------------------------ diff: ------------------------------------------ 3 fn f<'a, 'b, T>(t: T) -> isize where T: 'a, 'a: 'b, T: Eq { 0 } 4 5 // This is legal syntax, sometimes generated by macros. `where T: $($bound+)*` - fn zero_bounds<'a, T>() where 'a:, T: {} + fn zero_bounds<'a, T>() where 'a, T {} 7 8 fn main() {} 9
Incorrect pluralisation of `crate`
It's a map, not a vector.
Fix pretty printing of empty bound lists in where-clause Repro: ```rust macro_rules! assert_item_stringify { ($item:item $expected:literal) => { assert_eq!(stringify!($item), $expected); }; } fn main() { assert_item_stringify! { fn f<'a, T>() where 'a:, T: {} "fn f<'a, T>() where 'a:, T: {}" } } ``` Previously this assertion would fail because rustc renders the where-clause as `where 'a, T` which is invalid syntax. This PR makes the above assertion pass. This bug also affects `-Zunpretty=expanded`. The intention is for that to emit syntactically valid code, but the buggy output is not valid Rust syntax. ```console $ rustc <(echo "fn f<'a, T>() where 'a:, T: {}") -Zunpretty=expanded #![feature(prelude_import)] #![no_std] #[prelude_import] use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; fn f<'a, T>() where 'a, T {} ``` ```console $ rustc <(echo "fn f<'a, T>() where 'a:, T: {}") -Zunpretty=expanded | rustc - error: expected `:`, found `,` --> <anon>:7:23 | 7 | fn f<'a, T>() where 'a, T {} | ^ expected `:` ```
…-better, r=lcnr Improve `lifetime arguments are not allowed on` error message Actually mention what thing we're improperly trying to add lifetime generics to.
Fix minor documentation typo Fixes incorrect pluralisation of `crate` in documentation for rustc_trait_selection
…cjgillot Minor improvements on error for `Self` type in items that don't allow it Fixes rust-lang#93796
Fix typo in `HashMap::drain` docs It's a map, not a vector. Fixes rust-lang#98275.
@bors r+ p=5 rollup=never |
📌 Commit 66dbc3f has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (4104596): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library 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:
lifetime arguments are not allowed on
error message #98268 (Improvelifetime arguments are not allowed on
error message)Self
type in items that don't allow it #98274 (Minor improvements on error forSelf
type in items that don't allow it)HashMap::drain
docs #98281 (Fix typo inHashMap::drain
docs)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup