about summary refs log tree commit diff
path: root/src/liballoc/tests
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-08-06 16:58:27 +0000
committerbors <bors@rust-lang.org>2018-08-06 16:58:27 +0000
commitb2397437530eecef72a1524a7e0a4b42034fa360 (patch)
tree429466887a0f431e3586e4985775d268dd2374f1 /src/liballoc/tests
parent4b8089daf8046d7999310d44e5c68ccff4ab255a (diff)
parent4687476470d383fefe62ac9cde4e6f9015ba550f (diff)
downloadrust-b2397437530eecef72a1524a7e0a4b42034fa360.tar.gz
rust-b2397437530eecef72a1524a7e0a4b42034fa360.zip
Auto merge of #52644 - varkor:lib-feature-gate-2, r=withoutboats
Add errors for unknown, stable and duplicate feature attributes

- Adds an error for unknown (lang and lib) features.
- Extends the lint for unnecessary feature attributes for stable features to libs features (this already exists for lang features).
- Adds an error for duplicate (lang and lib) features.

```rust
#![feature(fake_feature)] //~ ERROR unknown feature `fake_feature`

#![feature(i128_type)] //~ WARNING the feature `i128_type` has been stable since 1.26.0

#![feature(non_exhaustive)]
#![feature(non_exhaustive)] //~ ERROR duplicate `non_exhaustive` feature attribute
```

Fixes #52053, fixes #53032 and address some of the problems noted in #44232 (though not unused features).

There are a few outstanding problems, that I haven't narrowed down yet:
- [x] Stability attributes on macros do not seem to be taken into account.
- [x] Stability attributes behind `cfg` attributes are not taken into account.
- [x] There are failing incremental tests.
Diffstat (limited to 'src/liballoc/tests')
-rw-r--r--src/liballoc/tests/lib.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/liballoc/tests/lib.rs b/src/liballoc/tests/lib.rs
index 618aff963f2..c12c7a81f79 100644
--- a/src/liballoc/tests/lib.rs
+++ b/src/liballoc/tests/lib.rs
@@ -16,11 +16,8 @@
 #![feature(drain_filter)]
 #![feature(exact_size_is_empty)]
 #![feature(pattern)]
-#![feature(rand)]
 #![feature(slice_sort_by_cached_key)]
-#![feature(splice)]
 #![feature(str_escape)]
-#![feature(string_retain)]
 #![feature(try_reserve)]
 #![feature(unboxed_closures)]
 #![feature(exact_chunks)]