]> git.lizzy.rs Git - rust.git/blob - tests/issue-825.rs
Support `ExprType` (type ascription) comparison
[rust.git] / tests / issue-825.rs
1 #![feature(plugin)]
2 #![plugin(clippy)]
3
4 #![allow(warnings)]
5
6 // this should compile in a reasonable amount of time
7 fn rust_type_id(name: String) {
8     if "bool" == &name[..] ||
9         "uint" == &name[..] ||
10         "u8" == &name[..] ||
11         "u16" == &name[..] ||
12         "u32" == &name[..] ||
13         "f32" == &name[..] ||
14         "f64" == &name[..] ||
15         "i8" == &name[..] ||
16         "i16" == &name[..] ||
17         "i32" == &name[..] ||
18         "i64" == &name[..] ||
19         "Self" == &name[..] ||
20         "str" == &name[..] {
21         unreachable!();
22     }
23 }
24
25 fn main() {}