-
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 20 pull requests #82148
Closed
Closed
Rollup of 20 pull requests #82148
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
…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```
Fix typos in BTreeSet::{first, last} docs map -> set
CTFE validation: catch ReadPointerAsBytes and better error r? `@oli-obk` Fixes #79690 Cc rust-lang/miri#1706
Fixed minor typo in catch_unwind docs Changed "a an exception" to "an exception" inside of the `std::panic::catch_unwind` docs.
const_generics: Fix incorrect ty::ParamEnv::empty() usage Fixes #80561 Not sure if I should keep the `debug!(..)`s or not but its the second time I've needed them so they sure seem useful lol cc `@lcnr` r? `@oli-obk`
Edit `rustc_arena::DropArena` docs - Add a "Safety" section, edit formatting for clarity - Add missing punctuation in code comments
Add tests for Atomic*::fetch_{min,max} This ensures that all atomic operations except for fences are tested. This has been useful to test my work on using atomic instructions for atomic operations in cg_clif instead of a global lock.
Fix a typo This pull request fixes a typo.
Remove unnecessary `Option` in `default_doc` Previously, there were two different ways to encode the same info: `None` or `Some(&[])`. Now there is only one way, `&[]`.
expand: Some cleanup See individual commits for details. r? `@Aaron1011`
Add missing env!-decl variant Resolves #82117
Fix typo in link to CreateSymbolicLinkW documentation.
Stabilize Arguments::as_str Closes #74442
Remove redundant bool_to_option feature gate
Update link for extern prelude. There was some reorganization in the reference as part of rust-lang/reference#937.
32-bit ARM: Emit `lr` instead of `r14` when specified as an `asm!` output 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. closes #82052 r? `@nagisa`
…hievink ⬆️ rust-analyzer
@bors r+ rollup=never p=20 |
📌 Commit 4f47637 has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Feb 15, 2021
@bors r- See #82093 (comment) |
bors
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Feb 15, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
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:
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