blob: 29f87cf1457b17d72955a92c8035f9866aa808ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
error[E0407]: method `foo3` is not a member of trait `Trait`
--> $DIR/explicit-paths.rs:49:9
|
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`
--> $DIR/explicit-paths.rs:51:9
|
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`
--> $DIR/explicit-paths.rs:27:14
|
LL | reuse S::foo4;
| ^^^^ not found in `S`
error[E0425]: cannot find function `foo4` in `F`
--> $DIR/explicit-paths.rs:38:18
|
LL | reuse F::foo4 { &self.0 }
| ^^^^ not found in `F`
|
note: function `fn_to_other::foo4` exists but is inaccessible
--> $DIR/explicit-paths.rs:27:5
|
LL | reuse S::foo4;
| ^^^^^^^^^^^^^^ not accessible
error[E0425]: cannot find function `foo4` in `F`
--> $DIR/explicit-paths.rs:51:18
|
LL | reuse F::foo4 { &self.0 }
| ^^^^ not found in `F`
|
note: function `fn_to_other::foo4` exists but is inaccessible
--> $DIR/explicit-paths.rs:27:5
|
LL | reuse S::foo4;
| ^^^^^^^^^^^^^^ not accessible
error[E0425]: cannot find function `foo4` in `F`
--> $DIR/explicit-paths.rs:65:18
|
LL | reuse F::foo4 { &F }
| ^^^^ not found in `F`
|
note: function `fn_to_other::foo4` exists but is inaccessible
--> $DIR/explicit-paths.rs:27:5
|
LL | reuse S::foo4;
| ^^^^^^^^^^^^^^ not accessible
error[E0119]: conflicting implementations of trait `Trait` for type `S`
--> $DIR/explicit-paths.rs:74:5
|
LL | impl Trait for S {
| ---------------- first implementation here
...
LL | impl Trait for S {
| ^^^^^^^^^^^^^^^^ conflicting implementation for `S`
error[E0308]: mismatched types
--> $DIR/explicit-paths.rs:61:36
|
LL | trait Trait2 : Trait {
| -------------------- found this type parameter
LL | reuse <F as Trait>::foo1 { self }
| ---- ^^^^ expected `&F`, found `&Self`
| |
| arguments to this function are incorrect
|
= note: expected reference `&F`
found reference `&Self`
note: method defined here
--> $DIR/explicit-paths.rs:5:8
|
LL | fn foo1(&self, x: i32) -> i32 { x }
| ^^^^ -----
error[E0277]: the trait bound `S2: Trait` is not satisfied
--> $DIR/explicit-paths.rs:76:16
|
LL | reuse <S2 as Trait>::foo1;
| ^^ unsatisfied trait bound
|
help: the trait `Trait` is not implemented for `S2`
--> $DIR/explicit-paths.rs:73:5
|
LL | struct S2;
| ^^^^^^^^^
= help: the following other types implement trait `Trait`:
F
S
error[E0308]: mismatched types
--> $DIR/explicit-paths.rs:76:30
|
LL | reuse <S2 as Trait>::foo1;
| ^^^^
| |
| expected `&S2`, found `&S`
| arguments to this function are incorrect
|
= note: expected reference `&S2`
found reference `&S`
note: method defined here
--> $DIR/explicit-paths.rs:5:8
|
LL | fn foo1(&self, x: i32) -> i32 { x }
| ^^^^ -----
error: aborting due to 10 previous errors
Some errors have detailed explanations: E0119, E0277, E0308, E0407, E0425.
For more information about an error, try `rustc --explain E0119`.
|