diff options
Diffstat (limited to 'tests/ui/regions/regions-in-structs.rs')
-rw-r--r-- | tests/ui/regions/regions-in-structs.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/regions/regions-in-structs.rs b/tests/ui/regions/regions-in-structs.rs new file mode 100644 index 000000000..71f718ba2 --- /dev/null +++ b/tests/ui/regions/regions-in-structs.rs @@ -0,0 +1,15 @@ +struct Yes1<'a> { + x: &'a usize, +} + +struct Yes2<'a> { + x: &'a usize, +} + +struct StructDecl { + a: &'a isize, //~ ERROR use of undeclared lifetime name `'a` + b: &'a isize, //~ ERROR use of undeclared lifetime name `'a` +} + + +fn main() {} |