Add minimal reproducer for ICE in #6179

This commit is contained in:
Yoshitomo Nakanishi 2021-02-13 22:12:59 +09:00
parent 047f3e16bf
commit 87109bb4f5

View File

@ -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() {}