Rename impl_defaultness
to defaultness
This commit is contained in:
parent
ba1690bedd
commit
21bc5cded4
18 changed files with 33 additions and 32 deletions
|
@ -704,7 +704,7 @@ pub(super) fn check_specialization_validity<'tcx>(
|
|||
// grandparent. In that case, if parent is a `default impl`, inherited items use the
|
||||
// "defaultness" from the grandparent, else they are final.
|
||||
None => {
|
||||
if tcx.impl_defaultness(parent_impl.def_id()).is_default() {
|
||||
if tcx.defaultness(parent_impl.def_id()).is_default() {
|
||||
None
|
||||
} else {
|
||||
Some(Err(parent_impl.def_id()))
|
||||
|
@ -803,7 +803,7 @@ fn check_impl_items_against_trait<'tcx>(
|
|||
.as_ref()
|
||||
.is_some_and(|node_item| node_item.item.defaultness(tcx).has_value());
|
||||
|
||||
if !is_implemented && tcx.impl_defaultness(impl_id).is_final() {
|
||||
if !is_implemented && tcx.defaultness(impl_id).is_final() {
|
||||
missing_items.push(tcx.associated_item(trait_item_id));
|
||||
}
|
||||
|
||||
|
|
|
@ -941,7 +941,7 @@ fn trait_def(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::TraitDef {
|
|||
|
||||
match item {
|
||||
Some(item) if matches!(item.kind, hir::AssocItemKind::Fn { .. }) => {
|
||||
if !tcx.impl_defaultness(item.id.owner_id).has_value() {
|
||||
if !tcx.defaultness(item.id.owner_id).has_value() {
|
||||
tcx.sess.emit_err(errors::FunctionNotHaveDefaultImplementation {
|
||||
span: item.span,
|
||||
note_span: attr_span,
|
||||
|
|
|
@ -435,7 +435,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::EarlyBinder<Ty
|
|||
in_trait,
|
||||
..
|
||||
}) => {
|
||||
if in_trait && !tcx.impl_defaultness(owner).has_value() {
|
||||
if in_trait && !tcx.defaultness(owner).has_value() {
|
||||
span_bug!(
|
||||
tcx.def_span(def_id),
|
||||
"tried to get type of this RPITIT with no definition"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue