55559d93e7
If a const is expected, resolve a const. If a type is expected, resolve a type. Don't try to resolve a type first falling back to consts.
31 lines
854 B
Plaintext
31 lines
854 B
Plaintext
error: expected constant, found type
|
|
--> $DIR/assoc-const-ty-mismatch.rs:23:19
|
|
|
|
|
LL | fn foo<F: Foo<N = usize>>() {}
|
|
| - ^^^^^ unexpected type
|
|
| |
|
|
| expected a constant because of this associated constant
|
|
|
|
|
note: the associated constant is defined here
|
|
--> $DIR/assoc-const-ty-mismatch.rs:5:5
|
|
|
|
|
LL | const N: usize;
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: expected type, found constant
|
|
--> $DIR/assoc-const-ty-mismatch.rs:25:22
|
|
|
|
|
LL | fn foo2<F: FooTy<T = 3usize>>() {}
|
|
| - ^^^^^^ unexpected constant
|
|
| |
|
|
| expected a type because of this associated type
|
|
|
|
|
note: the associated type is defined here
|
|
--> $DIR/assoc-const-ty-mismatch.rs:9:5
|
|
|
|
|
LL | type T;
|
|
| ^^^^^^
|
|
|
|
error: aborting due to 2 previous errors
|
|
|