diff options
| author | leonardo.yvens <leoyvens@gmail.com> | 2017-10-09 13:59:20 -0300 |
|---|---|---|
| committer | leonardo.yvens <leoyvens@gmail.com> | 2017-11-03 16:13:20 -0200 |
| commit | 06506bb751ae952b67d76a2ebe21edb8ec96acb9 (patch) | |
| tree | 9894a2984347c30c31cc59c933ce0b1a30007086 /src/librustc_metadata/decoder.rs | |
| parent | 5ce3d482e2313fe6795e6d688e62a092af424da8 (diff) | |
| download | rust-06506bb751ae952b67d76a2ebe21edb8ec96acb9.tar.gz rust-06506bb751ae952b67d76a2ebe21edb8ec96acb9.zip | |
[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`.
Diffstat (limited to 'src/librustc_metadata/decoder.rs')
| -rw-r--r-- | src/librustc_metadata/decoder.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/librustc_metadata/decoder.rs b/src/librustc_metadata/decoder.rs index b4519619124..fa9b166ca94 100644 --- a/src/librustc_metadata/decoder.rs +++ b/src/librustc_metadata/decoder.rs @@ -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, } } |
