rust/tests/ui/single-use-lifetime/derive-eq.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
205 B
Rust
Raw Normal View History

//@ 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() {}