Rename #[deprecated] to #[rustc_deprecated]
This commit is contained in:
@@ -381,7 +381,7 @@ pub fn cfg_matches(diagnostic: &SpanHandler, cfgs: &[P<MetaItem>], cfg: &ast::Me
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents the #[stable], #[unstable] and #[deprecated] attributes.
|
||||
/// Represents the #[stable], #[unstable] and #[rustc_deprecated] attributes.
|
||||
#[derive(RustcEncodable, RustcDecodable, Clone, Debug, PartialEq, Eq, Hash)]
|
||||
pub struct Stability {
|
||||
pub level: StabilityLevel,
|
||||
@@ -420,7 +420,7 @@ fn find_stability_generic<'a, I>(diagnostic: &SpanHandler,
|
||||
'outer: for attr in attrs_iter {
|
||||
let tag = attr.name();
|
||||
let tag = &*tag;
|
||||
if tag != "deprecated" && tag != "unstable" && tag != "stable" {
|
||||
if tag != "rustc_deprecated" && tag != "unstable" && tag != "stable" {
|
||||
continue // not a stability level
|
||||
}
|
||||
|
||||
@@ -443,9 +443,9 @@ fn find_stability_generic<'a, I>(diagnostic: &SpanHandler,
|
||||
};
|
||||
|
||||
match tag {
|
||||
"deprecated" => {
|
||||
"rustc_deprecated" => {
|
||||
if depr.is_some() {
|
||||
diagnostic.span_err(item_sp, "multiple deprecated attributes");
|
||||
diagnostic.span_err(item_sp, "multiple rustc_deprecated attributes");
|
||||
break
|
||||
}
|
||||
|
||||
@@ -586,7 +586,7 @@ fn find_stability_generic<'a, I>(diagnostic: &SpanHandler,
|
||||
}
|
||||
stab.depr = Some(depr);
|
||||
} else {
|
||||
diagnostic.span_err(item_sp, "deprecated attribute must be paired with \
|
||||
diagnostic.span_err(item_sp, "rustc_deprecated attribute must be paired with \
|
||||
either stable or unstable attribute");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -600,7 +600,7 @@ impl<'a> ExtCtxt<'a> {
|
||||
}
|
||||
|
||||
#[unstable(feature = "rustc_private", issue = "0")]
|
||||
#[deprecated(since = "1.0.0",
|
||||
#[rustc_deprecated(since = "1.0.0",
|
||||
reason = "Replaced with `expander().fold_expr()`")]
|
||||
pub fn expand_expr(&mut self, e: P<ast::Expr>) -> P<ast::Expr> {
|
||||
self.expander().fold_expr(e)
|
||||
|
||||
@@ -370,7 +370,7 @@ pub const KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeGat
|
||||
|
||||
// FIXME: #14407 these are only looked at on-demand so we can't
|
||||
// guarantee they'll have already been checked
|
||||
("deprecated", Whitelisted, Ungated),
|
||||
("rustc_deprecated", Whitelisted, Ungated),
|
||||
("must_use", Whitelisted, Ungated),
|
||||
("stable", Whitelisted, Ungated),
|
||||
("unstable", Whitelisted, Ungated),
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||
test(attr(deny(warnings))))]
|
||||
|
||||
#![cfg_attr(stage0, feature(rustc_attrs))]
|
||||
#![cfg_attr(stage0, allow(unused_attributes))]
|
||||
#![feature(associated_consts)]
|
||||
#![feature(drain)]
|
||||
#![feature(filling_drop)]
|
||||
|
||||
@@ -129,7 +129,7 @@ impl<T> SmallVector<T> {
|
||||
|
||||
/// Deprecated: use `into_iter`.
|
||||
#[unstable(feature = "rustc_private", issue = "0")]
|
||||
#[deprecated(since = "1.0.0", reason = "use into_iter")]
|
||||
#[rustc_deprecated(since = "1.0.0", reason = "use into_iter")]
|
||||
pub fn move_iter(self) -> IntoIter<T> {
|
||||
self.into_iter()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user