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 specifier
20 //~| ERROR missing lifetime specifier
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
28 //~| ERROR the lifetime bound for this object type cannot be deduced from context
29 //~| ERROR the lifetime bound for this object type cannot be deduced from context
32 static c: RefCell<HashMap<i32, Vec<Vec<Qux<i32>>>>> = RefCell::new(HashMap::new());
33 //~^ ERROR missing lifetime specifier
34 //~| ERROR missing lifetime specifier
37 static d: RefCell<HashMap<i32, Vec<Vec<&Tar<i32>>>>> = RefCell::new(HashMap::new());
38 //~^ ERROR missing lifetime specifier
39 //~| ERROR missing lifetime specifier
40 //~| ERROR missing lifetime specifier
41 //~| ERROR missing lifetime specifier
42 //~| ERROR the lifetime bound for this object type cannot be deduced from context
43 //~| ERROR the lifetime bound for this object type cannot be deduced from context
47 static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
48 //~^ ERROR wrong number of lifetime arguments: expected 2, found 1
49 //~| ERROR wrong number of lifetime arguments: expected 2, found 1
50 //~| ERROR wrong number of lifetime arguments: expected 2, found 1
51 //~| ERROR wrong number of lifetime arguments: expected 2, found 1
54 static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
55 //~^ ERROR the lifetime bound for this object type cannot be deduced from context
56 //~| ERROR the lifetime bound for this object type cannot be deduced from context
57 //~| ERROR wrong number of lifetime arguments: expected 2, found 1
58 //~| ERROR wrong number of lifetime arguments: expected 2, found 1
59 //~| ERROR wrong number of lifetime arguments: expected 2, found 1
60 //~| ERROR wrong number of lifetime arguments: expected 2, found 1
61 //~| ERROR missing lifetime specifier
62 //~| ERROR missing lifetime specifier