1 use std::collections::HashMap;
4 let descr = String::new();
5 let mut opts = HashMap::<String, ()>::new();
6 let opt = String::new();
8 opts.get(opt.as_ref()); //~ ERROR type annotations needed
9 //~^ ERROR type annotations needed
13 let ips: Vec<_> = (0..100_000).map(|_| u32::from(0u32.into())).collect();
14 //~^ ERROR type annotations needed
17 trait Foo<'a, T: ?Sized> {
18 fn foo(&self) -> Box<T> {
23 trait Bar<'a, T: ?Sized> {
24 fn bar(&self) -> Box<T> {
29 impl Foo<'static, u32> for () {}
30 impl<'a> Foo<'a, i16> for () {}
32 impl<'a> Bar<'static, u32> for &'a () {}
33 impl<'a> Bar<'a, i16> for &'a () {}
36 let _ = ().foo(); //~ ERROR type annotations needed
40 let _ = (&()).bar(); //~ ERROR type annotations needed