-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #78739 - hameerabbasi:issue-78654, r=nikomatsakis
Fix ICE on type error in async function Fixes #78654
- Loading branch information
Showing
4 changed files
with
55 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
error[E0573]: expected type, found built-in attribute `feature` | ||
--> $DIR/issue-78654.rs:10:15 | ||
| | ||
LL | impl<const H: feature> Foo { | ||
| ^^^^^^^ not a type | ||
|
||
error[E0207]: the const parameter `H` is not constrained by the impl trait, self type, or predicates | ||
--> $DIR/issue-78654.rs:10:12 | ||
| | ||
LL | impl<const H: feature> Foo { | ||
| ^ unconstrained const parameter | ||
| | ||
= note: expressions using a const parameter must map each value to a distinct output value | ||
= note: proving the result of expressions other than the parameter are unique is not supported | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0207, E0573. | ||
For more information about an error, try `rustc --explain E0207`. |
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,19 @@ | ||
error[E0573]: expected type, found built-in attribute `feature` | ||
--> $DIR/issue-78654.rs:10:15 | ||
| | ||
LL | impl<const H: feature> Foo { | ||
| ^^^^^^^ not a type | ||
|
||
error[E0207]: the const parameter `H` is not constrained by the impl trait, self type, or predicates | ||
--> $DIR/issue-78654.rs:10:12 | ||
| | ||
LL | impl<const H: feature> Foo { | ||
| ^ unconstrained const parameter | ||
| | ||
= note: expressions using a const parameter must map each value to a distinct output value | ||
= note: proving the result of expressions other than the parameter are unique is not supported | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0207, E0573. | ||
For more information about an error, try `rustc --explain E0207`. |
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,16 @@ | ||
// edition:2018 | ||
// revisions: full min | ||
|
||
#![cfg_attr(full, feature(const_generics))] | ||
#![cfg_attr(full, allow(incomplete_features))] | ||
#![cfg_attr(min, feature(min_const_generics))] | ||
|
||
struct Foo; | ||
|
||
impl<const H: feature> Foo { | ||
//~^ ERROR: expected type, found built-in attribute `feature` | ||
//~^^ ERROR: the const parameter `H` is not constrained by the impl trait, self type, or predicates | ||
async fn biz() {} | ||
} | ||
|
||
fn main() {} |