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 87109bb
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 87109bb

Please sign in to comment.