parent
802d0811a5
commit
ac10b5f127
@ -228,12 +228,14 @@ impl<'cx, 'tcx> OrphanChecker<'cx, 'tcx> {
|
||||
match traits::orphan_check(self.tcx, def_id) {
|
||||
Ok(()) => { }
|
||||
Err(traits::OrphanCheckErr::NoLocalInputType) => {
|
||||
span_err!(
|
||||
struct_span_err!(
|
||||
self.tcx.sess, item.span, E0117,
|
||||
"the impl does not reference any \
|
||||
types defined in this crate; \
|
||||
only traits defined in the current crate can be \
|
||||
implemented for arbitrary types");
|
||||
"only traits defined in the current crate can be \
|
||||
implemented for arbitrary types")
|
||||
.span_label(item.span, &format!("impl doesn't use types inside crate"))
|
||||
.note(&format!("the impl does not reference any \
|
||||
types defined in this crate"))
|
||||
.emit();
|
||||
return;
|
||||
}
|
||||
Err(traits::OrphanCheckErr::UncoveredTy(param_ty)) => {
|
||||
|
@ -9,6 +9,8 @@
|
||||
// except according to those terms.
|
||||
|
||||
impl Drop for u32 {} //~ ERROR E0117
|
||||
//~^ NOTE impl doesn't use types inside crate
|
||||
//~| NOTE the impl does not reference any types defined in this crate
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user