1 #![allow(bare_trait_objects)]
2 use std::collections::HashMap;
3 use std::cell::RefCell;
5 pub union Foo<'t, 'k> {
11 pub union Qux<'t, 'k, I> {
15 trait Tar<'t, 'k, I> {}
18 static a: RefCell<HashMap<i32, Vec<Vec<Foo>>>> = RefCell::new(HashMap::new());
19 //~^ ERROR missing lifetime specifiers
20 //~| ERROR missing lifetime specifiers
23 static b: RefCell<HashMap<i32, Vec<Vec<&Bar>>>> = RefCell::new(HashMap::new());
24 //~^ ERROR missing lifetime specifier
25 //~| ERROR missing lifetime specifier
26 //~| ERROR missing lifetime specifier
27 //~| ERROR missing lifetime specifier
30 static c: RefCell<HashMap<i32, Vec<Vec<Qux<i32>>>>> = RefCell::new(HashMap::new());
31 //~^ ERROR missing lifetime
32 //~| ERROR missing lifetime
35 static d: RefCell<HashMap<i32, Vec<Vec<&Tar<i32>>>>> = RefCell::new(HashMap::new());
36 //~^ ERROR missing lifetime
37 //~| ERROR missing lifetime
38 //~| ERROR missing lifetime
39 //~| ERROR missing lifetime
43 static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
44 //~^ ERROR this union takes 2 lifetime arguments but 1 lifetime argument
45 //~| ERROR this union takes 2 lifetime arguments but 1 lifetime argument was supplied
46 //~| ERROR this union takes 2 lifetime arguments but 1 lifetime argument was supplied
47 //~| ERROR this union takes 2 lifetime arguments but 1 lifetime argument was supplied
48 //~| ERROR this union takes 2 lifetime arguments but 1 lifetime argument was supplied
51 static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
52 //~^ ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
53 //~| ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
54 //~| ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
55 //~| ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
56 //~| ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
57 //~| ERROR missing lifetime
58 //~| ERROR missing lifetime