rust/src/test/compile-fail/prim-with-args.rs
Niko Matsakis 825fd1808e lots of work to make iface/impls parameterized by regions
- paths can now take region parameters, replacing the dirty hack
  I was doing before of abusing vstores.  vstores are now a bit
  of a hack though.

- fix various small bugs:
  - we never checked that iface types were compatible when casting
    to an iface with `as`
  - we allowed nonsense like int<int>
  - and more! (actually that may be it)
2012-04-25 19:26:56 -07:00

30 lines
1.7 KiB
Rust

fn main() {
let x: int<int>; //! ERROR Type parameters are not allowed on this type.
let x: i8<int>; //! ERROR Type parameters are not allowed on this type.
let x: i16<int>; //! ERROR Type parameters are not allowed on this type.
let x: i32<int>; //! ERROR Type parameters are not allowed on this type.
let x: i64<int>; //! ERROR Type parameters are not allowed on this type.
let x: uint<int>; //! ERROR Type parameters are not allowed on this type.
let x: u8<int>; //! ERROR Type parameters are not allowed on this type.
let x: u16<int>; //! ERROR Type parameters are not allowed on this type.
let x: u32<int>; //! ERROR Type parameters are not allowed on this type.
let x: u64<int>; //! ERROR Type parameters are not allowed on this type.
let x: float<int>; //! ERROR Type parameters are not allowed on this type.
let x: char<int>; //! ERROR Type parameters are not allowed on this type.
let x: int/&; //! ERROR Region parameters are not allowed on this type.
let x: i8/&; //! ERROR Region parameters are not allowed on this type.
let x: i16/&; //! ERROR Region parameters are not allowed on this type.
let x: i32/&; //! ERROR Region parameters are not allowed on this type.
let x: i64/&; //! ERROR Region parameters are not allowed on this type.
let x: uint/&; //! ERROR Region parameters are not allowed on this type.
let x: u8/&; //! ERROR Region parameters are not allowed on this type.
let x: u16/&; //! ERROR Region parameters are not allowed on this type.
let x: u32/&; //! ERROR Region parameters are not allowed on this type.
let x: u64/&; //! ERROR Region parameters are not allowed on this type.
let x: float/&; //! ERROR Region parameters are not allowed on this type.
let x: char/&; //! ERROR Region parameters are not allowed on this type.
}