2015-01-08 21:16:35 +11:00
|
|
|
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
|
|
|
#![allow(dead_code)]
|
|
|
|
|
|
|
|
mod u {
|
2015-01-08 22:02:42 +11:00
|
|
|
type X = usize; //~ WARN the `usize` type is deprecated
|
2015-01-08 21:16:35 +11:00
|
|
|
struct Foo {
|
2015-01-08 22:02:42 +11:00
|
|
|
x: usize //~ WARN the `usize` type is deprecated
|
2015-01-08 21:16:35 +11:00
|
|
|
}
|
2015-01-08 22:02:42 +11:00
|
|
|
fn bar(x: usize) { //~ WARN the `usize` type is deprecated
|
2015-01-08 22:05:56 +11:00
|
|
|
1us; //~ WARN the `u` suffix on integers is deprecated
|
2015-01-08 21:16:35 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
mod i {
|
2015-01-08 21:54:35 +11:00
|
|
|
type X = isize; //~ WARN the `isize` type is deprecated
|
2015-01-08 21:16:35 +11:00
|
|
|
struct Foo {
|
2015-01-08 21:54:35 +11:00
|
|
|
x: isize //~ WARN the `isize` type is deprecated
|
2015-01-08 21:16:35 +11:00
|
|
|
}
|
2015-01-08 21:54:35 +11:00
|
|
|
fn bar(x: isize) { //~ WARN the `isize` type is deprecated
|
2015-01-08 22:05:56 +11:00
|
|
|
1is; //~ WARN the `u` suffix on integers is deprecated
|
2015-01-08 21:16:35 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
// make compilation fail, after feature gating
|
|
|
|
let () = 1u8; //~ ERROR
|
|
|
|
}
|