Update error E0117 to new format

Fixes #35250
This commit is contained in:
Antti Keränen 2016-08-07 10:38:29 +03:00
parent 802d0811a5
commit ac10b5f127
No known key found for this signature in database
GPG Key ID: 77E8C99756CA97C4
2 changed files with 9 additions and 5 deletions

View File

@ -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)) => {

View File

@ -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() {
}