Remove handling of #[rustc_deprecated]
This commit is contained in:
parent
1f709d5446
commit
3c376e5be8
@ -274,6 +274,7 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
|
|||||||
ungated!(feature, CrateLevel, template!(List: "name1, name1, ...")),
|
ungated!(feature, CrateLevel, template!(List: "name1, name1, ...")),
|
||||||
// FIXME(#14407) -- only looked at on-demand so we can't
|
// FIXME(#14407) -- only looked at on-demand so we can't
|
||||||
// guarantee they'll have already been checked.
|
// guarantee they'll have already been checked.
|
||||||
|
// FIXME(jhpratt) remove this when #[rustc_deprecated] is fully removed from the compiler
|
||||||
ungated!(
|
ungated!(
|
||||||
rustc_deprecated, AssumedUsed,
|
rustc_deprecated, AssumedUsed,
|
||||||
template!(List: r#"since = "version", reason = "...""#)
|
template!(List: r#"since = "version", reason = "...""#)
|
||||||
|
@ -67,7 +67,7 @@ impl<'a> RenderContext<'a> {
|
|||||||
|
|
||||||
fn is_deprecated(&self, def: impl HasAttrs) -> bool {
|
fn is_deprecated(&self, def: impl HasAttrs) -> bool {
|
||||||
let attrs = def.attrs(self.db());
|
let attrs = def.attrs(self.db());
|
||||||
attrs.by_key("deprecated").exists() || attrs.by_key("rustc_deprecated").exists()
|
attrs.by_key("deprecated").exists()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_deprecated_assoc_item(&self, as_assoc_item: impl AsAssocItem) -> bool {
|
fn is_deprecated_assoc_item(&self, as_assoc_item: impl AsAssocItem) -> bool {
|
||||||
@ -675,8 +675,6 @@ fn main() { let _: m::Spam = S$0 }
|
|||||||
r#"
|
r#"
|
||||||
#[deprecated]
|
#[deprecated]
|
||||||
fn something_deprecated() {}
|
fn something_deprecated() {}
|
||||||
#[rustc_deprecated(since = "1.0.0")]
|
|
||||||
fn something_else_deprecated() {}
|
|
||||||
|
|
||||||
fn main() { som$0 }
|
fn main() { som$0 }
|
||||||
"#,
|
"#,
|
||||||
@ -685,8 +683,8 @@ fn main() { som$0 }
|
|||||||
[
|
[
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
label: "main()",
|
label: "main()",
|
||||||
source_range: 127..130,
|
source_range: 56..59,
|
||||||
delete: 127..130,
|
delete: 56..59,
|
||||||
insert: "main()$0",
|
insert: "main()$0",
|
||||||
kind: SymbolKind(
|
kind: SymbolKind(
|
||||||
Function,
|
Function,
|
||||||
@ -696,8 +694,8 @@ fn main() { som$0 }
|
|||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
label: "something_deprecated()",
|
label: "something_deprecated()",
|
||||||
source_range: 127..130,
|
source_range: 56..59,
|
||||||
delete: 127..130,
|
delete: 56..59,
|
||||||
insert: "something_deprecated()$0",
|
insert: "something_deprecated()$0",
|
||||||
kind: SymbolKind(
|
kind: SymbolKind(
|
||||||
Function,
|
Function,
|
||||||
@ -706,18 +704,6 @@ fn main() { som$0 }
|
|||||||
detail: "fn()",
|
detail: "fn()",
|
||||||
deprecated: true,
|
deprecated: true,
|
||||||
},
|
},
|
||||||
CompletionItem {
|
|
||||||
label: "something_else_deprecated()",
|
|
||||||
source_range: 127..130,
|
|
||||||
delete: 127..130,
|
|
||||||
insert: "something_else_deprecated()$0",
|
|
||||||
kind: SymbolKind(
|
|
||||||
Function,
|
|
||||||
),
|
|
||||||
lookup: "something_else_deprecated",
|
|
||||||
detail: "fn()",
|
|
||||||
deprecated: true,
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
"#]],
|
"#]],
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user