]> git.lizzy.rs Git - rust.git/commit
Auto merge of #52445 - alexcrichton:wasm-import-module, r=eddyb
authorbors <bors@rust-lang.org>
Fri, 20 Jul 2018 06:40:10 +0000 (06:40 +0000)
committerbors <bors@rust-lang.org>
Fri, 20 Jul 2018 06:40:10 +0000 (06:40 +0000)
commita5097f3d68dace106de4dbe524f7892e779a836e
treefdce08b6e4585f15215e9b3228b9c32cfd3d9d62
parentbc14d71622378cf942a834e7c2b5358b9901f775
parentb9024f8a75a554f44063ab0c7a4c65c3087e12b6
Auto merge of #52445 - alexcrichton:wasm-import-module, r=eddyb

rustc: Stabilize #[wasm_import_module] as #[link(...)]

This commit stabilizes the `#[wasm_import_module]` attribute as
`#[link(wasm_import_module = "...")]`. Tracked by #52090 this new directive in
the `#[link]` attribute is used to configured the module name that the imports
are listed with. The WebAssembly specification indicates two utf-8 names are
associated with all imported items, one for the module the item comes from and
one for the item itself. The item itself is configurable in Rust via its
identifier or `#[link_name = "..."]`, but the module name was previously not
configurable and defaulted to `"env"`. This commit ensures that this is also
configurable.

Closes #52090
src/libsyntax/feature_gate.rs