]>
git.proxmox.com Git - rustc.git/blob - tests/ui/borrowck/issue-69789-iterator-mut-suggestion.rs
1 // Regression test for #69789: rustc generated an invalid suggestion
2 // when `&` reference from `&mut` iterator is mutated.
5 for item
in &mut std
::iter
::empty
::<&'
static ()>() {
6 //~^ NOTE this iterator yields `&` references
8 //~^ ERROR cannot assign
9 //~| NOTE cannot be written