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 specifiers
25 //~| ERROR missing lifetime specifiers
28 static c: RefCell<HashMap<i32, Vec<Vec<Qux<i32>>>>> = RefCell::new(HashMap::new());
29 //~^ ERROR missing lifetime specifiers
30 //~| ERROR missing lifetime specifiers
33 static d: RefCell<HashMap<i32, Vec<Vec<&Tar<i32>>>>> = RefCell::new(HashMap::new());
34 //~^ ERROR missing lifetime specifiers
35 //~| ERROR missing lifetime specifiers
39 static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
40 //~^ ERROR this union takes 2 lifetime arguments but 1 lifetime argument
41 //~| ERROR this union takes 2 lifetime arguments but 1 lifetime argument was supplied
42 //~| ERROR this union takes 2 lifetime arguments but 1 lifetime argument was supplied
43 //~| ERROR this union takes 2 lifetime arguments but 1 lifetime argument was supplied
44 //~| ERROR this union takes 2 lifetime arguments but 1 lifetime argument was supplied
47 static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
48 //~^ ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
49 //~| ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
50 //~| ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
51 //~| ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
52 //~| ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
53 //~| ERROR missing lifetime
54 //~| ERROR missing lifetime