Skip to content

Commit 8c9d334

Browse files
committed
clarify/fix up comment in test
1 parent d2b2fb9 commit 8c9d334

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/ui/useless_conversion.fixed

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ mod issue11300 {
228228
// and `[i32; 3]: Helper<()>` is not true (only `std::array::IntoIter<i32, 3>: Helper<()>` is).
229229
foo2::<(), _>([1, 2, 3].into_iter());
230230

231-
// This should lint. `I` gets substituted with `[i32; 3]`, and
232-
// `i32: Helper<[i32, 3]>` is true.
231+
// This should lint. Removing the `.into_iter()` means that `I` gets substituted with `[i32; 3]`, and
232+
// `i32: Helper2<[i32, 3]>` is true, so this call is indeed unncessary.
233233
foo3([1, 2, 3]);
234234
}
235235
}

tests/ui/useless_conversion.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ mod issue11300 {
228228
// and `[i32; 3]: Helper<()>` is not true (only `std::array::IntoIter<i32, 3>: Helper<()>` is).
229229
foo2::<(), _>([1, 2, 3].into_iter());
230230

231-
// This should lint. `I` gets substituted with `[i32; 3]`, and
232-
// `i32: Helper<[i32, 3]>` is true.
231+
// This should lint. Removing the `.into_iter()` means that `I` gets substituted with `[i32; 3]`, and
232+
// `i32: Helper2<[i32, 3]>` is true, so this call is indeed unncessary.
233233
foo3([1, 2, 3].into_iter());
234234
}
235235
}

0 commit comments

Comments
 (0)