rust/tests/ui/for/issue-20605.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
312 B
Rust
Raw Normal View History

2023-06-02 03:26:14 +00:00
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
2023-12-14 12:11:28 +00:00
//@[next] compile-flags: -Znext-solver
2023-06-02 03:26:14 +00:00
fn changer<'a>(mut things: Box<dyn Iterator<Item=&'a mut u8>>) {
for item in *things { *item = 0 }
2024-10-14 17:04:10 +00:00
//~^ ERROR `dyn Iterator<Item = &'a mut u8>` is not an iterator
2023-06-02 03:26:14 +00:00
}
fn main() {}