Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use E0724 instead of E0723 as an error code
  • Loading branch information
gnzlbg committed Feb 23, 2019
1 parent fcc0b3e commit 94aa740
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/librustc_typeck/collect.rs
Expand Up @@ -2396,7 +2396,7 @@ fn codegen_fn_attrs<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, id: DefId) -> Codegen
struct_span_err!(
tcx.sess,
attr.span,
E0723,
E0724,
"`#[ffi_returns_twice]` may only be used on foreign functions"
).emit();
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/diagnostics.rs
Expand Up @@ -4738,5 +4738,5 @@ register_diagnostics! {
E0698, // type inside generator must be known in this context
E0719, // duplicate values for associated type binding
E0722, // Malformed #[optimize] attribute
E0723, // `#[ffi_returns_twice]` is only allowed in foreign functions
E0724, // `#[ffi_returns_twice]` is only allowed in foreign functions
}
4 changes: 2 additions & 2 deletions src/test/ui/ffi_returns_twice.stderr
@@ -1,9 +1,9 @@
error[E0723]: `#[ffi_returns_twice]` may only be used on foreign functions
error[E0724]: `#[ffi_returns_twice]` may only be used on foreign functions
--> $DIR/ffi_returns_twice.rs:5:1
|
LL | #[ffi_returns_twice] //~ ERROR `#[ffi_returns_twice]` may only be used on foreign functions
| ^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0723`.
For more information about this error, try `rustc --explain E0724`.

0 comments on commit 94aa740

Please sign in to comment.