-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 19 pull requests #82153
Rollup of 19 pull requests #82153
Conversation
…repeat expression is a `const fn`
rest in peace match bool <3
Changed 'a an exception' to 'an exception'
- Add a "Safety" section, edit formatting for clarity - Add missing punctuation in code comments
Previously, there two different ways to encode the same info: `None` or `Some(&[])`. Now there is only one way, `&[]`.
Maybe it was used before the introduction of placeholders, but now it has no effect.
Starting from #63468 cfg attributes on variants, fields, fn params etc. are processed together with other attributes (via `configure!`).
Resolves #82117
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
…tput register. On 32-bit ARM platforms, the register `r14` has the alias `lr`. When used as an output register in `asm!`, rustc canonicalizes the name to `r14`. LLVM only knows the register by the name `lr`, and rejects it. This changes rustc's LLVM code generation to output `lr` instead.
…estebank Suggest to create a new `const` item if the `fn` in the array is a `const fn` Fixes #73734. If the `fn` in the array repeat expression is a `const fn`, suggest creating a new `const` item. On nightly, suggest creating an inline `const` block. This PR also removes the `suggest_const_in_array_repeat_expressions` as it is no longer necessary. Example: ```rust fn main() { // Should not compile but hint to create a new const item (stable) or an inline const block (nightly) let strings: [String; 5] = [String::new(); 5]; println!("{:?}", strings); } ``` Gives this error: ``` error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied --> $DIR/const-fn-in-vec.rs:3:32 | 2 | let strings: [String; 5] = [String::new(); 5]; | ^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `String` | = note: the `Copy` trait is required because the repeated element will be copied ``` With this change, this is the error message: ``` error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/const-fn-in-vec.rs:3:32 | LL | let strings: [String; 5] = [String::new(); 5]; | ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String` | = help: moving the function call to a new `const` item will resolve the error ```
…gression_test, r=Mark-Simulacrum Add match pattern diagnostics regression test Closes #72377 by adding a regression test. This test case fails on stable but now works on beta and nightly. It *should* have worked already for years, the crucial point whether it is mentioned that some uncovered patterns are not explicitly mentioned.
Seal the CommandExt, OsStrExt and OsStringExt traits A crater run (#81213 (comment)) has shown that this does not break any existing code. This also unblocks #77728. Based on #81213. r? ````@m-ou-se```` cc ````@lygstate````
const_generics: Dont evaluate array length const when handling errors Fixes #79518 Fixes #78246 cc ````@lcnr```` This was ICE'ing because we dont pass in the correct ``ParamEnv`` which meant that there was no ``Self: Foo`` predicate to make ``Self::Assoc`` well formed which caused an ICE when trying to normalize ``Self::Assoc`` in the mir interpreter r? ````@varkor````
⌛ Testing commit a105280 with merge 14d7777d198af14ccc5b04c81785acc5dcdb8ff9... |
💥 Test timed out |
@bors retry |
⌛ Testing commit a105280 with merge a279f3173db2e15214f3ee1f4e5d21b981b769c0... |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
@bors retry |
☀️ Test successful - checks-actions |
Tested on commit rust-lang/rust@42a4673. Direct link to PR: <rust-lang/rust#82153> 💔 miri on windows: test-pass → test-fail (cc @oli-obk @eddyb @RalfJung). 💔 miri on linux: test-pass → test-fail (cc @oli-obk @eddyb @RalfJung).
Successful merges:
const
item if thefn
in the array is aconst fn
#81503 (Suggest to create a newconst
item if thefn
in the array is aconst fn
)rustc_arena::DropArena
docs #82077 (Editrustc_arena::DropArena
docs)Option
indefault_doc
#82106 (Remove unnecessaryOption
indefault_doc
)lr
instead ofr14
when specified as anasm!
output register. #82141 (32-bit ARM: Emitlr
instead ofr14
when specified as anasm!
output register.)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup