]> git.proxmox.com Git - rustc.git/blame - src/test/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / suggestions / trait-with-missing-associated-type-restriction-fixable.stderr
CommitLineData
f9f354fc
XL
1error[E0308]: mismatched types
2 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:13:13
3 |
4LL | qux(x.func())
923072b8
FG
5 | --- ^^^^^^^^ expected `usize`, found associated type
6 | |
7 | arguments to this function are incorrect
f9f354fc
XL
8 |
9 = note: expected type `usize`
10 found associated type `<impl Trait as Trait>::A`
923072b8
FG
11note: function defined here
12 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4
13 |
14LL | fn qux(_: usize) {}
15 | ^^^ --------
f9f354fc
XL
16help: consider constraining the associated type `<impl Trait as Trait>::A` to `usize`
17 |
18LL | fn foo<'a, T: Trait + 'a>(&self, _: impl Trait, x: impl Trait<A = usize>, _: T) {
94222f64 19 | +++++++++++
f9f354fc
XL
20
21error[E0308]: mismatched types
22 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:17:13
23 |
24LL | qux(x.func())
923072b8
FG
25 | --- ^^^^^^^^ expected `usize`, found associated type
26 | |
27 | arguments to this function are incorrect
f9f354fc
XL
28 |
29 = note: expected type `usize`
30 found associated type `<T as Trait>::A`
923072b8
FG
31note: function defined here
32 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4
33 |
34LL | fn qux(_: usize) {}
35 | ^^^ --------
f9f354fc
XL
36help: consider constraining the associated type `<T as Trait>::A` to `usize`
37 |
38LL | fn ban<T>(x: T) where T: Trait<A = usize> {
94222f64 39 | +++++++++++
f9f354fc
XL
40
41error[E0308]: mismatched types
42 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:22:9
43 |
44LL | qux(x.func())
923072b8
FG
45 | --- ^^^^^^^^ expected `usize`, found associated type
46 | |
47 | arguments to this function are incorrect
f9f354fc
XL
48 |
49 = note: expected type `usize`
50 found associated type `<impl Trait as Trait>::A`
923072b8
FG
51note: function defined here
52 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4
53 |
54LL | fn qux(_: usize) {}
55 | ^^^ --------
f9f354fc
XL
56help: consider constraining the associated type `<impl Trait as Trait>::A` to `usize`
57 |
58LL | fn foo<'a, T: Trait + 'a>(_: impl Trait, x: impl Trait<A = usize>, _: T) {
94222f64 59 | +++++++++++
f9f354fc
XL
60
61error[E0308]: mismatched types
62 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:26:9
63 |
64LL | qux(x.func())
923072b8
FG
65 | --- ^^^^^^^^ expected `usize`, found associated type
66 | |
67 | arguments to this function are incorrect
f9f354fc
XL
68 |
69 = note: expected type `usize`
70 found associated type `<T as Trait>::A`
923072b8
FG
71note: function defined here
72 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4
73 |
74LL | fn qux(_: usize) {}
75 | ^^^ --------
f9f354fc
XL
76help: consider constraining the associated type `<T as Trait>::A` to `usize`
77 |
78LL | fn bar<T: Trait<A = usize>>(x: T) {
94222f64 79 | +++++++++++
f9f354fc
XL
80
81error[E0308]: mismatched types
82 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:30:9
83 |
84LL | qux(x.func())
923072b8
FG
85 | --- ^^^^^^^^ expected `usize`, found associated type
86 | |
87 | arguments to this function are incorrect
f9f354fc
XL
88 |
89 = note: expected type `usize`
90 found associated type `<impl Trait<i32> as Trait<i32>>::A`
923072b8
FG
91note: function defined here
92 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4
93 |
94LL | fn qux(_: usize) {}
95 | ^^^ --------
f9f354fc
XL
96help: consider constraining the associated type `<impl Trait<i32> as Trait<i32>>::A` to `usize`
97 |
98LL | fn foo2(x: impl Trait<i32, A = usize>) {
94222f64 99 | +++++++++++
f9f354fc
XL
100
101error[E0308]: mismatched types
102 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:34:9
103 |
104LL | qux(x.func())
923072b8
FG
105 | --- ^^^^^^^^ expected `usize`, found associated type
106 | |
107 | arguments to this function are incorrect
f9f354fc
XL
108 |
109 = note: expected type `usize`
110 found associated type `<T as Trait<i32>>::A`
923072b8
FG
111note: function defined here
112 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4
113 |
114LL | fn qux(_: usize) {}
115 | ^^^ --------
f9f354fc
XL
116help: consider constraining the associated type `<T as Trait<i32>>::A` to `usize`
117 |
118LL | fn bar2<T: Trait<i32, A = usize>>(x: T) {
94222f64 119 | +++++++++++
f9f354fc
XL
120
121error[E0308]: mismatched types
122 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:38:9
123 |
124LL | qux(x.func())
923072b8
FG
125 | --- ^^^^^^^^ expected `usize`, found associated type
126 | |
127 | arguments to this function are incorrect
f9f354fc
XL
128 |
129 = note: expected type `usize`
130 found associated type `<T as Trait>::A`
923072b8
FG
131note: function defined here
132 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4
133 |
134LL | fn qux(_: usize) {}
135 | ^^^ --------
f9f354fc
XL
136help: consider constraining the associated type `<T as Trait>::A` to `usize`
137 |
138LL | fn ban<T>(x: T) where T: Trait<A = usize> {
94222f64 139 | +++++++++++
f9f354fc
XL
140
141error: aborting due to 7 previous errors
142
143For more information about this error, try `rustc --explain E0308`.