Skip to content

Commit

Permalink
Update error E0117 to new format
Browse files Browse the repository at this point in the history
Fixes #35250
  • Loading branch information
Detegr committed Aug 7, 2016
1 parent 802d081 commit ac10b5f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/librustc_typeck/coherence/orphan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)) => {
Expand Down
2 changes: 2 additions & 0 deletions src/test/compile-fail/E0117.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
}

0 comments on commit ac10b5f

Please sign in to comment.