mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
15 lines
302 B
Rust
15 lines
302 B
Rust
//! <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() {}
|