Skip to content

Commit

Permalink
Fix trait object error code
Browse files Browse the repository at this point in the history
  • Loading branch information
asterycs committed Nov 10, 2021
1 parent 68ca579 commit fc9624c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
let mut err = rustc_errors::struct_span_err!(
self.sess(),
self_ty.span,
E0783,
E0782,
"{}",
msg,
);
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/editions/dyn-trait-sugg-2021.stderr
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
error[E0783]: trait objects without an explicit `dyn` are deprecated
error[E0782]: trait objects without an explicit `dyn` are deprecated
--> $DIR/dyn-trait-sugg-2021.rs:10:5
|
LL | Foo::hi(123);
| ^^^ help: use `dyn`: `<dyn Foo>`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0783`.
For more information about this error, try `rustc --explain E0782`.

0 comments on commit fc9624c

Please sign in to comment.