fix #102182, recover from impl Trait in type param bound
This commit is contained in:
parent
672e3f4d77
commit
7b2f04a2b3
3 changed files with 51 additions and 2 deletions
|
|
@ -0,0 +1,3 @@
|
|||
fn foo<T: impl Trait>() {}
|
||||
//~^ ERROR expected trait bound, found `impl Trait` type
|
||||
fn main() {}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
error: expected trait bound, found `impl Trait` type
|
||||
--> $DIR/issue-102182-impl-trait-recover.rs:1:11
|
||||
|
|
||||
LL | fn foo<T: impl Trait>() {}
|
||||
| ^^^^^^^^^^ not a trait
|
||||
|
|
||||
help: use the trait bounds directly
|
||||
|
|
||||
LL - fn foo<T: impl Trait>() {}
|
||||
LL + fn foo<T: Trait>() {}
|
||||
|
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue