rust-clippy/tests/ui/crashes/ice-6179.rs

22 lines
442 B
Rust
Raw Normal View History

//! 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)]
2023-03-08 16:31:00 +00:00
#![allow(dead_code, clippy::let_with_type_underscore)]
2022-03-27 12:41:09 +00:00
struct Foo;
impl Foo {
2021-06-25 20:34:45 +00:00
fn new() -> Self {
impl Foo {
fn bar() {}
}
let _: _ = 1;
Self {}
}
}
fn main() {}