Update error codes
This commit is contained in:
parent
057b0adf47
commit
66fc6dfbb6
4 changed files with 8 additions and 10 deletions
|
|
@ -148,7 +148,7 @@ impl<'a, 'tcx> euv::Delegate<'tcx> for GatherLoanCtxt<'a, 'tcx> {
|
|||
if borrows_impl_arg {
|
||||
span_err!(self.bccx.tcx.sess,
|
||||
borrow_span,
|
||||
E0805,
|
||||
E0623,
|
||||
"cannot borrow the implicit argument of a generator");
|
||||
}
|
||||
|
||||
|
|
@ -226,7 +226,7 @@ fn check_yields<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
|
|||
if extent_has_yield(bccx.tcx, extent) {
|
||||
span_err!(bccx.tcx.sess,
|
||||
borrow_span,
|
||||
E0806,
|
||||
E0624,
|
||||
"cannot borrow this value across the suspend point of a generator");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1191,6 +1191,6 @@ register_diagnostics! {
|
|||
E0594, // cannot assign to {}
|
||||
E0595, // closure cannot assign to {}
|
||||
E0598, // lifetime of {} is too short to guarantee its contents can be...
|
||||
E0805, // borrow of the implicit argument of a generator
|
||||
E0806, // borrow across a suspend point
|
||||
E0623, // borrow of the implicit argument of a generator
|
||||
E0624, // borrow across a suspend point
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4002,7 +4002,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
|
|||
ty
|
||||
}
|
||||
None => {
|
||||
struct_span_err!(self.tcx.sess, expr.span, E0803,
|
||||
struct_span_err!(self.tcx.sess, expr.span, E0626,
|
||||
"gen arg expression outside of generator literal").emit();
|
||||
tcx.types.err
|
||||
}
|
||||
|
|
@ -4014,7 +4014,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
|
|||
self.check_expr_coercable_to_type(&value, ty);
|
||||
}
|
||||
None => {
|
||||
struct_span_err!(self.tcx.sess, expr.span, E0802,
|
||||
struct_span_err!(self.tcx.sess, expr.span, E0625,
|
||||
"yield statement outside of generator literal").emit();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4667,8 +4667,6 @@ register_diagnostics! {
|
|||
E0588, // packed struct cannot transitively contain a `[repr(align)]` struct
|
||||
E0592, // duplicate definitions with name `{}`
|
||||
// E0613, // Removed (merged with E0609)
|
||||
E0801, // unexpected generator return
|
||||
E0802, // yield statement outside of generator literal
|
||||
E0803, // gen arg expression outside of generator literal
|
||||
E0804, // cannot determine the type for the implicit argument of this generator
|
||||
E0625, // yield statement outside of generator literal
|
||||
E0626, // gen arg expression outside of generator literal
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue