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