2024-07-24 21:59:38 -05:00
|
|
|
error[E0049]: method `foo` has 1 type parameter but its trait declaration has 0 type parameters
|
2024-10-30 13:03:44 -05:00
|
|
|
--> $DIR/inline-incorrect-early-bound-in-ctfe.rs:19:12
|
2024-07-24 21:59:38 -05:00
|
|
|
|
|
|
|
|
LL | fn foo(self);
|
|
|
|
| - expected 0 type parameters
|
|
|
|
...
|
|
|
|
LL | fn foo<T>(self) {
|
|
|
|
| ^ found 1 type parameter
|
|
|
|
|
2024-10-25 22:35:16 -05:00
|
|
|
error[E0015]: cannot call non-const fn `<() as Trait>::foo` in constant functions
|
2024-10-30 13:03:44 -05:00
|
|
|
--> $DIR/inline-incorrect-early-bound-in-ctfe.rs:26:8
|
2024-10-25 22:35:16 -05:00
|
|
|
|
|
|
|
|
LL | ().foo();
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
|
|
|
|
2024-10-30 13:03:44 -05:00
|
|
|
error: aborting due to 2 previous errors
|
2024-07-24 21:59:38 -05:00
|
|
|
|
2024-10-25 22:35:16 -05:00
|
|
|
Some errors have detailed explanations: E0015, E0049.
|
|
|
|
For more information about an error, try `rustc --explain E0015`.
|