-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 9 pull requests #118881
Rollup of 9 pull requests #118881
Commits on Nov 15, 2023
-
Clarify how to choose a FutureIncompatibilityReason variant.
There has been some confusion about how to choose these variants, or what the procedure is for handling future-incompatible errors. Hopefully this helps provide some more information on how these work.
Configuration menu - View commit details
-
Copy full SHA for 7a812c1 - Browse repository at this point
Copy the full SHA 7a812c1View commit details
Commits on Nov 20, 2023
-
On borrow return type, suggest borrowing from arg or owned return type
When we encounter a function with a return type that has an anonymous lifetime with no argument to borrow from, besides suggesting the `'static` lifetime we now also suggest changing the arguments to be borrows or changing the return type to be an owned type. ``` error[E0106]: missing lifetime specifier --> $DIR/variadic-ffi-6.rs:7:6 | LL | ) -> &usize { | ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` | LL | ) -> &'static usize { | +++++++ help: instead, you are more likely to want to change one of the arguments to be borrowed... | LL | x: &usize, | + help: ...or alternatively, to want to return an owned value | LL - ) -> &usize { LL + ) -> usize { | ``` Fix rust-lang#85843.
Configuration menu - View commit details
-
Copy full SHA for b7a23bc - Browse repository at this point
Copy the full SHA b7a23bcView commit details -
Account for impl Trait in lifetime suggestion
When encountering ```rust fn g(mut x: impl Iterator<Item = &()>) -> Option<&()> { /* */ } ``` Suggest ```rust fn g<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'a ()> { /* */ } ```
Configuration menu - View commit details
-
Copy full SHA for 5fce361 - Browse repository at this point
Copy the full SHA 5fce361View commit details -
Configuration menu - View commit details
-
Copy full SHA for d30252e - Browse repository at this point
Copy the full SHA d30252eView commit details -
Configuration menu - View commit details
-
Copy full SHA for dec7f00 - Browse repository at this point
Copy the full SHA dec7f00View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a92d82 - Browse repository at this point
Copy the full SHA 2a92d82View commit details -
Configuration menu - View commit details
-
Copy full SHA for 85f26ad - Browse repository at this point
Copy the full SHA 85f26adView commit details -
Configuration menu - View commit details
-
Copy full SHA for bb9d720 - Browse repository at this point
Copy the full SHA bb9d720View commit details -
Configuration menu - View commit details
-
Copy full SHA for 02bea16 - Browse repository at this point
Copy the full SHA 02bea16View commit details -
Configuration menu - View commit details
-
Copy full SHA for eee4cc6 - Browse repository at this point
Copy the full SHA eee4cc6View commit details
Commits on Dec 9, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 69a2bd6 - Browse repository at this point
Copy the full SHA 69a2bd6View commit details
Commits on Dec 12, 2023
-
Improve an error involving attribute values.
Attribute values must be literals. The error you get when that doesn't hold is pretty bad, e.g.: ``` unexpected expression: 1 + 1 ``` You also get the same error if the attribute value is a literal, but an invalid literal, e.g.: ``` unexpected expression: "foo"suffix ``` This commit does two things. - Changes the error message to "attribute value must be a literal", which gives a better idea of what the problem is and how to fix it. It also no longer prints the invalid expression, because the carets below highlight it anyway. - Separates the "not a literal" case from the "invalid literal" case. Which means invalid literals now get the specific error at the literal level, rather than at the attribute level.
Configuration menu - View commit details
-
Copy full SHA for 226edf6 - Browse repository at this point
Copy the full SHA 226edf6View commit details -
rustdoc-search: clean up parser
The `c === "="` was redundant when `isSeparatorCharacter` already checks that. The function `isStopCharacter` and `isEndCharacter` functions did exactly the same thing and have synonymous names. There doesn't seem much point in having both.
Configuration menu - View commit details
-
Copy full SHA for 4f80833 - Browse repository at this point
Copy the full SHA 4f80833View commit details -
rustc_codegen_llvm: Enforce
rustc::potential_query_instability
lintStop allowing `rustc::potential_query_instability` on all of `rustc_codegen_llvm` and instead allow it on a case-by-case basis. In this case, both instances are safe to allow.
Configuration menu - View commit details
-
Copy full SHA for f44ccba - Browse repository at this point
Copy the full SHA f44ccbaView commit details -
llvm-wrapper: adapt for LLVM API change
LLVM commit llvm/llvm-project@f09cf34 moved some functions to a different header: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/24416#018c5de6-b9c9-4b22-9473-6070d99dcfa7/233-537
Configuration menu - View commit details
-
Copy full SHA for 46a8015 - Browse repository at this point
Copy the full SHA 46a8015View commit details -
Configuration menu - View commit details
-
Copy full SHA for e274372 - Browse repository at this point
Copy the full SHA e274372View commit details -
Configuration menu - View commit details
-
Copy full SHA for 19e0c98 - Browse repository at this point
Copy the full SHA 19e0c98View commit details -
tests: CGU tests require build-pass, not check-pass (remove FIXME)
CGU tests require CGU code to be exercised. We can't merely do "cargo check" on these tests.
Configuration menu - View commit details
-
Copy full SHA for 41c9404 - Browse repository at this point
Copy the full SHA 41c9404View commit details -
Rollup merge of rust-lang#116740 - lenko-d:const_evaluatable_failed_f…
…or_non_unevaluated_const, r=BoxyUwU dont ICE when ConstKind::Expr for is_const_evaluatable The problem is that we are not handling ConstKind::Expr inside report_not_const_evaluatable_error Fixes [rust-lang#114151]
Configuration menu - View commit details
-
Copy full SHA for b2a0175 - Browse repository at this point
Copy the full SHA b2a0175View commit details -
Rollup merge of rust-lang#117914 - estebank:issue-85843, r=wesleywiser
On borrow return type, suggest borrowing from arg or owned return type When we encounter a function with a return type that has an anonymous lifetime with no argument to borrow from, besides suggesting the `'static` lifetime we now also suggest changing the arguments to be borrows or changing the return type to be an owned type. ``` error[E0106]: missing lifetime specifier --> $DIR/variadic-ffi-6.rs:7:6 | LL | ) -> &usize { | ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` | LL | ) -> &'static usize { | +++++++ help: instead, you are more likely to want to change one of the arguments to be borrowed... | LL | x: &usize, | + help: ...or alternatively, to want to return an owned value | LL - ) -> &usize { LL + ) -> usize { | ``` Fix rust-lang#85843.
Configuration menu - View commit details
-
Copy full SHA for ffdb471 - Browse repository at this point
Copy the full SHA ffdb471View commit details -
Rollup merge of rust-lang#117927 - ehuss:future-incompat-docs, r=wesl…
…eywiser Clarify how to choose a FutureIncompatibilityReason variant. There has been some confusion about how to choose these variants, or what the procedure is for handling future-incompatible errors. Hopefully this helps provide some more information on how these work.
Configuration menu - View commit details
-
Copy full SHA for 111c40e - Browse repository at this point
Copy the full SHA 111c40eView commit details -
Rollup merge of rust-lang#118855 - nnethercote:improve-attribute-valu…
…e-error, r=compiler-errors,petrochenkov Improve an error involving attribute values. Attribute values must be literals. The error you get when that doesn't hold is pretty bad, e.g.: ``` unexpected expression: 1 + 1 ``` You also get the same error if the attribute value is a literal, but an invalid literal, e.g.: ``` unexpected expression: "foo"suffix ``` This commit does two things. - Changes the error message to "attribute value must be a literal", which gives a better idea of what the problem is and how to fix it. It also no longer prints the invalid expression, because the carets below highlight it anyway. - Separates the "not a literal" case from the "invalid literal" case. Which means invalid literals now get the specific error at the literal level, rather than at the attribute level. r? `@compiler-errors`
Configuration menu - View commit details
-
Copy full SHA for cd7809b - Browse repository at this point
Copy the full SHA cd7809bView commit details -
Rollup merge of rust-lang#118856 - notriddle:notriddle/search-js, r=G…
…uillaumeGomez rustdoc-search: clean up parser The `c === "="` was redundant when `isSeparatorCharacter` already checks that. The function `isStopCharacter` and `isEndCharacter` functions did exactly the same thing and have synonymous names. There doesn't seem much point in having both.
Configuration menu - View commit details
-
Copy full SHA for 6459121 - Browse repository at this point
Copy the full SHA 6459121View commit details -
Rollup merge of rust-lang#118865 - Enselic:rustc_codegen_llvm-lint-fi…
…x, r=petrochenkov rustc_codegen_llvm: Enforce `rustc::potential_query_instability` lint Stop allowing `rustc::potential_query_instability` on all of `rustc_codegen_llvm` and instead allow it on a case-by-case basis if it is safe to do so. In this case, all 2 instances are safe to allow. Part of rust-lang#84447 which is E-help-wanted.
Configuration menu - View commit details
-
Copy full SHA for 04c77a5 - Browse repository at this point
Copy the full SHA 04c77a5View commit details -
Rollup merge of rust-lang#118866 - krasimirgg:llvm-18-ref, r=durin42
llvm-wrapper: adapt for LLVM API change LLVM commit llvm/llvm-project@f09cf34 (old) moved some functions to a different header. It looks we were getting it transitively in PassWrapper, and something in LLVM recently removed it from the set of transitively available headers, so include it directly: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/24416#018c5de6-b9c9-4b22-9473-6070d99dcfa7/233-537 r? `@nikic`
Configuration menu - View commit details
-
Copy full SHA for 9ed12f8 - Browse repository at this point
Copy the full SHA 9ed12f8View commit details -
Rollup merge of rust-lang#118868 - Nadrieril:correctly-gate-never_pat…
…terns-parsing, r=petrochenkov Correctly gate the parsing of match arms without body rust-lang#118527 accidentally allowed the following to parse on stable: ```rust match Some(0) { None => { foo(); } #[cfg(FALSE)] Some(_) } ``` This fixes that oversight. The way I choose which error to emit is the best I could think of, I'm open if you know a better way. r? `@petrochenkov` since you're the one who noticed
Configuration menu - View commit details
-
Copy full SHA for d661974 - Browse repository at this point
Copy the full SHA d661974View commit details -
Rollup merge of rust-lang#118877 - Enselic:remove-cgu-fixme, r=Nilstrieb
tests: CGU tests require build-pass, not check-pass (remove FIXME) CGU tests require CGU code to be exercised. We can't merely do "cargo check" on these tests. Part of rust-lang#62277
Configuration menu - View commit details
-
Copy full SHA for 010f301 - Browse repository at this point
Copy the full SHA 010f301View commit details