diff options
| -rw-r--r-- | src/test/compile-fail/enable-unstable-lib-feature.rs | 23 | ||||
| -rw-r--r-- | src/test/compile-fail/lint-unknown-feature-default.rs | 15 |
2 files changed, 38 insertions, 0 deletions
diff --git a/src/test/compile-fail/enable-unstable-lib-feature.rs b/src/test/compile-fail/enable-unstable-lib-feature.rs new file mode 100644 index 00000000000..a5c09725817 --- /dev/null +++ b/src/test/compile-fail/enable-unstable-lib-feature.rs @@ -0,0 +1,23 @@ +// Copyright 2012 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. + +// Test that enabling an unstable feature disables warnings + +// aux-build:stability_cfg2.rs + +#![feature(unnamed_feature)] +#![deny(non_snake_case)] // To trigger a hard error + +// Shouldn't generate a warning about unstable features +extern crate stability_cfg2; + +pub fn BOGUS() { } //~ ERROR + +pub fn main() { } diff --git a/src/test/compile-fail/lint-unknown-feature-default.rs b/src/test/compile-fail/lint-unknown-feature-default.rs new file mode 100644 index 00000000000..d5e9cc630c3 --- /dev/null +++ b/src/test/compile-fail/lint-unknown-feature-default.rs @@ -0,0 +1,15 @@ +// Copyright 2013 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. + +// Tests the default for the unused_features lint + +#![feature(this_is_not_a_feature)] //~ ERROR: unused or unknown feature + +fn main() { } |
