-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #9773 - Alexendoo:ice-9746, r=Manishearth
Fix ICE in `redundant_allocation` changelog: Fix ICE in `redundant_allocation` Closes #9746, the original issue was fixed already, this gets the one in #9746 (comment)
- Loading branch information
Showing
2 changed files
with
20 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//! <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() {} |