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
12 let ips: Vec<_> = (0..100_000).map(|_| u32::from(0u32.into())).collect();
13 //~^ ERROR type annotations needed
16 trait Foo<'a, T: ?Sized> {
17 fn foo(&self) -> Box<T> {
22 trait Bar<'a, T: ?Sized> {
23 fn bar(&self) -> Box<T> {
28 impl Foo<'static, u32> for () {}
29 impl<'a> Foo<'a, i16> for () {}
31 impl<'a> Bar<'static, u32> for &'a () {}
32 impl<'a> Bar<'a, i16> for &'a () {}
35 let _ = ().foo(); //~ ERROR type annotations needed
39 let _ = (&()).bar(); //~ ERROR type annotations needed