-
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 7 pull requests #89417
Merged
Merged
Rollup of 7 pull requests #89417
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
When remapping a resume argument with projections rebase them on top of the new base. The case where resume argument has projections is unusual, but might arise with box syntax where the assignment is performed directly into the box without an intermediate temporary.
Do not suggest importing inaccessible items Fixes rust-lang#88472. For this example: ```rust mod a { struct Foo; } mod b { type Bar = Foo; } ``` rustc currently emits: ``` error[E0412]: cannot find type `Foo` in this scope --> test.rs:6:16 | 6 | type Bar = Foo; | ^^^ not found in this scope | help: consider importing this struct | 6 | use a::Foo; | ``` this is incorrect, as applying this suggestion leads to ``` error[E0603]: struct `Foo` is private --> test.rs:6:12 | 6 | use a::Foo; | ^^^ private struct | note: the struct `Foo` is defined here --> test.rs:2:5 | 2 | struct Foo; | ^^^^^^^^^^^ ``` With my changes, I get: ``` error[E0412]: cannot find type `Foo` in this scope --> test.rs:6:16 | 6 | type Bar = Foo; | ^^^ not found in this scope | = note: this struct exists but is inaccessible: a::Foo ``` As for the wildcard mentioned in rust-lang#88472, I would argue that the warning is actually correct, since the import _is_ unused. I think the real issue is the wrong suggestion, which I have fixed here.
…=davidtwco Detect when negative literal indices are used and suggest appropriate code
Rebase resume argument projections during state transform When remapping a resume argument with projections rebase them on top of the new base. The case where resume argument has projections is unusual, but might arise with box syntax where the assignment is performed directly into the box without an intermediate temporary. Fixes rust-lang#85635.
…eywiser Pick one possible lifetime in case there are multiple choices In case a lifetime variable is created, but doesn't have an obvious lifetime in the list of named lifetimes that it should be inferred to, just pick the first one for the diagnostic. This happens e.g. in ```rust fn foo<'a, 'b>(a: Struct<'a>, b: Struct<'b>) -> impl Trait<'a, 'b> { if bar() { a } else { b } } ``` where we get a lifetime variable that combines the lifetimes of `a` and `b` creating a lifetime that is the intersection of both. Right now the type system cannot express this and thus we get an error, but that error also can't express this. I can also create an entirely new diagnostic that mentions all involved lifetimes, so it would actually mention `'a` and `'b` instead of just `'b`.
Cleanup lower_generics_mut and make span be the bound itself Closes rust-lang#86298 (supersedes those changes) r? `@cjgillot` since you reviewed the other PR (Used wrong branch for rust-lang#89338)
…r=cuviper Update `llvm` submodule to fix function name mangling on x86 Windows Fixes rust-lang#89307
Add regression test for issues rust-lang#88969 and rust-lang#89119 This adds a regression test to complete rust-lang#89125, and thus for issues rust-lang#88969 and rust-lang#89119, which needed a test. Used with multiple crates, [this](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=f665e7e882059157e0f86cfb09c47187) minimized from `zvariant-2.8.0` reproduces the error on `nightly-2021-09-19`. The test in this PR fails on master if the commit 6dbb9d4 from rust-lang#89125 is reverted, and passes otherwise since it's now fixed. r? `@Aaron1011`
@bors r+ p=5 |
📌 Commit 4571fea 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
Oct 1, 2021
☀️ Test successful - checks-actions |
Finished benchmarking commit (69eb996): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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:
llvm
submodule to fix function name mangling on x86 Windows #89397 (Updatellvm
submodule to fix function name mangling on x86 Windows)zvariant
fails to compile on latest nightly: size cannot be statically determined #89119 )Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup