[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

@@ -5133,19 +5133,19 @@ impl<'a> Parser<'a> {
if opt_trait.is_some() && self.eat(&token::DotDot) {
if generics.is_parameterized() {
self.span_err(impl_span, "default trait implementations are not \
self.span_err(impl_span, "auto trait implementations are not \
allowed to have generics");
}
if let ast::Defaultness::Default = defaultness {
self.span_err(impl_span, "`default impl` is not allowed for \
default trait implementations");
auto trait implementations");
}
self.expect(&token::OpenDelim(token::Brace))?;
self.expect(&token::CloseDelim(token::Brace))?;
Ok((keywords::Invalid.ident(),
ItemKind::DefaultImpl(unsafety, opt_trait.unwrap()), None))
ItemKind::AutoImpl(unsafety, opt_trait.unwrap()), None))
} else {
if opt_trait.is_some() {
ty = self.parse_ty()?;