mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-26 22:47:13 +00:00
Accurately refer to assoc fn without receiver as assoc fn instead of methods. Add `AssocItem::descr` method to centralize where we call methods and associated functions.
42 lines
1.4 KiB
Plaintext
42 lines
1.4 KiB
Plaintext
error[E0049]: associated function `bar` has 1 const parameter but its trait declaration has 0 const parameters
|
|
--> $DIR/const-default-bound-non-const-specialized-bound.rs:16:1
|
|
|
|
|
LL | #[const_trait]
|
|
| ^^^^^^^^^^^^^^ found 1 const parameter
|
|
LL | trait Bar {
|
|
LL | fn bar();
|
|
| - expected 0 const parameters
|
|
|
|
error: cannot specialize on const impl with non-const impl
|
|
--> $DIR/const-default-bound-non-const-specialized-bound.rs:28:1
|
|
|
|
|
LL | / impl<T> Bar for T
|
|
LL | | where
|
|
LL | | T: Foo, //FIXME ~ ERROR missing `~const` qualifier
|
|
LL | | T: Specialize,
|
|
| |__________________^
|
|
|
|
error[E0049]: associated function `baz` has 1 const parameter but its trait declaration has 0 const parameters
|
|
--> $DIR/const-default-bound-non-const-specialized-bound.rs:36:1
|
|
|
|
|
LL | #[const_trait]
|
|
| ^^^^^^^^^^^^^^ found 1 const parameter
|
|
LL | trait Baz {
|
|
LL | fn baz();
|
|
| - expected 0 const parameters
|
|
|
|
error[E0049]: associated function `baz` has 1 const parameter but its trait declaration has 0 const parameters
|
|
--> $DIR/const-default-bound-non-const-specialized-bound.rs:36:1
|
|
|
|
|
LL | #[const_trait]
|
|
| ^^^^^^^^^^^^^^ found 1 const parameter
|
|
LL | trait Baz {
|
|
LL | fn baz();
|
|
| - expected 0 const parameters
|
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0049`.
|