diff options
Diffstat (limited to 'src/test/ui/dropck/relate_lt_in_type_outlives_bound.rs')
-rw-r--r-- | src/test/ui/dropck/relate_lt_in_type_outlives_bound.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/dropck/relate_lt_in_type_outlives_bound.rs b/src/test/ui/dropck/relate_lt_in_type_outlives_bound.rs new file mode 100644 index 000000000..42530d317 --- /dev/null +++ b/src/test/ui/dropck/relate_lt_in_type_outlives_bound.rs @@ -0,0 +1,13 @@ +struct Wrapper<'a, T>(&'a T) +where + T: 'a; + +impl<'a, T> Drop for Wrapper<'a, T> +where + T: 'static, + //~^ error: `Drop` impl requires `T: 'static` but the struct it is implemented for does not +{ + fn drop(&mut self) {} +} + +fn main() {} |