let msg = "free static item without body";
self.error_item_without_body(item.span, "static", msg, " = <expr>;");
}
+ ItemKind::TyAlias(_, ref bounds, ref body) => {
+ if body.is_none() {
+ let msg = "free type alias without body";
+ self.error_item_without_body(item.span, "type", msg, " = <type>;");
+ }
+ self.check_type_no_bounds(bounds, "this context");
+ }
_ => {}
}
}
GenericArgs::Parenthesized(ref data) => {
walk_list!(self, visit_ty, &data.inputs);
- if let FunctionRetTy::Ty(ty) = &data.output {
+ if let FnRetTy::Ty(ty) = &data.output {
// `-> Foo` syntax is essentially an associated type binding,
// so it is also allowed to contain nested `impl Trait`.
self.with_impl_trait(None, |this| this.visit_ty(ty));