-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ignore type flags insertion in default_anon_const_substs if error occ…
…urred
- Loading branch information
Showing
5 changed files
with
49 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#![allow(incomplete_features)] | ||
#![feature(generic_const_exprs)] | ||
|
||
struct ConstAssert<const COND: bool>; | ||
trait True {} | ||
impl True for ConstAssert<true> {} | ||
|
||
struct Range<T: PartialOrd, const MIN: T, const MAX: T>(T) | ||
//~^ ERROR the type of const parameters must not depend on other generic parameters | ||
//~| ERROR the type of const parameters must not depend on other generic parameters | ||
where | ||
ConstAssert<{ MIN <= MAX }>: True; | ||
|
||
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,15 @@ | ||
error[E0770]: the type of const parameters must not depend on other generic parameters | ||
--> $DIR/issue-88997.rs:8:40 | ||
| | ||
LL | struct Range<T: PartialOrd, const MIN: T, const MAX: T>(T) | ||
| ^ the type must not depend on the parameter `T` | ||
|
||
error[E0770]: the type of const parameters must not depend on other generic parameters | ||
--> $DIR/issue-88997.rs:8:54 | ||
| | ||
LL | struct Range<T: PartialOrd, const MIN: T, const MAX: T>(T) | ||
| ^ the type must not depend on the parameter `T` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0770`. |
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,9 @@ | ||
#![feature(generic_const_exprs)] | ||
#![allow(incomplete_features)] | ||
|
||
pub struct Foo<T, const H: T>(T) | ||
//~^ ERROR the type of const parameters must not depend on other generic parameters | ||
where | ||
[(); 1]:; | ||
|
||
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,9 @@ | ||
error[E0770]: the type of const parameters must not depend on other generic parameters | ||
--> $DIR/issue-90364.rs:4:28 | ||
| | ||
LL | pub struct Foo<T, const H: T>(T) | ||
| ^ the type must not depend on the parameter `T` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0770`. |