2024-03-26 10:59:03 -05:00
|
|
|
error[E0407]: method `foo3` is not a member of trait `Trait`
|
2024-05-30 14:00:44 -05:00
|
|
|
--> $DIR/explicit-paths.rs:49:9
|
2023-11-26 06:57:31 -06:00
|
|
|
|
|
2024-03-26 10:59:03 -05:00
|
|
|
LL | reuse to_reuse::foo3;
|
|
|
|
| ^^^^^^^^^^^^^^^^----^
|
|
|
|
| | |
|
|
|
|
| | help: there is an associated function with a similar name: `foo1`
|
|
|
|
| not a member of trait `Trait`
|
|
|
|
|
|
|
|
error[E0407]: method `foo4` is not a member of trait `Trait`
|
2024-05-30 14:00:44 -05:00
|
|
|
--> $DIR/explicit-paths.rs:51:9
|
2024-03-26 10:59:03 -05:00
|
|
|
|
|
|
|
|
LL | reuse F::foo4 { &self.0 }
|
|
|
|
| ^^^^^^^^^----^^^^^^^^^^^^
|
|
|
|
| | |
|
|
|
|
| | help: there is an associated function with a similar name: `foo1`
|
|
|
|
| not a member of trait `Trait`
|
|
|
|
|
|
|
|
error[E0425]: cannot find function `foo4` in `S`
|
2024-05-30 14:00:44 -05:00
|
|
|
--> $DIR/explicit-paths.rs:27:14
|
2024-03-26 10:59:03 -05:00
|
|
|
|
|
|
|
|
LL | reuse S::foo4;
|
|
|
|
| ^^^^ not found in `S`
|
|
|
|
|
|
|
|
error[E0425]: cannot find function `foo4` in `F`
|
2024-05-30 14:00:44 -05:00
|
|
|
--> $DIR/explicit-paths.rs:38:18
|
2024-03-26 10:59:03 -05:00
|
|
|
|
|
|
|
|
LL | reuse F::foo4 { &self.0 }
|
|
|
|
| ^^^^ not found in `F`
|
|
|
|
|
|
|
|
|
note: function `fn_to_other::foo4` exists but is inaccessible
|
2024-05-30 14:00:44 -05:00
|
|
|
--> $DIR/explicit-paths.rs:27:5
|
2024-03-26 10:59:03 -05:00
|
|
|
|
|
|
|
|
LL | reuse S::foo4;
|
|
|
|
| ^^^^^^^^^^^^^^ not accessible
|
|
|
|
|
|
|
|
error[E0425]: cannot find function `foo4` in `F`
|
2024-05-30 14:00:44 -05:00
|
|
|
--> $DIR/explicit-paths.rs:51:18
|
2024-03-26 10:59:03 -05:00
|
|
|
|
|
|
|
|
LL | reuse F::foo4 { &self.0 }
|
|
|
|
| ^^^^ not found in `F`
|
|
|
|
|
|
|
|
|
note: function `fn_to_other::foo4` exists but is inaccessible
|
2024-05-30 14:00:44 -05:00
|
|
|
--> $DIR/explicit-paths.rs:27:5
|
2024-03-26 10:59:03 -05:00
|
|
|
|
|
|
|
|
LL | reuse S::foo4;
|
|
|
|
| ^^^^^^^^^^^^^^ not accessible
|
|
|
|
|
|
|
|
error[E0425]: cannot find function `foo4` in `F`
|
2024-05-30 14:00:44 -05:00
|
|
|
--> $DIR/explicit-paths.rs:65:18
|
2024-03-26 10:59:03 -05:00
|
|
|
|
|
|
|
|
LL | reuse F::foo4 { &F }
|
|
|
|
| ^^^^ not found in `F`
|
|
|
|
|
|
|
|
|
note: function `fn_to_other::foo4` exists but is inaccessible
|
2024-05-30 14:00:44 -05:00
|
|
|
--> $DIR/explicit-paths.rs:27:5
|
2023-11-26 06:57:31 -06:00
|
|
|
|
|
2024-03-26 10:59:03 -05:00
|
|
|
LL | reuse S::foo4;
|
|
|
|
| ^^^^^^^^^^^^^^ not accessible
|
|
|
|
|
|
|
|
error[E0119]: conflicting implementations of trait `Trait` for type `S`
|
2024-05-30 14:00:44 -05:00
|
|
|
--> $DIR/explicit-paths.rs:74:5
|
2024-03-26 10:59:03 -05:00
|
|
|
|
|
|
|
|
LL | impl Trait for S {
|
|
|
|
| ---------------- first implementation here
|
|
|
|
...
|
|
|
|
LL | impl Trait for S {
|
|
|
|
| ^^^^^^^^^^^^^^^^ conflicting implementation for `S`
|
|
|
|
|
2023-11-26 06:57:31 -06:00
|
|
|
error[E0308]: mismatched types
|
2024-05-30 14:00:44 -05:00
|
|
|
--> $DIR/explicit-paths.rs:61:36
|
2023-11-26 06:57:31 -06:00
|
|
|
|
|
2024-03-26 10:59:03 -05:00
|
|
|
LL | trait Trait2 : Trait {
|
|
|
|
| -------------------- found this type parameter
|
|
|
|
LL | reuse <F as Trait>::foo1 { self }
|
2024-06-18 06:04:28 -05:00
|
|
|
| ---- ^^^^ expected `&F`, found `&Self`
|
|
|
|
| |
|
|
|
|
| arguments to this function are incorrect
|
2023-11-26 06:57:31 -06:00
|
|
|
|
|
|
|
|
= note: expected reference `&F`
|
2024-03-26 10:59:03 -05:00
|
|
|
found reference `&Self`
|
2024-06-18 06:04:28 -05:00
|
|
|
note: method defined here
|
|
|
|
--> $DIR/explicit-paths.rs:5:8
|
|
|
|
|
|
|
|
|
LL | fn foo1(&self, x: i32) -> i32 { x }
|
|
|
|
| ^^^^ -----
|
2024-03-26 10:59:03 -05:00
|
|
|
|
|
|
|
error[E0277]: the trait bound `S2: Trait` is not satisfied
|
2024-05-30 14:00:44 -05:00
|
|
|
--> $DIR/explicit-paths.rs:76:16
|
2023-11-26 06:57:31 -06:00
|
|
|
|
|
2024-03-26 10:59:03 -05:00
|
|
|
LL | reuse <S2 as Trait>::foo1;
|
|
|
|
| ^^ the trait `Trait` is not implemented for `S2`
|
|
|
|
|
|
|
|
|
= help: the following other types implement trait `Trait`:
|
|
|
|
F
|
|
|
|
S
|
2023-11-26 06:57:31 -06:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2024-05-30 14:00:44 -05:00
|
|
|
--> $DIR/explicit-paths.rs:76:30
|
2023-11-26 06:57:31 -06:00
|
|
|
|
|
2024-03-26 10:59:03 -05:00
|
|
|
LL | reuse <S2 as Trait>::foo1;
|
2024-06-25 08:32:00 -05:00
|
|
|
| ^^^^
|
|
|
|
| |
|
|
|
|
| expected `&S2`, found `&S`
|
|
|
|
| arguments to this function are incorrect
|
2023-11-26 06:57:31 -06:00
|
|
|
|
|
|
|
|
= note: expected reference `&S2`
|
2024-03-26 10:59:03 -05:00
|
|
|
found reference `&S`
|
|
|
|
note: method defined here
|
|
|
|
--> $DIR/explicit-paths.rs:5:8
|
|
|
|
|
|
|
|
|
LL | fn foo1(&self, x: i32) -> i32 { x }
|
|
|
|
| ^^^^ -----
|
2023-11-26 06:57:31 -06:00
|
|
|
|
2024-05-30 14:00:44 -05:00
|
|
|
error: aborting due to 10 previous errors
|
2023-11-26 06:57:31 -06:00
|
|
|
|
2024-03-26 10:59:03 -05:00
|
|
|
Some errors have detailed explanations: E0119, E0277, E0308, E0407, E0425.
|
|
|
|
For more information about an error, try `rustc --explain E0119`.
|