diff --git a/src/librustc_borrowck/borrowck/gather_loans/mod.rs b/src/librustc_borrowck/borrowck/gather_loans/mod.rs index cd0b19980957..bcfc9db56fcc 100644 --- a/src/librustc_borrowck/borrowck/gather_loans/mod.rs +++ b/src/librustc_borrowck/borrowck/gather_loans/mod.rs @@ -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"); } } diff --git a/src/librustc_borrowck/diagnostics.rs b/src/librustc_borrowck/diagnostics.rs index 415b633a623a..2ae9498d63cf 100644 --- a/src/librustc_borrowck/diagnostics.rs +++ b/src/librustc_borrowck/diagnostics.rs @@ -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 } diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 1d1631c4fa7e..40693d4d0ea7 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -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(); } } diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 0463f82ccce2..45ae8df387b0 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -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 }