about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohannes Oertel <johannes.oertel@uni-due.de>2016-11-30 15:23:11 +0100
committerJohannes Oertel <johannes.oertel@uni-due.de>2016-11-30 15:51:04 +0100
commit7cbd18a690da89251390db373d499b1770f20753 (patch)
tree0fc7115cc9164b22a28c73ef7f031dacbce14611
parent3abaf43f770a8bae23da474690e3841041219029 (diff)
downloadrust-7cbd18a690da89251390db373d499b1770f20753.tar.gz
rust-7cbd18a690da89251390db373d499b1770f20753.zip
Remove the `unmarked_api` feature
Closes #37981.
-rw-r--r--src/doc/reference.md5
-rw-r--r--src/librustc/middle/stability.rs18
-rw-r--r--src/libsyntax/feature_gate.rs7
3 files changed, 4 insertions, 26 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md
index 4fbe5183967..fe0507fd4a5 100644
--- a/src/doc/reference.md
+++ b/src/doc/reference.md
@@ -2462,11 +2462,6 @@ The currently implemented features of the reference compiler are:
 * `unboxed_closures` - Rust's new closure design, which is currently a work in
                        progress feature with many known bugs.
 
-* `unmarked_api` - Allows use of items within a `#![staged_api]` crate
-                   which have not been marked with a stability marker.
-                   Such items should not be allowed by the compiler to exist,
-                   so if you need this there probably is a compiler bug.
-
 * `allow_internal_unstable` - Allows `macro_rules!` macros to be tagged with the
                               `#[allow_internal_unstable]` attribute, designed
                               to allow `std` macros to call
diff --git a/src/librustc/middle/stability.rs b/src/librustc/middle/stability.rs
index f3890f1c3b7..3e32957aecf 100644
--- a/src/librustc/middle/stability.rs
+++ b/src/librustc/middle/stability.rs
@@ -513,23 +513,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
                 // handled by the lint emitting logic above.
             }
             None => {
-                // This is an 'unmarked' API, which should not exist
-                // in the standard library.
-                if self.sess.features.borrow().unmarked_api {
-                    self.sess.struct_span_warn(span, "use of unmarked library feature")
-                             .span_note(span, "this is either a bug in the library you are \
-                                               using or a bug in the compiler - please \
-                                               report it in both places")
-                             .emit()
-                } else {
-                    self.sess.struct_span_err(span, "use of unmarked library feature")
-                             .span_note(span, "this is either a bug in the library you are \
-                                               using or a bug in the compiler - please \
-                                               report it in both places")
-                             .span_note(span, "use #![feature(unmarked_api)] in the \
-                                               crate attributes to override this")
-                             .emit()
-                }
+                span_bug!(span, "encountered unmarked API");
             }
         }
     }
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index aa6a29b78b0..52374f232de 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -153,10 +153,6 @@ declare_features! (
     // rustc internal
     (active, staged_api, "1.0.0", None),
 
-    // Allows using items which are missing stability attributes
-    // rustc internal
-    (active, unmarked_api, "1.0.0", None),
-
     // Allows using #![no_core]
     (active, no_core, "1.3.0", Some(29639)),
 
@@ -330,6 +326,9 @@ declare_features! (
     (removed, test_removed_feature, "1.0.0", None),
     (removed, visible_private_types, "1.0.0", None),
     (removed, unsafe_no_drop_flag, "1.0.0", None),
+    // Allows using items which are missing stability attributes
+    // rustc internal
+    (removed, unmarked_api, "1.0.0", None),
 );
 
 declare_features! (