Skip to content

Commit

Permalink
Merge pull request rust-lang#7 from J-ZhengLi/dev_stable
Browse files Browse the repository at this point in the history
fix test fail after dev fmt of [`implicit_abi`]
  • Loading branch information
surechen authored Jun 26, 2023
2 parents 38ab3a3 + 33ddd19 commit af6c9d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions tests/ui/implicit_abi.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::ffi::{c_char, c_void};
#[repr(C)]
pub struct External(i8);

#[rustfmt::skip]
extern "C" {
fn foo();
fn bar(a: u8, b: i32) -> u64;
Expand Down
1 change: 1 addition & 0 deletions tests/ui/implicit_abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::ffi::{c_char, c_void};
#[repr(C)]
pub struct External(i8);

#[rustfmt::skip]
extern {
fn foo();
fn bar(a: u8, b: i32) -> u64;
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/implicit_abi.stderr
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
error: missing ABI label on extern block
--> $DIR/implicit_abi.rs:10:1
--> $DIR/implicit_abi.rs:11:1
|
LL | extern {
| ^^^^^^ help: explicitly states ABI instead: `extern "C"`
|
= note: `-D clippy::implicit-abi` implied by `-D warnings`

error: missing ABI label on extern block
--> $DIR/implicit_abi.rs:22:1
--> $DIR/implicit_abi.rs:23:1
|
LL | extern
| ^^^^^^ help: explicitly states ABI instead: `extern "C"`

error: missing ABI label on extern block
--> $DIR/implicit_abi.rs:28:1
--> $DIR/implicit_abi.rs:29:1
|
LL | extern { fn my_c_fn(a: i8) -> c_void; }
| ^^^^^^ help: explicitly states ABI instead: `extern "C"`
Expand Down

0 comments on commit af6c9d4

Please sign in to comment.