Skip to content

Commit

Permalink
Adds another lint example using extern "system"
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelrayment committed Oct 3, 2023
1 parent 0bf69b2 commit 9f44a08
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test_crates/pub_function_changed_abi/new/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ pub extern "Rust" fn implicit_c_function_becomes_rust() -> () {}
pub extern "Rust" fn rust_function_remains_rust() -> () {}

pub extern "C" fn c_function_remains_c() -> () {}

pub extern "C" fn system_function_becomes_c() -> () {}
2 changes: 2 additions & 0 deletions test_crates/pub_function_changed_abi/old/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ pub extern fn implicit_c_function_becomes_rust() -> () {}
pub extern "Rust" fn rust_function_remains_rust() -> () {}

pub extern "C" fn c_function_remains_c() -> () {}

pub extern "system" fn system_function_becomes_c() -> () {}
12 changes: 12 additions & 0 deletions test_outputs/pub_function_changed_abi.output.ron
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,17 @@
"span_filename": String("src/lib.rs"),
"visibility_limit": String("public"),
},
{
"abi_name": String("system"),
"name": String("system_function_becomes_c"),
"new_abi_name": String("C"),
"path": List([
String("pub_function_changed_abi"),
String("system_function_becomes_c"),
]),
"span_begin_line": Uint64(15),
"span_filename": String("src/lib.rs"),
"visibility_limit": String("public"),
},
],
}

0 comments on commit 9f44a08

Please sign in to comment.