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
= note: try using `<*const T>::as_ref()` to get a reference to the type behind the pointer: https://doc.rust-lang.org/std/primitive.pointer.html#method.as_ref
8
8
= note: using `<*const T>::as_ref()` on a pointer which is unaligned or points to invalid or uninitialized memory is undefined behavior
9
9
= note: the method `to_string` exists but the following trait bounds were not satisfied:
Copy file name to clipboardExpand all lines: src/test/ui/issues/issue-31173.stderr
+12-7Lines changed: 12 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,26 @@
1
-
error[E0271]: type mismatch resolving `<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]> as std::iter::Iterator>::Item == &_`
2
-
--> $DIR/issue-31173.rs:10:10
1
+
error[E0271]: type mismatch resolving `<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:10:39: 13:6 found_e:_]> as std::iter::Iterator>::Item == &_`
2
+
--> $DIR/issue-31173.rs:14:10
3
3
|
4
4
LL | .cloned()
5
5
| ^^^^^^ expected `u8`, found reference
6
6
|
7
7
= note: expected type `u8`
8
8
found reference `&_`
9
9
10
-
error[E0599]: no method named `collect` found for struct `std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>` in the current scope
11
-
--> $DIR/issue-31173.rs:14:10
10
+
error[E0599]: no method named `collect` found for struct `std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:10:39: 13:6 found_e:_]>>` in the current scope
11
+
--> $DIR/issue-31173.rs:18:10
12
12
|
13
13
LL | .collect();
14
-
| ^^^^^^^ method not found in `std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>`
14
+
| ^^^^^^^ method not found in `std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:10:39: 13:6 found_e:_]>>`
15
+
|
16
+
::: $SRC_DIR/libcore/iter/adapters/mod.rs:LL:COL
17
+
|
18
+
LL | pub struct Cloned<I> {
19
+
| -------------------- this type doesn't satisfy the bound `std::iter::Iterator`
15
20
|
16
21
= note: the method `collect` exists but the following trait bounds were not satisfied:
0 commit comments