}
}
- // Disallow *all* explicit impls of `Sized` for now.
+ // Disallow *all* explicit impls of `Sized` and `Unsize` for now.
if Some(trait_def_id) == self.tcx.lang_items.sized_trait() {
span_err!(self.tcx.sess, item.span, E0322,
"explicit impls for the `Sized` trait are not permitted");
return;
}
+ if Some(trait_def_id) == self.tcx.lang_items.unsize_trait() {
+ span_err!(self.tcx.sess, item.span, E0328,
+ "explicit impls for the `Unsize` trait are not permitted");
+ return;
+ }
}
ast::ItemDefaultImpl(..) => {
// "Trait" impl