rust/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.stderr
Esteban Küber 860c8cdeaf Differentiate between methods and associated functions
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.
2024-08-10 00:54:16 +00:00

44 lines
1.5 KiB
Plaintext

error[E0049]: associated function `foo` has 1 const parameter but its trait declaration has 0 const parameters
--> $DIR/issue-95186-specialize-on-tilde-const.rs:14:1
|
LL | #[const_trait]
| ^^^^^^^^^^^^^^ found 1 const parameter
LL | trait Foo {
LL | fn foo();
| - expected 0 const parameters
error[E0049]: associated function `foo` has 1 const parameter but its trait declaration has 0 const parameters
--> $DIR/issue-95186-specialize-on-tilde-const.rs:14:1
|
LL | #[const_trait]
| ^^^^^^^^^^^^^^ found 1 const parameter
LL | trait Foo {
LL | fn foo();
| - expected 0 const parameters
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0049]: associated function `bar` has 1 const parameter but its trait declaration has 0 const parameters
--> $DIR/issue-95186-specialize-on-tilde-const.rs:30:1
|
LL | #[const_trait]
| ^^^^^^^^^^^^^^ found 1 const parameter
LL | trait Bar {
LL | fn bar() {}
| - expected 0 const parameters
error[E0049]: associated function `bar` has 1 const parameter but its trait declaration has 0 const parameters
--> $DIR/issue-95186-specialize-on-tilde-const.rs:30:1
|
LL | #[const_trait]
| ^^^^^^^^^^^^^^ found 1 const parameter
LL | trait Bar {
LL | fn bar() {}
| - 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`.