-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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 #88948
Rollup of 8 pull requests #88948
Commits on Sep 6, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 3caf0bc - Browse repository at this point
Copy the full SHA 3caf0bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for ebf1252 - Browse repository at this point
Copy the full SHA ebf1252View commit details
Commits on Sep 7, 2021
-
Configuration menu - View commit details
-
Copy full SHA for ce35f8e - Browse repository at this point
Copy the full SHA ce35f8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a687de - Browse repository at this point
Copy the full SHA 2a687deView commit details
Commits on Sep 9, 2021
-
Revert "Allow formatting
Anonymous{Struct, Union}
declarations"This reverts commit 64acb7d.
Configuration menu - View commit details
-
Copy full SHA for 2691a39 - Browse repository at this point
Copy the full SHA 2691a39View commit details -
Revert "Add test for pretty printing anonymous types"
This reverts commit d59b1f1.
Configuration menu - View commit details
-
Copy full SHA for 2041fb1 - Browse repository at this point
Copy the full SHA 2041fb1View commit details -
Revert "Fix ast expanded printing for anonymous types"
This reverts commit 5b4bc05.
Configuration menu - View commit details
-
Copy full SHA for 5560f6d - Browse repository at this point
Copy the full SHA 5560f6dView commit details -
Revert "Add test for restriction of anonymous types on validation"
This reverts commit 8a1dd69.
Configuration menu - View commit details
-
Copy full SHA for f38ec9c - Browse repository at this point
Copy the full SHA f38ec9cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b6aa7e3 - Browse repository at this point
Copy the full SHA b6aa7e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 91feb76 - Browse repository at this point
Copy the full SHA 91feb76View commit details -
Configuration menu - View commit details
-
Copy full SHA for f26f1ed - Browse repository at this point
Copy the full SHA f26f1edView commit details -
Configuration menu - View commit details
-
Copy full SHA for 35370a7 - Browse repository at this point
Copy the full SHA 35370a7View commit details
Commits on Sep 11, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 5dab3c5 - Browse repository at this point
Copy the full SHA 5dab3c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for e5c2412 - Browse repository at this point
Copy the full SHA e5c2412View commit details -
Configuration menu - View commit details
-
Copy full SHA for d98892b - Browse repository at this point
Copy the full SHA d98892bView commit details
Commits on Sep 13, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 8be729c - Browse repository at this point
Copy the full SHA 8be729cView commit details -
Highlight the const function if error happened because of a bound on …
…the impl block Currently, for the following code, the compiler produces the errors like the following error: ```rust struct Type<T> impl<T: Clone> Type<T> { fn const f() {} } ``` ```text error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable --> ./test.rs:3:6 | 3 | impl<T: Clone> Type<T> { | ^ | = note: see issue rust-lang#57563 <rust-lang#57563> for more information = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable ``` This can be confusing (especially to newcomers) since the error mentions "const fn parameters", but highlights only the impl. This commits adds function highlighting, changing the error to the following: ```text error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable --> ./test.rs:3:6 | 3 | impl<T: Clone> Type<T> { | ^ 4 | pub const fn f() {} | ---------------- function declared as const here | = note: see issue rust-lang#57563 <rust-lang#57563> for more information = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable ```
Configuration menu - View commit details
-
Copy full SHA for 6ec7255 - Browse repository at this point
Copy the full SHA 6ec7255View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7d8d7a0 - Browse repository at this point
Copy the full SHA 7d8d7a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d879aa - Browse repository at this point
Copy the full SHA 8d879aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c4873c - Browse repository at this point
Copy the full SHA 1c4873cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7965a9f - Browse repository at this point
Copy the full SHA 7965a9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a3b1cf - Browse repository at this point
Copy the full SHA 9a3b1cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1053a5b - Browse repository at this point
Copy the full SHA 1053a5bView commit details
Commits on Sep 14, 2021
-
Remove implementation of
min_align_of
intrinsicSince 88839 `min_align_of` is lowered to AlignOf operator.
Configuration menu - View commit details
-
Copy full SHA for f9b8191 - Browse repository at this point
Copy the full SHA f9b8191View commit details -
Rollup merge of rust-lang#87320 - danakj:debug-compilation-dir, r=mic…
…haelwoerister Introduce -Z remap-cwd-prefix switch This switch remaps any absolute paths rooted under the current working directory to a new value. This includes remapping the debug info in `DW_AT_comp_dir` and `DW_AT_decl_file`. Importantly, this flag does not require passing the current working directory to the compiler, such that the command line can be run on any machine (with the same input files) and produce the same results. This is critical property for debugging compiler issues that crop up on remote machines. This is based on adetaylor's rust-lang@dbc4ae7 Major Change Proposal: rust-lang/compiler-team#450 Discussed on rust-lang#38322. Would resolve issue rust-lang#87325.
Configuration menu - View commit details
-
Copy full SHA for 4e63699 - Browse repository at this point
Copy the full SHA 4e63699View commit details -
Rollup merge of rust-lang#88619 - GuillaumeGomez:simplify-std-os-reex…
…ports, r=Amanieu Remove `cfg(doc)` from std::os module reexports to fix rustdoc linking issues Fixes rust-lang#88304. I tested it based on rust-lang#88292. Not sure if it's the best approach, but at least it makes thing a bit simpler. cc ````@jyn514````
Configuration menu - View commit details
-
Copy full SHA for 3cd22f9 - Browse repository at this point
Copy the full SHA 3cd22f9View commit details -
Rollup merge of rust-lang#88690 - m-ou-se:macro-braces-dot-question-e…
…xpr-parse, r=nagisa Accept `m!{ .. }.method()` and `m!{ .. }?` statements. This PR fixes something that I keep running into when using `quote!{}.into()` in a proc macro to convert the `proc_macro2::TokenStream` to a `proc_macro::TokenStream`: Before: ``` error: expected expression, found `.` --> src/lib.rs:6:6 | 4 | quote! { 5 | ... 6 | }.into() | ^ expected expression ``` After: ``` ``` (No output, compiles fine.) --- Context: For expressions like `{ 1 }` and `if true { 1 } else { 2 }`, we accept them as full statements without a trailing `;`, which means the following is not accepted: ```rust { 1 } - 1 // error ``` since that is parsed as two statements: `{ 1 }` and `-1`. Syntactically correct, but the type of `{ 1 }` should be `()` as there is no `;`. However, for specifically `.` and `?` after the `}`, we do [continue parsing it as an expression](https://github.com/rust-lang/rust/blob/13db8440bbbe42870bc828d4ec3e965b38670277/compiler/rustc_parse/src/parser/expr.rs#L864-L876): ```rust { "abc" }.len(); // ok ``` For braced macro invocations, we do not do this: ```rust vec![1, 2, 3].len(); // ok vec!{1, 2, 3}.len(); // error ``` (It parses `vec!{1, 2, 3}` as a full statement, and then complains about `.len()` not being a valid expression.) This PR changes this to also look for a `.` and `?` after a braced macro invocation. We can be sure the macro is an expression and not a full statement in those cases, since no statement can start with a `.` or `?`.
Configuration menu - View commit details
-
Copy full SHA for 5d8ea9b - Browse repository at this point
Copy the full SHA 5d8ea9bView commit details -
Rollup merge of rust-lang#88775 - pnkfelix:revert-anon-union-parsing,…
… r=davidtwco Revert anon union parsing Revert PR rust-lang#84571 and rust-lang#85515, which implemented anonymous union parsing in a manner that broke the context-sensitivity for the `union` keyword and thus broke stable Rust code. Fix rust-lang#88583.
Configuration menu - View commit details
-
Copy full SHA for 75fae88 - Browse repository at this point
Copy the full SHA 75fae88View commit details -
Rollup merge of rust-lang#88841 - notriddle:notriddle/method-parens, …
…r=estebank feat(rustc_typeck): suggest removing bad parens in `(recv.method)()` Fixes rust-lang#88803
Configuration menu - View commit details
-
Copy full SHA for 250cb98 - Browse repository at this point
Copy the full SHA 250cb98View commit details -
Rollup merge of rust-lang#88907 - WaffleLapkin:targeted_const_fn_with…
…_a_bound_in_impl_block_error, r=estebank Highlight the `const fn` if error happened because of a bound on the impl block Currently, for the following code, the compiler produces the errors like the following: ```rust struct Type<T>(T); impl<T: Clone> Type<T> { const fn f() {} } ``` ```text error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable --> ./test.rs:3:6 | 3 | impl<T: Clone> Type<T> { | ^ | = note: see issue rust-lang#57563 <rust-lang#57563> for more information = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable ``` This can be confusing (especially to newcomers) since the error mentions "const fn parameters", but highlights only the impl. This PR adds function highlighting, changing the error to the following: ```text error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable --> ./test.rs:3:6 | 3 | impl<T: Clone> Type<T> { | ^ 4 | pub const fn f() {} | ---------------- function declared as const here | = note: see issue rust-lang#57563 <rust-lang#57563> for more information = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable ``` --- I've originally wanted to point directly to `const` token, but couldn't find a way to get it's span. It seems like this span is lost during the AST -> HIR lowering. Also, since the errors for object casts in `const fn`s (`&T` -> `&dyn Trait`) seem to trigger the same error, this PR accidentally changes these errors too. Not sure if it's desired or how to fix this. P.S. it's my first time contributing to diagnostics, so feedback is very appreciated! --- r? `@estebank` `@rustbot` label: +A-diagnostics
Configuration menu - View commit details
-
Copy full SHA for 78d849e - Browse repository at this point
Copy the full SHA 78d849eView commit details -
Rollup merge of rust-lang#88915 - joshlf:patch-4, r=kennytm
`Wrapping<T>` has the same layout and ABI as `T`
Configuration menu - View commit details
-
Copy full SHA for e8741a3 - Browse repository at this point
Copy the full SHA e8741a3View commit details -
Rollup merge of rust-lang#88933 - tmiasko:remove-min-align-of, r=oli-obk
Remove implementation of `min_align_of` intrinsic Since rust-lang#88839 `min_align_of` is lowered to AlignOf operator.
Configuration menu - View commit details
-
Copy full SHA for 5050a2f - Browse repository at this point
Copy the full SHA 5050a2fView commit details