-
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 10 pull requests #83146
Closed
Closed
Rollup of 10 pull requests #83146
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
…o actual changes in behaviour This makes `type_alias_impl_trait` not actually do anything anymore
This change makes it easier to follow the control flow. I also moved the end-of-line comments attached to some symbols to before the symbol listing. This allows rustfmt to format the code; otherwise no formatting occurs (see rust-lang/rustfmt#4750).
E.g., `#[doc(123)]`.
"crate level attribute" -> "crate-level attribute"
It seems there are two copies of it: one in `src/test/ui/attributes/` and one in `src/test/rustdoc-ui/`. I'm guessing this is to test that the lint is emitted both when you run the compiler and when you run rustdoc.
Found while investigating rust-lang#82933 - all LocalDefIds are expected to have HirIds, there's no point in pretending otherwise.
Merges `if-let` and `if x.is_some() { ... }` blocks
- Tweak lint message - Display multi-segment paths correctly
Fixes rust-lang#83112 The location information for a dummy span isn't real, so don't encode it. This brings the incr comp cache code into line with the Span `StableHash` impl, which doesn't hash the location information for dummy spans. Previously, we would attempt to load the 'original' file from a dummy span - if the file id changed (e.g. due to being moved on disk), we would get an ICE, since the Span was still valid due to its hash being unchanged.
Now that future-incompat-report support has landed in nightly Cargo, we can start to make progress towards removing the various proc-macro back-compat hacks that have accumulated in the compiler. This PR introduces a new lint `proc_macro_back_compat`, which results in a future-incompat-report entry being generated. All proc-macro back-compat warnings will be grouped under this lint. Note that this lint will never actually become a hard error - instead, we will remove the special cases for various macros, which will cause older versions of those crates to emit some other error. I've added code to fire this lint for the `time-macros-impl` case. This is the easiest case out of all of our current back-compat hacks - the crate was renamed to `time-macros`, so seeing a filename with `time-macros-impl` guarantees that an older version of the parent `time` crate is in use. When Cargo's future-incompat-report feature gets stabilized, affected users will start to see future-incompat warnings when they build their crates.
This detects all Java literal types and all single word C data types, and suggests the corresponding Rust literal type.
Add a `min_type_alias_impl_trait` feature gate This new feature gate only permits type alias impl trait to be constrained by function and trait method return types. All other possible constraining sites like const/static types, closure return types and binding types are now forbidden and gated under the `type_alias_impl_trait` and `impl_trait_in_bindings` feature gates (which are both marked as incomplete, as they have various ways to ICE the compiler or cause query cycles where they shouldn't). r? ``@nikomatsakis`` This is best reviewed commit-by-commit
… r=varkor Custom error on literal names from other languages This detects all Java literal types and all single word C data types, and suggests the corresponding Rust literal type.
…ange, r=davidtwco Validate rustc_layout_scalar_valid_range_{start,end} attributes Fixes rust-lang#82251, fixes rust-lang#82981.
…dtwco Find more invalid doc attributes - Lint on `#[doc(123)]`, `#[doc("hello")]`, etc. - Lint every attribute; e.g., will now report two warnings for `#[doc(foo, bar)]` - Add hyphen to "crate level" - Display paths like `#[doc(foo::bar)]` correctly instead of as an empty string
Remove unused `opt_local_def_id_to_hir_id` function Found while investigating rust-lang#82933 - all LocalDefIds are expected to have HirIds, there's no point in pretending otherwise.
Fix typos in `library/core/src/ptr/mod.rs` and `library/std/src/sys_common/thread_local_dtor.rs` adress -> address
…as-schievink Minor refactoring in try_index_step Merges `if-let` and `if x.is_some() { ... }` blocks
…petrochenkov Introduce `proc_macro_back_compat` lint, and emit for `time-macros-impl` Now that future-incompat-report support has landed in nightly Cargo, we can start to make progress towards removing the various proc-macro back-compat hacks that have accumulated in the compiler. This PR introduces a new lint `proc_macro_back_compat`, which results in a future-incompat-report entry being generated. All proc-macro back-compat warnings will be grouped under this lint. Note that this lint will never actually become a hard error - instead, we will remove the special cases for various macros, which will cause older versions of those crates to emit some other error. I've added code to fire this lint for the `time-macros-impl` case. This is the easiest case out of all of our current back-compat hacks - the crate was renamed to `time-macros`, so seeing a filename with `time-macros-impl` guarantees that an older version of the parent `time` crate is in use. When Cargo's future-incompat-report feature gets stabilized, affected users will start to see future-incompat warnings when they build their crates.
…stebank Don't encode file information for span with a dummy location Fixes rust-lang#83112 The location information for a dummy span isn't real, so don't encode it. This brings the incr comp cache code into line with the Span `StableHash` impl, which doesn't hash the location information for dummy spans. Previously, we would attempt to load the 'original' file from a dummy span - if the file id changed (e.g. due to being moved on disk), we would get an ICE, since the Span was still valid due to its hash being unchanged.
…=jonas-schievink ⬆️ rust-analyzer
@bors r+ rollup=never p=5 |
📌 Commit 6b865da 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
Mar 15, 2021
⌛ Testing commit 6b865da with merge f11c1b029808850d1bef82d8fe51c09feb3f3ab0... |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 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
Mar 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-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:
min_type_alias_impl_trait
feature gate #82898 (Add amin_type_alias_impl_trait
feature gate)opt_local_def_id_to_hir_id
function #83108 (Remove unusedopt_local_def_id_to_hir_id
function)library/core/src/ptr/mod.rs
andlibrary/std/src/sys_common/thread_local_dtor.rs
#83110 (Fix typos inlibrary/core/src/ptr/mod.rs
andlibrary/std/src/sys_common/thread_local_dtor.rs
)proc_macro_back_compat
lint, and emit fortime-macros-impl
#83127 (Introduceproc_macro_back_compat
lint, and emit fortime-macros-impl
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup