File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
tests/ui/async-await/in-trait Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ // edition: 2021
2+
3+ #![ feature( async_fn_in_trait) ]
4+ #![ allow( incomplete_features) ]
5+
6+ trait Foo {
7+ async fn foo < T > ( ) ;
8+ }
9+
10+ impl Foo for ( ) {
11+ async fn foo < const N : usize > ( ) { }
12+ //~^ ERROR: method `foo` has an incompatible generic parameter for trait `Foo` [E0053]
13+ }
14+
15+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error[E0053]: method `foo` has an incompatible generic parameter for trait `Foo`
2+ --> $DIR/generics-mismatch.rs:11:18
3+ |
4+ LL | trait Foo {
5+ | ---
6+ LL | async fn foo<T>();
7+ | - expected type parameter
8+ ...
9+ LL | impl Foo for () {
10+ | ---------------
11+ LL | async fn foo<const N: usize>() {}
12+ | ^^^^^^^^^^^^^^ found const parameter of type `usize`
13+
14+ error: aborting due to previous error
15+
16+ For more information about this error, try `rustc --explain E0053`.
You can’t perform that action at this time.
0 commit comments