Rollup merge of #112165 - fee1-dead-contrib:rn-defualtness, r=compiler-errors
Rename `impl_defaultness` to `defaultness` Since this isn't just about the `impl`.
This commit is contained in:
commit
f121f77d8a
18 changed files with 33 additions and 32 deletions
|
@ -1475,8 +1475,9 @@ rustc_queries! {
|
|||
desc { "getting traits in scope at a block" }
|
||||
}
|
||||
|
||||
query impl_defaultness(def_id: DefId) -> hir::Defaultness {
|
||||
desc { |tcx| "looking up whether `{}` is a default impl", tcx.def_path_str(def_id) }
|
||||
/// Returns whether the impl or associated function has the `default` keyword.
|
||||
query defaultness(def_id: DefId) -> hir::Defaultness {
|
||||
desc { |tcx| "looking up whether `{}` has `default`", tcx.def_path_str(def_id) }
|
||||
separate_provide_extern
|
||||
feedable
|
||||
}
|
||||
|
|
|
@ -228,7 +228,7 @@ impl<'tcx> Ancestors<'tcx> {
|
|||
if let Some(item) = node.item(tcx, trait_item_def_id) {
|
||||
if finalizing_node.is_none() {
|
||||
let is_specializable = item.defaultness(tcx).is_default()
|
||||
|| tcx.impl_defaultness(node.def_id()).is_default();
|
||||
|| tcx.defaultness(node.def_id()).is_default();
|
||||
|
||||
if !is_specializable {
|
||||
finalizing_node = Some(node);
|
||||
|
|
|
@ -48,7 +48,7 @@ impl AssocItem {
|
|||
///
|
||||
/// [`type_of`]: crate::ty::TyCtxt::type_of
|
||||
pub fn defaultness(&self, tcx: TyCtxt<'_>) -> hir::Defaultness {
|
||||
tcx.impl_defaultness(self.def_id)
|
||||
tcx.defaultness(self.def_id)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue