Skip to content

Commit 87109bb

Browse files
committed
Add minimal reproducer for ICE in #6179
1 parent 047f3e1 commit 87109bb

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/ui/crashes/ice-6179.rs

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//! This is a minimal reproducer for the ICE in https://github.com/rust-lang/rust-clippy/pull/6179.
2+
//! The ICE is mainly caused by using `hir_ty_to_ty`. See the discussion in the PR for details.
3+
4+
#![warn(clippy::use_self)]
5+
#![allow(dead_code)]
6+
7+
struct Foo {}
8+
9+
impl Foo {
10+
fn foo() -> Self {
11+
impl Foo {
12+
fn bar() {}
13+
}
14+
15+
let _: _ = 1;
16+
17+
Self {}
18+
}
19+
}
20+
21+
fn main() {}

0 commit comments

Comments
 (0)