]> git.lizzy.rs Git - rust.git/blob - tests/ui/crashes/issue-825.rs
Merge remote-tracking branch 'upstream/master' into rustup
[rust.git] / tests / ui / crashes / issue-825.rs
1 #![allow(warnings)]
2
3 /// Test for https://github.com/rust-lang/rust-clippy/issues/825
4
5 // this should compile in a reasonable amount of time
6 fn rust_type_id(name: &str) {
7     if "bool" == &name[..]
8         || "uint" == &name[..]
9         || "u8" == &name[..]
10         || "u16" == &name[..]
11         || "u32" == &name[..]
12         || "f32" == &name[..]
13         || "f64" == &name[..]
14         || "i8" == &name[..]
15         || "i16" == &name[..]
16         || "i32" == &name[..]
17         || "i64" == &name[..]
18         || "Self" == &name[..]
19         || "str" == &name[..]
20     {
21         unreachable!();
22     }
23 }
24
25 fn main() {}