//@ run-pass #![allow(unused_mut)] #![allow(unused_variables)] fn main() { let mut shrinker: Box> = Box::new(vec![1].into_iter()); println!("{:?}", shrinker.next()); for v in shrinker { assert!(false); } let mut shrinker: &mut dyn Iterator = &mut vec![1].into_iter(); println!("{:?}", shrinker.next()); for v in shrinker { assert!(false); } }