Update E0392 to new error format
This commit is contained in:
@@ -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)
|
fn error_392<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>, span: Span, param_name: ast::Name)
|
||||||
-> DiagnosticBuilder<'tcx> {
|
-> DiagnosticBuilder<'tcx> {
|
||||||
struct_span_err!(ccx.tcx.sess, span, E0392,
|
let mut err = struct_span_err!(ccx.tcx.sess, span, E0392,
|
||||||
"parameter `{}` is never used", param_name)
|
"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) {
|
fn error_194(tcx: TyCtxt, span: Span, name: ast::Name) {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
enum Foo<T> { Bar } //~ ERROR E0392
|
enum Foo<T> { Bar } //~ ERROR E0392
|
||||||
|
//~| NOTE unused type parameter
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user