diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-07-13 11:30:47 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2018-07-16 09:40:45 -0700 |
| commit | b7ef674832c0d7e703e12f7880a928bf8cd0c9c5 (patch) | |
| tree | de7e6f9b4ba9a23814eb1c8846a5a8f93e6739c1 /src/test/run-make | |
| parent | 50702b28383c15907c29e8f70256cdd439800834 (diff) | |
| download | rust-b7ef674832c0d7e703e12f7880a928bf8cd0c9c5.tar.gz rust-b7ef674832c0d7e703e12f7880a928bf8cd0c9c5.zip | |
rustc: Use link_section, not wasm_custom_section
This commit transitions definitions of custom sections on the wasm target from the unstable `#[wasm_custom_section]` attribute to the already-stable-for-other-targets `#[link_section]` attribute. Mostly the same restrictions apply as before, except that this now applies only to statics. Closes #51088
Diffstat (limited to 'src/test/run-make')
| -rw-r--r-- | src/test/run-make/wasm-custom-section/bar.rs | 8 | ||||
| -rw-r--r-- | src/test/run-make/wasm-custom-section/foo.rs | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/test/run-make/wasm-custom-section/bar.rs b/src/test/run-make/wasm-custom-section/bar.rs index e3db36d6dbd..ed537280e6c 100644 --- a/src/test/run-make/wasm-custom-section/bar.rs +++ b/src/test/run-make/wasm-custom-section/bar.rs @@ -14,11 +14,11 @@ extern crate foo; -#[wasm_custom_section = "foo"] -const A: [u8; 2] = [5, 6]; +#[link_section = "foo"] +pub static A: [u8; 2] = [5, 6]; -#[wasm_custom_section = "baz"] -const B: [u8; 2] = [7, 8]; +#[link_section = "baz"] +pub static B: [u8; 2] = [7, 8]; #[no_mangle] pub extern fn foo() {} diff --git a/src/test/run-make/wasm-custom-section/foo.rs b/src/test/run-make/wasm-custom-section/foo.rs index 44d1efd7c2d..fb3bec31ada 100644 --- a/src/test/run-make/wasm-custom-section/foo.rs +++ b/src/test/run-make/wasm-custom-section/foo.rs @@ -12,8 +12,8 @@ #![feature(wasm_custom_section)] #![deny(warnings)] -#[wasm_custom_section = "foo"] -const A: [u8; 2] = [1, 2]; +#[link_section = "foo"] +pub static A: [u8; 2] = [1, 2]; -#[wasm_custom_section = "bar"] -const B: [u8; 2] = [3, 4]; +#[link_section = "bar"] +pub static B: [u8; 2] = [3, 4]; |
