-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[beta] Rollup backports #62065
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
Merged
+674
−209
Merged
[beta] Rollup backports #62065
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6d48e63
Delay ICE in fold_region so feature gate has chance to stop compilati…
pnkfelix fd8b410
Delay ICE in early_free_scope so feature gate has chance to stop comp…
pnkfelix 5fa0883
Regression test for issue #60654.
pnkfelix 2a335ef
Fix cfg(test) build for x86_64-fortanix-unknown-sgx
42c06fe
Handle index out of bound errors during const eval without panic
estebank b7f52da
Hygienize macros in the standard library
petrochenkov 2790cdf
Fix ICE involving mut references
estebank 681d554
review comment
estebank b2f5f0f
bless ui tests
pietroalbini ccfb34f
rustc_typeck: correctly compute `Substs` for `Res::SelfCtor`.
eddyb bb85316
Revert "Set test flag when rustdoc is running with --test option"
ollie27 939f397
Beta backport of: Auto merge of #61754 - nikomatsakis:trait-caching-p…
nikomatsakis 4b3d9d4
Add dummy Azure config
Mark-Simulacrum File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Starter pipeline | ||
# Start with a minimal pipeline that you can customize to build and deploy your code. | ||
# Add steps that build, run tests, deploy, and more: | ||
# https://aka.ms/yaml | ||
|
||
pr: none | ||
trigger: | ||
- auto | ||
|
||
pool: | ||
vmImage: 'Ubuntu 16.04' | ||
|
||
steps: | ||
- script: echo Done | ||
displayName: 'Dummy build' |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
running 1 test | ||
test $DIR/cfg-test.rs - Foo (line 15) ... ok | ||
test $DIR/cfg-test.rs - Foo (line 18) ... ok | ||
|
||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out | ||
|
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
fn main() { | ||
&{[1, 2, 3][4]}; | ||
//~^ ERROR index out of bounds | ||
//~| ERROR reaching this expression at runtime will panic or abort | ||
} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
error: index out of bounds: the len is 3 but the index is 4 | ||
--> $DIR/array-literal-index-oob.rs:2:7 | ||
| | ||
LL | &{[1, 2, 3][4]}; | ||
| ^^^^^^^^^^^^ | ||
| | ||
= note: #[deny(const_err)] on by default | ||
|
||
error: reaching this expression at runtime will panic or abort | ||
--> $DIR/array-literal-index-oob.rs:2:7 | ||
| | ||
LL | &{[1, 2, 3][4]}; | ||
| --^^^^^^^^^^^^- | ||
| | | ||
| index out of bounds: the len is 3 but the index is 4 | ||
|
||
error: aborting due to 2 previous errors | ||
|
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0109]: type arguments are not allowed for this type | ||
--> $DIR/issue-57924.rs:5:16 | ||
| | ||
LL | Self::<E>(e) | ||
| ^ type argument not allowed | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0109`. |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
fn f1<'a>(_: &'a mut ()) {} | ||
|
||
fn f2<P>(_: P, _: ()) {} | ||
|
||
fn f3<'a>(x: &'a ((), &'a mut ())) { | ||
f2(|| x.0, f1(x.1)) | ||
//~^ ERROR cannot borrow `*x.1` as mutable, as it is behind a `&` reference | ||
//~| ERROR cannot borrow `*x.1` as mutable because it is also borrowed as immutable | ||
} | ||
|
||
fn main() {} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
error[E0596]: cannot borrow `*x.1` as mutable, as it is behind a `&` reference | ||
--> $DIR/issue-61623.rs:6:19 | ||
| | ||
LL | fn f3<'a>(x: &'a ((), &'a mut ())) { | ||
| -------------------- help: consider changing this to be a mutable reference: `&'a mut ((), &'a mut ())` | ||
LL | f2(|| x.0, f1(x.1)) | ||
| ^^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable | ||
|
||
error[E0502]: cannot borrow `*x.1` as mutable because it is also borrowed as immutable | ||
--> $DIR/issue-61623.rs:6:19 | ||
| | ||
LL | f2(|| x.0, f1(x.1)) | ||
| -- -- - ^^^ mutable borrow occurs here | ||
| | | | | ||
| | | first borrow occurs due to use of `x` in closure | ||
| | immutable borrow occurs here | ||
| immutable borrow later used by call | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0502, E0596. | ||
For more information about an error, try `rustc --explain E0502`. |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
struct A<T>(T); | ||
|
||
impl A<&'static u8> { | ||
fn f() { | ||
let x = 0; | ||
Self(&x); | ||
//~^ ERROR `x` does not live long enough | ||
} | ||
} | ||
|
||
fn main() {} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
error[E0597]: `x` does not live long enough | ||
--> $DIR/issue-61882-2.rs:6:14 | ||
| | ||
LL | Self(&x); | ||
| ^^ | ||
| | | ||
| borrowed value does not live long enough | ||
| requires that `x` is borrowed for `'static` | ||
LL | | ||
LL | } | ||
| - `x` dropped here while still borrowed | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0597`. |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
struct A<T>(T); | ||
|
||
impl A<bool> { | ||
const B: A<u8> = Self(0); | ||
//~^ ERROR mismatched types | ||
//~| ERROR mismatched types | ||
} | ||
|
||
fn main() {} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/issue-61882.rs:4:27 | ||
| | ||
LL | const B: A<u8> = Self(0); | ||
| ^ expected bool, found integer | ||
| | ||
= note: expected type `bool` | ||
found type `{integer}` | ||
|
||
error[E0308]: mismatched types | ||
--> $DIR/issue-61882.rs:4:22 | ||
| | ||
LL | const B: A<u8> = Self(0); | ||
| ^^^^^^^ expected u8, found bool | ||
| | ||
= note: expected type `A<u8>` | ||
found type `A<bool>` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
14 changes: 14 additions & 0 deletions
14
src/test/ui/rfc1598-generic-associated-types/gat-dont-ice-on-absent-feature.rs
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// rust-lang/rust#60654: Do not ICE on an attempt to use GATs that is | ||
// missing the feature gate. | ||
|
||
struct Foo; | ||
|
||
impl Iterator for Foo { | ||
type Item<'b> = &'b Foo; //~ ERROR generic associated types are unstable [E0658] | ||
|
||
fn next(&mut self) -> Option<Self::Item> { | ||
None | ||
} | ||
} | ||
|
||
fn main() { } |
12 changes: 12 additions & 0 deletions
12
src/test/ui/rfc1598-generic-associated-types/gat-dont-ice-on-absent-feature.stderr
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
error[E0658]: generic associated types are unstable | ||
--> $DIR/gat-dont-ice-on-absent-feature.rs:7:5 | ||
| | ||
LL | type Item<'b> = &'b Foo; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: for more information, see https://github.com/rust-lang/rust/issues/44265 | ||
= help: add #![feature(generic_associated_types)] to the crate attributes to enable | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0658`. |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good, FWIW,
Local | Upvar
became justLocal
in between thebeta
andmaster
branches.