Update E0392 to new error format

This commit is contained in:
Nazım Can Altınova 2016-08-15 00:12:42 +03:00
parent 2b7ea14cc4
commit 6d998d664b
2 changed files with 5 additions and 2 deletions

View File

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

View File

@ -9,6 +9,7 @@
// except according to those terms.
enum Foo<T> { Bar } //~ ERROR E0392
//~| NOTE unused type parameter
fn main() {
}