2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(unused_mut)]
|
|
|
|
#![allow(unused_variables)]
|
2015-01-19 08:48:05 -06:00
|
|
|
fn main() {
|
2019-05-28 13:47:21 -05:00
|
|
|
let mut shrinker: Box<dyn Iterator<Item=i32>> = Box::new(vec![1].into_iter());
|
2015-01-19 08:48:05 -06:00
|
|
|
println!("{:?}", shrinker.next());
|
|
|
|
for v in shrinker { assert!(false); }
|
|
|
|
|
2019-05-28 13:47:21 -05:00
|
|
|
let mut shrinker: &mut dyn Iterator<Item=i32> = &mut vec![1].into_iter();
|
2015-01-19 08:48:05 -06:00
|
|
|
println!("{:?}", shrinker.next());
|
|
|
|
for v in shrinker { assert!(false); }
|
|
|
|
}
|