Skip to content

Commit 5f611ce

Browse files
committed
Auto merge of rust-lang#6736 - Y-Nak:reproducer-for-use_self-ice, r=flip1995
Add a minimal reproducer for the ICE in rust-lang#6179 This PR is an auxiliary PR for rust-lang#6179, just add a minimal reproducer for the ICE discussed in rust-lang#6179. See rust-lang#6179 for more details. changelog: none
2 parents 51aefbd + 87109bb commit 5f611ce

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/ui/crashes/ice-6179.rs

Lines changed: 21 additions & 0 deletions
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)