Skip to content

Remove the unmarked_api feature #38087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 1 addition & 17 deletions src/librustc/middle/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
}
Expand Down
7 changes: 3 additions & 4 deletions src/libsyntax/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)),

Expand Down Expand Up @@ -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! (
Expand Down