Skip to content

Commit 2ddaf82

Browse files
committed
Add tests for unused-features
1 parent db5a858 commit 2ddaf82

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//@ check-pass
2+
3+
#![crate_type = "lib"]
4+
#![allow(unused_features)]
5+
6+
#![feature(unboxed_closures)]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#![crate_type = "lib"]
2+
#![deny(unused_features)]
3+
4+
#![feature(unboxed_closures)] //~ ERROR feature `unboxed_closures` is declared but not used
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error: feature `unboxed_closures` is declared but not used
2+
--> $DIR/deny-unused-features.rs:4:12
3+
|
4+
LL | #![feature(unboxed_closures)]
5+
| ^^^^^^^^^^^^^^^^
6+
|
7+
note: the lint level is defined here
8+
--> $DIR/deny-unused-features.rs:2:9
9+
|
10+
LL | #![deny(unused_features)]
11+
| ^^^^^^^^^^^^^^^
12+
13+
error: aborting due to 1 previous error
14+

0 commit comments

Comments
 (0)