You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/test/ui/impl-trait/equality.stderr
+1
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ LL | 0_u32
12
12
|
13
13
= note: to return `impl Trait`, all returned values must be of the same type
14
14
= help: you can instead return a trait object using `Box<dyn Foo>`
15
+
= help: alternatively, create a new `enum` with a variant for each returned type
15
16
= note: for information on `impl Trait`, see <https://doc.rust-lang.org/book/ch10-02-traits.html#returning-types-that-implement-traits>
16
17
= note: for information on trait objects, see <https://doc.rust-lang.org/book/ch17-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types>
Copy file name to clipboardExpand all lines: src/test/ui/point-to-type-err-cause-on-impl-trait-return.stderr
+6
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ LL | 1u32
12
12
|
13
13
= note: to return `impl Trait`, all returned values must be of the same type
14
14
= help: you can instead return a trait object using `Box<dyn std::fmt::Display>`
15
+
= help: alternatively, create a new `enum` with a variant for each returned type
15
16
= note: for information on `impl Trait`, see <https://doc.rust-lang.org/book/ch10-02-traits.html#returning-types-that-implement-traits>
16
17
= note: for information on trait objects, see <https://doc.rust-lang.org/book/ch17-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types>
17
18
@@ -29,6 +30,7 @@ LL | return 1u32;
29
30
|
30
31
= note: to return `impl Trait`, all returned values must be of the same type
31
32
= help: you can instead return a trait object using `Box<dyn std::fmt::Display>`
33
+
= help: alternatively, create a new `enum` with a variant for each returned type
32
34
= note: for information on `impl Trait`, see <https://doc.rust-lang.org/book/ch10-02-traits.html#returning-types-that-implement-traits>
33
35
= note: for information on trait objects, see <https://doc.rust-lang.org/book/ch17-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types>
34
36
@@ -46,6 +48,7 @@ LL | 1u32
46
48
|
47
49
= note: to return `impl Trait`, all returned values must be of the same type
48
50
= help: you can instead return a trait object using `Box<dyn std::fmt::Display>`
51
+
= help: alternatively, create a new `enum` with a variant for each returned type
49
52
= note: for information on `impl Trait`, see <https://doc.rust-lang.org/book/ch10-02-traits.html#returning-types-that-implement-traits>
50
53
= note: for information on trait objects, see <https://doc.rust-lang.org/book/ch17-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types>
51
54
@@ -75,6 +78,7 @@ LL | _ => 1u32,
75
78
|
76
79
= note: to return `impl Trait`, all returned values must be of the same type
77
80
= help: you can instead return a trait object using `Box<dyn std::fmt::Display>`
81
+
= help: alternatively, create a new `enum` with a variant for each returned type
78
82
= note: for information on `impl Trait`, see <https://doc.rust-lang.org/book/ch10-02-traits.html#returning-types-that-implement-traits>
79
83
= note: for information on trait objects, see <https://doc.rust-lang.org/book/ch17-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types>
80
84
@@ -94,6 +98,7 @@ LL | | }
94
98
|
95
99
= note: to return `impl Trait`, all returned values must be of the same type
96
100
= help: you can instead return a trait object using `Box<dyn std::fmt::Display>`
101
+
= help: alternatively, create a new `enum` with a variant for each returned type
97
102
= note: for information on `impl Trait`, see <https://doc.rust-lang.org/book/ch10-02-traits.html#returning-types-that-implement-traits>
98
103
= note: for information on trait objects, see <https://doc.rust-lang.org/book/ch17-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types>
99
104
@@ -111,6 +116,7 @@ LL | 1u32
111
116
|
112
117
= note: to return `impl Trait`, all returned values must be of the same type
113
118
= help: you can instead return a trait object using `Box<dyn std::fmt::Display>`
119
+
= help: alternatively, create a new `enum` with a variant for each returned type
114
120
= note: for information on `impl Trait`, see <https://doc.rust-lang.org/book/ch10-02-traits.html#returning-types-that-implement-traits>
115
121
= note: for information on trait objects, see <https://doc.rust-lang.org/book/ch17-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types>
0 commit comments