Remove TyCtxt::get_attrs_unchecked.
It's identical to `TyCtxt::get_all_attrs` except it takes `DefId` instead of `impl Into<DefIf>`.
This commit is contained in:
parent
86ff11e729
commit
c78d589243
3 changed files with 3 additions and 3 deletions
|
|
@ -185,7 +185,7 @@ impl<'a, 'tcx> SigDropChecker<'a, 'tcx> {
|
|||
if let Some(adt) = ty.ty_adt_def()
|
||||
&& get_attr(
|
||||
self.cx.sess(),
|
||||
self.cx.tcx.get_attrs_unchecked(adt.did()),
|
||||
self.cx.tcx.get_all_attrs(adt.did()),
|
||||
sym::has_significant_drop,
|
||||
)
|
||||
.count()
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ impl<'cx, 'others, 'tcx> AttrChecker<'cx, 'others, 'tcx> {
|
|||
if let Some(adt) = ty.ty_adt_def() {
|
||||
let mut iter = get_attr(
|
||||
self.cx.sess(),
|
||||
self.cx.tcx.get_attrs_unchecked(adt.did()),
|
||||
self.cx.tcx.get_all_attrs(adt.did()),
|
||||
sym::has_significant_drop,
|
||||
);
|
||||
if iter.next().is_some() {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ pub fn is_format_macro(cx: &LateContext<'_>, macro_def_id: DefId) -> bool {
|
|||
} else {
|
||||
// Allow users to tag any macro as being format!-like
|
||||
// TODO: consider deleting FORMAT_MACRO_DIAG_ITEMS and using just this method
|
||||
get_unique_attr(cx.sess(), cx.tcx.get_attrs_unchecked(macro_def_id), sym::format_args).is_some()
|
||||
get_unique_attr(cx.sess(), cx.tcx.get_all_attrs(macro_def_id), sym::format_args).is_some()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue