From 4687476470d383fefe62ac9cde4e6f9015ba550f Mon Sep 17 00:00:00 2001 From: varkor Date: Mon, 6 Aug 2018 16:46:08 +0100 Subject: [PATCH] Special-case "test" feature --- src/librustc/middle/stability.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/librustc/middle/stability.rs b/src/librustc/middle/stability.rs index 7fd788ff2eaf..0aa532fd9a46 100644 --- a/src/librustc/middle/stability.rs +++ b/src/librustc/middle/stability.rs @@ -838,8 +838,12 @@ pub fn check_unused_or_stable_features<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) { } // `stdbuild` has special handling for `libc`, so we need to // recognise the feature when building std. + // Likewise, libtest is handled specially, so `test` isn't + // available as we'd like it to be. // FIXME: only remove `libc` when `stdbuild` is active. + // FIXME: remove special casing for `test`. remaining_lib_features.remove(&Symbol::intern("libc")); + remaining_lib_features.remove(&Symbol::intern("test")); for (feature, stable) in tcx.lib_features().to_vec() { if let Some(since) = stable {