]> git.lizzy.rs Git - rust.git/commitdiff
Add test case for deprecated attribute.
authorLuqman Aden <laden@csclub.uwaterloo.ca>
Sun, 9 Dec 2012 08:20:35 +0000 (03:20 -0500)
committerLuqman Aden <laden@csclub.uwaterloo.ca>
Sun, 9 Dec 2012 08:20:35 +0000 (03:20 -0500)
src/test/compile-fail/lint-deprecated-items.rs [new file with mode: 0644]

diff --git a/src/test/compile-fail/lint-deprecated-items.rs b/src/test/compile-fail/lint-deprecated-items.rs
new file mode 100644 (file)
index 0000000..5933ebe
--- /dev/null
@@ -0,0 +1,10 @@
+#[forbid(deprecated_item)];
+
+type Bar = uint;
+
+#[deprecated = "use Bar instead"]
+type Foo = int;
+
+fn main() {
+    let _x: Foo = 21;
+}