-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #74994 - JohnTitor:rollup-eknaekv, r=JohnTitor
Rollup of 6 pull requests Successful merges: - #74644 (Remove `linked_list_extras` methods.) - #74968 (Run all tests if have no specified tests) - #74982 (1.45.2 release notes) - #74984 (Miri: fix ICE when unwinding past topmost stack frame) - #74986 (fix part of comparison that would always evaluate to "true", probably an oversight) - #74991 (Fix Const-Generic Cycle ICE #74199) Failed merges: r? @ghost
- Loading branch information
Showing
9 changed files
with
207 additions
and
66 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#![feature(const_generics)] | ||
#![allow(incomplete_features)] | ||
|
||
struct Foo<const N: [u8; { | ||
//~^ ERROR cycle detected | ||
//~| ERROR cycle detected | ||
struct Foo<const N: usize>; | ||
|
||
impl<const N: usize> Foo<N> { | ||
fn value() -> usize { | ||
N | ||
} | ||
} | ||
|
||
Foo::<17>::value() | ||
}]>; | ||
|
||
fn main() {} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
error[E0391]: cycle detected when computing type of `Foo` | ||
--> $DIR/nested-type.rs:4:1 | ||
| | ||
LL | struct Foo<const N: [u8; { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: ...which requires computing type of `Foo::N`... | ||
--> $DIR/nested-type.rs:4:18 | ||
| | ||
LL | struct Foo<const N: [u8; { | ||
| ^ | ||
note: ...which requires const-evaluating + checking `Foo::{{constant}}#0`... | ||
--> $DIR/nested-type.rs:4:26 | ||
| | ||
LL | struct Foo<const N: [u8; { | ||
| __________________________^ | ||
LL | | | ||
LL | | | ||
LL | | struct Foo<const N: usize>; | ||
... | | ||
LL | | Foo::<17>::value() | ||
LL | | }]>; | ||
| |_^ | ||
note: ...which requires const-evaluating + checking `Foo::{{constant}}#0`... | ||
--> $DIR/nested-type.rs:4:26 | ||
| | ||
LL | struct Foo<const N: [u8; { | ||
| __________________________^ | ||
LL | | | ||
LL | | | ||
LL | | struct Foo<const N: usize>; | ||
... | | ||
LL | | Foo::<17>::value() | ||
LL | | }]>; | ||
| |_^ | ||
note: ...which requires const-evaluating `Foo::{{constant}}#0`... | ||
--> $DIR/nested-type.rs:4:26 | ||
| | ||
LL | struct Foo<const N: [u8; { | ||
| __________________________^ | ||
LL | | | ||
LL | | | ||
LL | | struct Foo<const N: usize>; | ||
... | | ||
LL | | Foo::<17>::value() | ||
LL | | }]>; | ||
| |_^ | ||
note: ...which requires type-checking `Foo::{{constant}}#0`... | ||
--> $DIR/nested-type.rs:4:26 | ||
| | ||
LL | struct Foo<const N: [u8; { | ||
| __________________________^ | ||
LL | | | ||
LL | | | ||
LL | | struct Foo<const N: usize>; | ||
... | | ||
LL | | Foo::<17>::value() | ||
LL | | }]>; | ||
| |_^ | ||
note: ...which requires computing the variances of `Foo::{{constant}}#0::Foo`... | ||
--> $DIR/nested-type.rs:7:5 | ||
| | ||
LL | struct Foo<const N: usize>; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
= note: ...which requires computing the variances for items in this crate... | ||
= note: ...which again requires computing type of `Foo`, completing the cycle | ||
note: cycle used when collecting item types in top-level module | ||
--> $DIR/nested-type.rs:1:1 | ||
| | ||
LL | / #![feature(const_generics)] | ||
LL | | #![allow(incomplete_features)] | ||
LL | | | ||
LL | | struct Foo<const N: [u8; { | ||
... | | ||
LL | | | ||
LL | | fn main() {} | ||
| |____________^ | ||
|
||
error[E0391]: cycle detected when computing type of `Foo` | ||
--> $DIR/nested-type.rs:4:1 | ||
| | ||
LL | struct Foo<const N: [u8; { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: ...which requires computing type of `Foo::N`... | ||
--> $DIR/nested-type.rs:4:18 | ||
| | ||
LL | struct Foo<const N: [u8; { | ||
| ^ | ||
note: ...which requires const-evaluating + checking `Foo::{{constant}}#0`... | ||
--> $DIR/nested-type.rs:4:26 | ||
| | ||
LL | struct Foo<const N: [u8; { | ||
| __________________________^ | ||
LL | | | ||
LL | | | ||
LL | | struct Foo<const N: usize>; | ||
... | | ||
LL | | Foo::<17>::value() | ||
LL | | }]>; | ||
| |_^ | ||
note: ...which requires const-evaluating + checking `Foo::{{constant}}#0`... | ||
--> $DIR/nested-type.rs:4:26 | ||
| | ||
LL | struct Foo<const N: [u8; { | ||
| __________________________^ | ||
LL | | | ||
LL | | | ||
LL | | struct Foo<const N: usize>; | ||
... | | ||
LL | | Foo::<17>::value() | ||
LL | | }]>; | ||
| |_^ | ||
note: ...which requires const-evaluating `Foo::{{constant}}#0`... | ||
--> $DIR/nested-type.rs:4:26 | ||
| | ||
LL | struct Foo<const N: [u8; { | ||
| __________________________^ | ||
LL | | | ||
LL | | | ||
LL | | struct Foo<const N: usize>; | ||
... | | ||
LL | | Foo::<17>::value() | ||
LL | | }]>; | ||
| |_^ | ||
note: ...which requires type-checking `Foo::{{constant}}#0`... | ||
--> $DIR/nested-type.rs:4:26 | ||
| | ||
LL | struct Foo<const N: [u8; { | ||
| __________________________^ | ||
LL | | | ||
LL | | | ||
LL | | struct Foo<const N: usize>; | ||
... | | ||
LL | | Foo::<17>::value() | ||
LL | | }]>; | ||
| |_^ | ||
note: ...which requires computing the variances of `Foo::{{constant}}#0::Foo`... | ||
--> $DIR/nested-type.rs:7:5 | ||
| | ||
LL | struct Foo<const N: usize>; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
= note: ...which requires computing the variances for items in this crate... | ||
= note: ...which again requires computing type of `Foo`, completing the cycle | ||
note: cycle used when collecting item types in top-level module | ||
--> $DIR/nested-type.rs:1:1 | ||
| | ||
LL | / #![feature(const_generics)] | ||
LL | | #![allow(incomplete_features)] | ||
LL | | | ||
LL | | struct Foo<const N: [u8; { | ||
... | | ||
LL | | | ||
LL | | fn main() {} | ||
| |____________^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0391`. |