Skip to content

Commit

Permalink
Update E0392 to new error format
Browse files Browse the repository at this point in the history
  • Loading branch information
canova committed Aug 14, 2016
1 parent 2b7ea14 commit 6d998d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/librustc_typeck/check/wfcheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,10 @@ fn error_380(ccx: &CrateCtxt, span: Span) {

fn error_392<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>, span: Span, param_name: ast::Name)
-> DiagnosticBuilder<'tcx> {
struct_span_err!(ccx.tcx.sess, span, E0392,
"parameter `{}` is never used", param_name)
let mut err = struct_span_err!(ccx.tcx.sess, span, E0392,
"parameter `{}` is never used", param_name);
err.span_label(span, &format!("unused type parameter"));
err
}

fn error_194(tcx: TyCtxt, span: Span, name: ast::Name) {
Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/E0392.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

enum Foo<T> { Bar } //~ ERROR E0392
//~| NOTE unused type parameter

fn main() {
}

0 comments on commit 6d998d6

Please sign in to comment.