Skip to content

Commit 341f084

Browse files
committed
Auto merge of #38087 - jooert:remove_unmarked, r=petrochenkov
Remove the `unmarked_api` feature Closes #37981.
2 parents 2190f6c + 7cbd18a commit 341f084

File tree

3 files changed

+4
-26
lines changed

3 files changed

+4
-26
lines changed

src/doc/reference.md

-5
Original file line numberDiff line numberDiff line change
@@ -2463,11 +2463,6 @@ The currently implemented features of the reference compiler are:
24632463
* `unboxed_closures` - Rust's new closure design, which is currently a work in
24642464
progress feature with many known bugs.
24652465

2466-
* `unmarked_api` - Allows use of items within a `#![staged_api]` crate
2467-
which have not been marked with a stability marker.
2468-
Such items should not be allowed by the compiler to exist,
2469-
so if you need this there probably is a compiler bug.
2470-
24712466
* `allow_internal_unstable` - Allows `macro_rules!` macros to be tagged with the
24722467
`#[allow_internal_unstable]` attribute, designed
24732468
to allow `std` macros to call

src/librustc/middle/stability.rs

+1-17
Original file line numberDiff line numberDiff line change
@@ -513,23 +513,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
513513
// handled by the lint emitting logic above.
514514
}
515515
None => {
516-
// This is an 'unmarked' API, which should not exist
517-
// in the standard library.
518-
if self.sess.features.borrow().unmarked_api {
519-
self.sess.struct_span_warn(span, "use of unmarked library feature")
520-
.span_note(span, "this is either a bug in the library you are \
521-
using or a bug in the compiler - please \
522-
report it in both places")
523-
.emit()
524-
} else {
525-
self.sess.struct_span_err(span, "use of unmarked library feature")
526-
.span_note(span, "this is either a bug in the library you are \
527-
using or a bug in the compiler - please \
528-
report it in both places")
529-
.span_note(span, "use #![feature(unmarked_api)] in the \
530-
crate attributes to override this")
531-
.emit()
532-
}
516+
span_bug!(span, "encountered unmarked API");
533517
}
534518
}
535519
}

src/libsyntax/feature_gate.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,6 @@ declare_features! (
153153
// rustc internal
154154
(active, staged_api, "1.0.0", None),
155155

156-
// Allows using items which are missing stability attributes
157-
// rustc internal
158-
(active, unmarked_api, "1.0.0", None),
159-
160156
// Allows using #![no_core]
161157
(active, no_core, "1.3.0", Some(29639)),
162158

@@ -333,6 +329,9 @@ declare_features! (
333329
(removed, test_removed_feature, "1.0.0", None),
334330
(removed, visible_private_types, "1.0.0", None),
335331
(removed, unsafe_no_drop_flag, "1.0.0", None),
332+
// Allows using items which are missing stability attributes
333+
// rustc internal
334+
(removed, unmarked_api, "1.0.0", None),
336335
);
337336

338337
declare_features! (

0 commit comments

Comments
 (0)