diff options
Diffstat (limited to 'src/test/ui/single-use-lifetime')
-rw-r--r-- | src/test/ui/single-use-lifetime/derive-eq.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/single-use-lifetime/derive-eq.rs b/src/test/ui/single-use-lifetime/derive-eq.rs new file mode 100644 index 000000000..e5bdfc55d --- /dev/null +++ b/src/test/ui/single-use-lifetime/derive-eq.rs @@ -0,0 +1,11 @@ +// check-pass + +#![deny(single_use_lifetimes)] + +#[derive(PartialEq, Eq)] +struct Foo<'a, T> { + /// a reference to the underlying secret data that will be derefed + pub data: &'a mut T, +} + +fn main() {} |