mark applicability
This commit is contained in:
parent
6c682eb46a
commit
a880971128
src
@ -106,6 +106,7 @@ use self::LoopKind::*;
|
||||
use self::LiveNodeKind::*;
|
||||
use self::VarKind::*;
|
||||
|
||||
use errors::Applicability;
|
||||
use hir::def::*;
|
||||
use ty::{self, TyCtxt};
|
||||
use lint;
|
||||
@ -1558,8 +1559,9 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
|
||||
err.span_suggestion(sp, "try ignoring the field",
|
||||
format!("{}: _", name));
|
||||
} else {
|
||||
err.span_suggestion_short(sp, &suggest_underscore_msg,
|
||||
format!("_{}", name));
|
||||
err.span_suggestion_with_applicability(
|
||||
sp, &suggest_underscore_msg,
|
||||
format!("_{}", name), Applicability::MachineApplicable);
|
||||
}
|
||||
err.emit()
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// compile-pass
|
||||
// run-rustfix
|
||||
|
||||
#![feature(box_syntax)]
|
||||
#![feature(box_patterns)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user