-
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 #76456
Closed
Closed
Rollup of 10 pull requests #76456
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
Co-authored-by: Oliver Scherer <github35764891676564198441@oli-obk.de>
Improve contrast of foreground line number.
CDB doesn't care that you're using static_cast between unrelated types. VS(C) does. These should've been reinterpret_cast or C casts. Cast is from e.g. `u8*` to `tuple<$T1, $T2>*`
This is generally a good idea, and will help with being able to build bootstrap without Python over time as it means we can "just" build with cargo +beta build rather than needing the user to set environment variables. This is a minor step, but a necessary one on that road.
…acement, r=matthewjasper Validate built-in attribute placement Closes rust-lang#54584, closes rust-lang#47725, closes rust-lang#54044. I've changed silently ignoring some incorrectly placed attributes to errors. I'm not sure what the policy is since this can theoretically break code (should they be warnings instead? does it warrant a crater run?).
…r=oli-obk Add derive macro for specifying diagnostics using attributes. Introduces `#[derive(SessionDiagnostic)]`, a derive macro for specifying structs that can be converted to Diagnostics using directions given by attributes on the struct and its fields. Currently, the following attributes have been implemented: - `#[code = "..."]` -- this sets the Diagnostic's error code, and must be provided on the struct iself (ie, not on a field). Equivalent to calling `code`. - `#[message = "..."]` -- this sets the Diagnostic's primary error message. - `#[label = "..."]` -- this must be applied to fields of type `Span`, and is equivalent to `span_label` - `#[suggestion(..)]` -- this allows a suggestion message to be supplied. This attribute must be applied to a field of type `Span` or `(Span, Applicability)`, and is equivalent to calling `span_suggestion`. Valid arguments are: - `message = "..."` -- this sets the suggestion message. - (Optional) `code = "..."` -- this suggests code for the suggestion. Defaults to empty. `suggestion`also comes with other variants: `#[suggestion_short(..)]`, `#[suggestion_hidden(..)]` and `#[suggestion_verbose(..)]` which all take the same keys. Within the strings passed to each attribute, fields can be referenced without needing to be passed explicitly into the format string -- eg, `#[error = "{ident} already declared"] ` will set the error message to `format!("{} already declared", &self.ident)`. Any fields on the struct can be referenced in this way. Additionally, for any of these attributes, Option fields can be used to only optionally apply the decoration -- for example: ```rust #[derive(SessionDiagnostic)] #[code = "E0123"] struct SomeKindOfError { ... #[suggestion(message = "informative error message")] opt_sugg: Option<(Span, Applicability)> ... } ``` will not emit a suggestion if `opt_sugg` is `None`. We plan on iterating on this macro further; this PR is a start. Closes rust-lang#61132. r? @oli-obk
Do not promote &mut of a non-ZST ever Since ~pre-1.0~ 1.36, we have accepted code like this: ```rust static mut TEST: &'static mut [i32] = { let x = &mut [1,2,3]; x }; ``` I tracked it back to rust-lang#21744, but unfortunately could not find any discussion or RFC that would explain why we thought this was a good idea. And it's not, it breaks all sorts of things -- see rust-lang#75556. To fix rust-lang#75556, we have to stop promoting non-ZST mutable references no matter the context, which is what this PR does. It's a breaking change. Notice that this still works, since it does not rely on promotion: ```rust static mut TEST: &'static mut [i32] = &mut [0,1,2]; ``` Cc @rust-lang/wg-const-eval
Improve ayu doc source line number contrast Improve contrast of foreground line number. Before ![image](https://user-images.githubusercontent.com/4687791/92305696-1bf2ab80-efbc-11ea-8b5c-a24c4f6261e0.png) After ![image](https://user-images.githubusercontent.com/4687791/92305700-2a40c780-efbc-11ea-9061-dbfcb1e71980.png) r? @Cldfire I think we should add the line for light and dark theme too, it looks better and clearer that way.
…crum rustbuild: Remove `Mode::Codegen` It's no longer used.
…, r=petrochenkov Fix HashMap visualizers in Visual Studio (Code) CDB (as used in unit tests) doesn't care that we're using static_cast between unrelated types (`u8*` to `tuple<$T1, $T2>*`). Visual Studio & Visual Studio Code care. These should've been reinterpret_cast or C casts. Credit to @petrochenkov per rust-lang#76352 for helping catch this. ### Testing ```cmd x.py test --stage 1 src/tools/tidy x.py test --stage 1 --build x86_64-pc-windows-msvc src\test\debuginfo ```
…mplate, r=jonas-schievink Fix typo in tracking issue template
Update linker-plugin-lto.md to contain up to rust 1.46 Hi, this is the same as rust-lang#72290, if anyone has suggestions on how to automate this please say :) otherwise, you can check the versions I've added via: ```sh $ rustup install 1.44.0 $ rustc +1.44.0 -Vv rustc 1.44.0 (49cae55 2020-06-01) binary: rustc commit-hash: 49cae55 commit-date: 2020-06-01 host: x86_64-unknown-linux-gnu release: 1.44.0 LLVM version: 9.0 $ rustup install 1.45.0 $ rustc +1.45.0 -Vv rustc 1.45.0 (5c1f21c 2020-07-13) binary: rustc commit-hash: 5c1f21c commit-date: 2020-07-13 host: x86_64-unknown-linux-gnu release: 1.45.0 LLVM version: 10.0 $ rustup install 1.46.0 $ rustc +stable -Vv rustc 1.46.0 (04488af 2020-08-24) binary: rustc commit-hash: 04488af commit-date: 2020-08-24 host: x86_64-unknown-linux-gnu release: 1.46.0 LLVM version: 10.0 ```
Fix documentation for TyCtxt::all_impls `TyCtxt::all_impls` documentation was wrong about the return type.
…=jyn514 Make bootstrap build on beta This is generally a good idea, and will help with being able to build bootstrap without Python over time as it means we can "just" build with cargo +beta build rather than needing the user to set environment variables. This is a minor step, but a necessary one on that road. r? @jyn514
@bors r+ rollup=never p=5 |
📌 Commit 4ab3677 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
Sep 7, 2020
⌛ Testing commit 4ab3677 with merge ab506a2f2cdff04d4b93a15474191484ed60a6f9... |
💔 Test failed - checks-actions |
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Sep 8, 2020
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-review
Status: Awaiting review from the assignee but also interested parties.
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:
Mode::Codegen
#76379 (rustbuild: RemoveMode::Codegen
)Failed merges:
r? @ghost