1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
13 use std::string as i16;
17 fn f<f64>(f64: f64) {}
18 //~^ ERROR user-defined types or type parameters cannot shadow the primitive types
19 type u16 = u16; //~ ERROR user-defined types or type parameters cannot shadow the primitive types
20 enum u32 {} //~ ERROR user-defined types or type parameters cannot shadow the primitive types
21 struct u64; //~ ERROR user-defined types or type parameters cannot shadow the primitive types
22 trait bool {} //~ ERROR user-defined types or type parameters cannot shadow the primitive types
29 fn f_<f64_>(f64: f64_) {}
38 use super::i32_ as i32;
39 use super::i64_ as i64;
42 use super::u16_ as u16;
43 //~^ ERROR user-defined types or type parameters cannot shadow the primitive types
44 use super::u32_ as u32;
45 //~^ ERROR user-defined types or type parameters cannot shadow the primitive types
46 use super::u64_ as u64;
47 //~^ ERROR user-defined types or type parameters cannot shadow the primitive types
48 use super::bool_ as bool;
49 //~^ ERROR user-defined types or type parameters cannot shadow the primitive types
50 use super::{bool_ as str};
51 //~^ ERROR user-defined types or type parameters cannot shadow the primitive types
52 use super::char_ as char;
57 type isize; //~ ERROR user-defined types or type parameters cannot shadow the primitive types
60 fn usize<'usize>(usize: &'usize usize) -> &'usize usize { usize }
65 str @ true => if str { i32 as i64 } else { i64 },