Skip to content

Commit

Permalink
Auto merge of rust-lang#6736 - Y-Nak:reproducer-for-use_self-ice, r=f…
Browse files Browse the repository at this point in the history
…lip1995

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
  • Loading branch information
bors committed Feb 13, 2021
2 parents 51aefbd + 87109bb commit 5f611ce
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/ui/crashes/ice-6179.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//! This is a minimal reproducer for the 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.

#![warn(clippy::use_self)]
#![allow(dead_code)]

struct Foo {}

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

let _: _ = 1;

Self {}
}
}

fn main() {}

0 comments on commit 5f611ce

Please sign in to comment.