[Syntax Breaking] Rename DefaultImpl to AutoImpl

DefaultImpl is a highly confusing name for what we now call auto impls,
as in `impl Send for ..`. The name auto impl is not formally decided
but for sanity anything is better than `DefaultImpl` which refers
neither to `default impl` nor to `impl Default`.
This commit is contained in:
leonardo.yvens 2017-10-09 13:59:20 -03:00
parent 5ce3d482e2
commit 06506bb751
60 changed files with 163 additions and 163 deletions

View file

@ -459,7 +459,7 @@ impl<'tcx> EntryKind<'tcx> {
EntryKind::ForeignMod |
EntryKind::Impl(_) |
EntryKind::DefaultImpl(_) |
EntryKind::AutoImpl(_) |
EntryKind::Field |
EntryKind::Generator(_) |
EntryKind::Closure(_) => return None,
@ -529,7 +529,7 @@ impl<'a, 'tcx> CrateMetadata {
ty::TraitDef::new(self.local_def_id(item_id),
data.unsafety,
data.paren_sugar,
data.has_default_impl,
data.has_auto_impl,
self.def_path_table.def_path_hash(item_id))
}
@ -735,7 +735,7 @@ impl<'a, 'tcx> CrateMetadata {
continue;
}
EntryKind::Impl(_) |
EntryKind::DefaultImpl(_) => continue,
EntryKind::AutoImpl(_) => continue,
_ => {}
}
@ -1082,9 +1082,9 @@ impl<'a, 'tcx> CrateMetadata {
self.dllimport_foreign_items.contains(&id)
}
pub fn is_default_impl(&self, impl_id: DefIndex) -> bool {
pub fn is_auto_impl(&self, impl_id: DefIndex) -> bool {
match self.entry(impl_id).kind {
EntryKind::DefaultImpl(_) => true,
EntryKind::AutoImpl(_) => true,
_ => false,
}
}