-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 10 pull requests #93491
Rollup of 10 pull requests #93491
Commits on Nov 7, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 521b1ee - Browse repository at this point
Copy the full SHA 521b1eeView commit details
Commits on Jan 15, 2022
-
Configuration menu - View commit details
-
Copy full SHA for d671948 - Browse repository at this point
Copy the full SHA d671948View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f609b7 - Browse repository at this point
Copy the full SHA 3f609b7View commit details
Commits on Jan 21, 2022
-
Compute indent never relative to current column
Previously the pretty printer would compute indentation always relative to whatever column a block begins at, like this: fn demo(arg1: usize, arg2: usize); This is never the thing to do in the dominant contemporary Rust style. Rustfmt's default and the style used by the vast majority of Rust codebases is block indentation: fn demo( arg1: usize, arg2: usize, ); where every indentation level is a multiple of 4 spaces and each level is indented relative to the indentation of the previous line, not the position that the block starts in.
Configuration menu - View commit details
-
Copy full SHA for 104961e - Browse repository at this point
Copy the full SHA 104961eView commit details -
Fix some double indents on exprs containing blocks
The `print_expr` method already places an `ibox(INDENT_UNIT)` around every expr that gets printed. Some exprs were then using `self.head` inside of that, which does its own `cbox(INDENT_UNIT)`, resulting in two levels of indentation: while true { stuff; } This commit fixes those cases to produce the expected single level of indentation within every expression containing a block. while true { stuff; }
Configuration menu - View commit details
-
Copy full SHA for 956f1ca - Browse repository at this point
Copy the full SHA 956f1caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 03e4001 - Browse repository at this point
Copy the full SHA 03e4001View commit details -
Configuration menu - View commit details
-
Copy full SHA for 269b5a4 - Browse repository at this point
Copy the full SHA 269b5a4View commit details
Commits on Jan 26, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ecd06e1 - Browse repository at this point
Copy the full SHA ecd06e1View commit details -
Make char::DecodeUtf16::size_hist more precise
New implementation takes into account contents of `self.buf` and rounds lower bound up instead of down.
Configuration menu - View commit details
-
Copy full SHA for cd4245d - Browse repository at this point
Copy the full SHA cd4245dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c8cd1f - Browse repository at this point
Copy the full SHA 9c8cd1fView commit details
Commits on Jan 28, 2022
-
Fix wrong assumption in
DecodeUtf16::size_hint
`self.buf` can contain a surrogate, but only a leading one.
Configuration menu - View commit details
-
Copy full SHA for 2c97d10 - Browse repository at this point
Copy the full SHA 2c97d10View commit details
Commits on Jan 29, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 0189a21 - Browse repository at this point
Copy the full SHA 0189a21View commit details
Commits on Jan 30, 2022
-
unix: Use metadata for
DirEntry::file_type
fallbackWhen `DirEntry::file_type` fails to match a known `d_type`, we should fall back to `DirEntry::metadata` instead of a bare `lstat`, because this is faster and more reliable on targets with `fstatat`.
Configuration menu - View commit details
-
Copy full SHA for d70b9c0 - Browse repository at this point
Copy the full SHA d70b9c0View commit details -
Fix an edge case in
chat::DecodeUtf16::size_hint
There are cases, when data in the buf might or might not be an error.
Configuration menu - View commit details
-
Copy full SHA for 17cd2cd - Browse repository at this point
Copy the full SHA 17cd2cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for cde240c - Browse repository at this point
Copy the full SHA cde240cView commit details -
review the total_cmp documentation
The documentation has been restructured to split out a brief summary paragraph out from the following elaborating paragraphs. I also attempted my hand at wording improvements and adding articles where I felt them missing, but being non-native english speaker these may need more thorough review.
Configuration menu - View commit details
-
Copy full SHA for 78efb07 - Browse repository at this point
Copy the full SHA 78efb07View commit details -
Rollup merge of rust-lang#90277 - pierwill:fix-70258-inference-terms,…
… r=jackh726 Improve terminology around "after typeck" Closes rust-lang#70258.
Configuration menu - View commit details
-
Copy full SHA for 99fd534 - Browse repository at this point
Copy the full SHA 99fd534View commit details -
Rollup merge of rust-lang#91607 - FabianWolff:issue-91560-const-span,…
… r=jackh726 Make `span_extend_to_prev_str()` more robust Fixes rust-lang#91560. The logic in `span_extend_to_prev_str()` is currently quite brittle and fails if there is extra whitespace or something else in between, and it also should return an `Option` but doesn't currently.
Configuration menu - View commit details
-
Copy full SHA for 1b22492 - Browse repository at this point
Copy the full SHA 1b22492View commit details -
Rollup merge of rust-lang#92918 - compiler-errors:gat-expr-lifetime-e…
…lision, r=jackh726 Allow eliding GATs in expression position Thoughts on whether this is worthwhile? Fixes rust-lang#92836 r? `@jackh726`
Configuration menu - View commit details
-
Copy full SHA for ef64c52 - Browse repository at this point
Copy the full SHA ef64c52View commit details -
Rollup merge of rust-lang#93039 - terrarier2111:fix-field-help, r=nagisa
Don't suggest inaccessible fields Fixes: rust-lang#92999
Configuration menu - View commit details
-
Copy full SHA for 781ed1e - Browse repository at this point
Copy the full SHA 781ed1eView commit details -
Rollup merge of rust-lang#93155 - dtolnay:blockindent, r=nagisa
Switch pretty printer to block-based indentation This PR backports dtolnay/prettyplease@401d60c from the `prettyplease` crate into `rustc_ast_pretty`. A before and after: ```diff - let res = - ((::alloc::fmt::format as - for<'r> fn(Arguments<'r>) -> String {format})(((::core::fmt::Arguments::new_v1 - as - fn(&[&'static str], &[ArgumentV1]) -> Arguments {Arguments::new_v1})((&([("test" - as - &str)] - as - [&str; 1]) - as - &[&str; 1]), - (&([] - as - [ArgumentV1; 0]) - as - &[ArgumentV1; 0])) - as - Arguments)) - as String); + let res = + ((::alloc::fmt::format as + for<'r> fn(Arguments<'r>) -> String {format})(((::core::fmt::Arguments::new_v1 + as + fn(&[&'static str], &[ArgumentV1]) -> Arguments {Arguments::new_v1})((&([("test" + as &str)] as [&str; 1]) as + &[&str; 1]), + (&([] as [ArgumentV1; 0]) as &[ArgumentV1; 0])) as + Arguments)) as String); ``` Previously the pretty printer would compute indentation always relative to whatever column a block begins at, like this: ```rust fn demo(arg1: usize, arg2: usize); ``` This is never the thing to do in the dominant contemporary Rust style. Rustfmt's default and the style used by the vast majority of Rust codebases is block indentation: ```rust fn demo( arg1: usize, arg2: usize, ); ``` where every indentation level is a multiple of 4 spaces and each level is indented relative to the indentation of the previous line, not the position that the block starts in. By itself this PR doesn't get perfect formatting in all cases, but it is the smallest possible step in clearly the right direction. More backports from `prettyplease` to tune the ibox/cbox indent levels around various AST node types are upcoming.
Configuration menu - View commit details
-
Copy full SHA for b3f609b - Browse repository at this point
Copy the full SHA b3f609bView commit details -
Rollup merge of rust-lang#93347 - WaffleLapkin:better_char_decode_utf…
…16_size_hint, r=dtolnay Make `char::DecodeUtf16::size_hist` more precise New implementation takes into account contents of `self.buf` and rounds lower bound up instead of down. Fixes rust-lang#88762 Revival of rust-lang#88763
Configuration menu - View commit details
-
Copy full SHA for b984ac0 - Browse repository at this point
Copy the full SHA b984ac0View commit details -
Rollup merge of rust-lang#93403 - nagisa:total-cmp-review, r=joshtrip…
…lett review the total_cmp documentation The documentation has been restructured to split out a brief summary paragraph out from the following elaborating paragraphs. I also attempted my hand at wording improvements and adding articles where I felt them missing, but being non-native english speaker these may need more thorough review. cc rust-lang#72599
Configuration menu - View commit details
-
Copy full SHA for 02b5ff3 - Browse repository at this point
Copy the full SHA 02b5ff3View commit details -
Rollup merge of rust-lang#93462 - ChrisDenton:systime-doc, r=joshtrip…
…lett Document `SystemTime` platform precision Fixes rust-lang#88822
Configuration menu - View commit details
-
Copy full SHA for ed50b23 - Browse repository at this point
Copy the full SHA ed50b23View commit details -
Rollup merge of rust-lang#93471 - cuviper:direntry-file_type-stat, r=…
…the8472 unix: Use metadata for `DirEntry::file_type` fallback When `DirEntry::file_type` fails to match a known `d_type`, we should fall back to `DirEntry::metadata` instead of a bare `lstat`, because this is faster and more reliable on targets with `fstatat`.
Configuration menu - View commit details
-
Copy full SHA for 6007644 - Browse repository at this point
Copy the full SHA 6007644View commit details -
Rollup merge of rust-lang#93485 - est31:remove_curly, r=joshtriplett
core: Remove some redundant {}s from the sorting code
Configuration menu - View commit details
-
Copy full SHA for 060bfcf - Browse repository at this point
Copy the full SHA 060bfcfView commit details