Update E0101 and E0102 to new format
This commit is contained in:
parent
444ff9fbfb
commit
da86ae2338
3 changed files with 16 additions and 6 deletions
|
|
@ -441,13 +441,19 @@ impl<'cx, 'gcx, 'tcx> Resolver<'cx, 'gcx, 'tcx> {
|
|||
if !self.tcx.sess.has_errors() {
|
||||
match self.reason {
|
||||
ResolvingExpr(span) => {
|
||||
span_err!(self.tcx.sess, span, E0101,
|
||||
"cannot determine a type for this expression: {}", e);
|
||||
struct_span_err!(
|
||||
self.tcx.sess, span, E0101,
|
||||
"cannot determine a type for this expression: {}", e)
|
||||
.span_label(span, &format!("cannot resolve type of expression"))
|
||||
.emit();
|
||||
}
|
||||
|
||||
ResolvingLocal(span) => {
|
||||
span_err!(self.tcx.sess, span, E0102,
|
||||
"cannot determine a type for this local variable: {}", e);
|
||||
struct_span_err!(
|
||||
self.tcx.sess, span, E0102,
|
||||
"cannot determine a type for this local variable: {}", e)
|
||||
.span_label(span, &format!("cannot resolve type of variable"))
|
||||
.emit();
|
||||
}
|
||||
|
||||
ResolvingPattern(span) => {
|
||||
|
|
|
|||
|
|
@ -9,5 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
fn main() {
|
||||
let x = |_| {}; //~ ERROR E0101
|
||||
let x = |_| {};
|
||||
//~^ ERROR E0101
|
||||
//~| NOTE cannot resolve type of expression
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,5 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
fn main() {
|
||||
let x = []; //~ ERROR E0102
|
||||
let x = [];
|
||||
//~^ ERROR E0102
|
||||
//~| NOTE cannot resolve type of variable
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue