Skip to content

Commit

Permalink
Add minimal reproducer for ICE in rust-lang#6179
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-Nak committed Feb 13, 2021
1 parent 047f3e1 commit ef53a81
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/ui/use_self.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -458,3 +458,23 @@ mod nested_paths {
}
}
}


/// This is a minimal reproducer for ICE in https://github.com/rust-lang/rust-clippy/pull/6179.
/// The ICE is mainly caused by using `hir_ty_to_ty`. See the discussion in the PR for details.
mod pr6179_ice {
struct Foo {}

impl Foo {
fn foo() -> Self {
impl Foo {
fn bar() {
}
}

let _: _ = 1;

Self {}
}
}
}
20 changes: 20 additions & 0 deletions tests/ui/use_self.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,3 +458,23 @@ mod nested_paths {
}
}
}


/// This is a minimal reproducer for ICE in https://github.com/rust-lang/rust-clippy/pull/6179.
/// The ICE is mainly caused by using `hir_ty_to_ty`. See the discussion in the PR for details.
mod pr6179_ice {
struct Foo {}

impl Foo {
fn foo() -> Self {
impl Foo {
fn bar() {
}
}

let _: _ = 1;

Self {}
}
}
}

0 comments on commit ef53a81

Please sign in to comment.