mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
103 lines
3.3 KiB
Plaintext
103 lines
3.3 KiB
Plaintext
error[E0324]: item `C` is an associated method, which doesn't match its trait `Trait`
|
|
--> $DIR/bad-resolve.rs:24:5
|
|
|
|
|
LL | const C: u32 = 0;
|
|
| ----------------- item in trait
|
|
...
|
|
LL | reuse <F as Trait>::C;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ does not match trait
|
|
|
|
error[E0324]: item `Type` is an associated method, which doesn't match its trait `Trait`
|
|
--> $DIR/bad-resolve.rs:27:5
|
|
|
|
|
LL | type Type;
|
|
| ---------- item in trait
|
|
...
|
|
LL | reuse <F as Trait>::Type;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ does not match trait
|
|
|
|
error[E0407]: method `baz` is not a member of trait `Trait`
|
|
--> $DIR/bad-resolve.rs:30:5
|
|
|
|
|
LL | reuse <F as Trait>::baz;
|
|
| ^^^^^^^^^^^^^^^^^^^^---^
|
|
| | |
|
|
| | help: there is an associated function with a similar name: `bar`
|
|
| not a member of trait `Trait`
|
|
|
|
error[E0201]: duplicate definitions with name `foo`:
|
|
--> $DIR/bad-resolve.rs:37:5
|
|
|
|
|
LL | fn foo(&self, x: i32) -> i32 { x }
|
|
| ---------------------------------- item in trait
|
|
...
|
|
LL | reuse foo { &self.0 }
|
|
| --------------------- previous definition here
|
|
LL |
|
|
LL | reuse F::foo { &self.0 }
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definition
|
|
|
|
error[E0423]: expected function, found associated constant `Trait::C`
|
|
--> $DIR/bad-resolve.rs:24:11
|
|
|
|
|
LL | reuse <F as Trait>::C;
|
|
| ^^^^^^^^^^^^^^^ not a function
|
|
|
|
error[E0575]: expected method or associated constant, found associated type `Trait::Type`
|
|
--> $DIR/bad-resolve.rs:27:11
|
|
|
|
|
LL | reuse <F as Trait>::Type;
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: can't use a type alias as a constructor
|
|
|
|
error[E0576]: cannot find method or associated constant `baz` in trait `Trait`
|
|
--> $DIR/bad-resolve.rs:30:25
|
|
|
|
|
LL | fn bar() {}
|
|
| -------- similarly named associated function `bar` defined here
|
|
...
|
|
LL | reuse <F as Trait>::baz;
|
|
| ^^^ help: an associated function with a similar name exists: `bar`
|
|
|
|
error[E0425]: cannot find function `foo` in this scope
|
|
--> $DIR/bad-resolve.rs:35:11
|
|
|
|
|
LL | reuse foo { &self.0 }
|
|
| ^^^ not found in this scope
|
|
|
|
error[E0425]: cannot find function `foo` in `F`
|
|
--> $DIR/bad-resolve.rs:37:14
|
|
|
|
|
LL | reuse F::foo { &self.0 }
|
|
| ^^^ not found in `F`
|
|
|
|
error[E0425]: cannot find function `foo` in `F`
|
|
--> $DIR/bad-resolve.rs:43:14
|
|
|
|
|
LL | reuse F::foo { &self.0 }
|
|
| ^^^ not found in `F`
|
|
|
|
warning: the feature `fn_delegation` is incomplete and may not be safe to use and/or cause compiler crashes
|
|
--> $DIR/bad-resolve.rs:1:12
|
|
|
|
|
LL | #![feature(fn_delegation)]
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= note: see issue #118212 <https://github.com/rust-lang/rust/issues/118212> for more information
|
|
= note: `#[warn(incomplete_features)]` on by default
|
|
|
|
error[E0046]: not all trait items implemented, missing: `Type`
|
|
--> $DIR/bad-resolve.rs:22:1
|
|
|
|
|
LL | type Type;
|
|
| --------- `Type` from trait
|
|
...
|
|
LL | impl Trait for S {
|
|
| ^^^^^^^^^^^^^^^^ missing `Type` in implementation
|
|
|
|
error: aborting due to 11 previous errors; 1 warning emitted
|
|
|
|
Some errors have detailed explanations: E0046, E0201, E0324, E0407, E0423, E0425, E0575, E0576.
|
|
For more information about an error, try `rustc --explain E0046`.
|