blob: 39fa8ff7a915688624146b1729a37b7d6b3e290a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
//@ check-pass
//! <https://github.com/rust-lang/rust-clippy/issues/9746#issuecomment-1297132880>
trait Trait {}
struct Struct<'a> {
_inner: &'a Struct<'a>,
}
impl Trait for Struct<'_> {}
fn example<'a>(s: &'a Struct) -> Box<Box<dyn Trait + 'a>> {
Box::new(Box::new(Struct { _inner: s }))
}
fn main() {}
|