mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
22 lines
457 B
Rust
22 lines
457 B
Rust
// check-pass
|
|
#![crate_type = "lib"]
|
|
|
|
#[cfg(target_arch = "wasm32")]
|
|
mod wasm_non_clash {
|
|
mod a {
|
|
#[link(wasm_import_module = "a")]
|
|
extern "C" {
|
|
pub fn foo();
|
|
}
|
|
}
|
|
|
|
mod b {
|
|
#[link(wasm_import_module = "b")]
|
|
extern "C" {
|
|
pub fn foo() -> usize;
|
|
// #79581: These declarations shouldn't clash because foreign fn names are mangled
|
|
// on wasm32.
|
|
}
|
|
}
|
|
}
|