mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-24 18:43:33 +03:00
Remove usage of wasm_import_module
feature
This is now stabilized! Also tweak usage of it to the stable version.
This commit is contained in:
parent
13269a9e2e
commit
906cd7adcc
@ -20,7 +20,7 @@ Import JavaScript things into Rust and export Rust things to JavaScript.
|
||||
`src/lib.rs`:
|
||||
|
||||
```rust
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
@ -148,7 +148,7 @@ impl ToTokens for ast::Struct {
|
||||
unsafe { &mut ::wasm_bindgen::convert::GlobalStack::new() },
|
||||
);
|
||||
|
||||
#[wasm_import_module = "__wbindgen_placeholder__"]
|
||||
#[link(wasm_import_module = "__wbindgen_placeholder__")]
|
||||
extern {
|
||||
fn #new_fn(ptr: u32) -> u32;
|
||||
}
|
||||
@ -784,7 +784,7 @@ impl ToTokens for ast::ImportFunction {
|
||||
#vis fn #rust_name(#me #(#arguments),*) #ret {
|
||||
// See definition of `link_mem_intrinsics` for what this is doing
|
||||
::wasm_bindgen::__rt::link_mem_intrinsics();
|
||||
#[wasm_import_module = "__wbindgen_placeholder__"]
|
||||
#[link(wasm_import_module = "__wbindgen_placeholder__")]
|
||||
extern {
|
||||
fn #import_name(#(#abi_arguments),*) -> #abi_ret;
|
||||
}
|
||||
@ -910,7 +910,7 @@ impl ToTokens for ast::ImportStatic {
|
||||
#vis static #name: ::wasm_bindgen::JsStatic<#ty> = {
|
||||
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
|
||||
fn init() -> #ty {
|
||||
#[wasm_import_module = "__wbindgen_placeholder__"]
|
||||
#[link(wasm_import_module = "__wbindgen_placeholder__")]
|
||||
extern {
|
||||
fn #shim_name() -> <#ty as ::wasm_bindgen::convert::FromWasmAbi>::Abi;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
//! bindings.
|
||||
|
||||
#![doc(html_root_url = "https://docs.rs/js-sys/0.2")]
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#![cfg(target_arch = "wasm32")]
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
extern crate js_sys;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//!
|
||||
//! More documentation can be found in the README for this crate!
|
||||
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen_test_macro;
|
||||
extern crate wasm_bindgen;
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![feature(wasm_import_module)]
|
||||
#![doc(html_root_url = "https://docs.rs/web-sys/0.2")]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
@ -6,7 +6,7 @@ fn headers() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
extern crate web_sys;
|
||||
|
@ -102,7 +102,7 @@ fn take_and_return_a_bunch_of_slices() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -24,7 +24,7 @@ fn bool() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
@ -93,7 +93,7 @@ fn ints() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
@ -160,7 +160,7 @@ fn floats() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
|
@ -39,7 +39,7 @@ fn top_level_enum() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -29,7 +29,7 @@ fn method() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -87,7 +87,7 @@ fn property() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -149,7 +149,7 @@ fn named_constructor() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -198,7 +198,7 @@ fn static_method() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -251,7 +251,7 @@ fn static_property() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -303,7 +303,7 @@ fn one_method_using_an_undefined_import_doesnt_break_all_other_methods() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
@ -348,7 +348,7 @@ fn unforgeable_is_structural() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
@ -405,7 +405,7 @@ fn partial_interface() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
@ -471,7 +471,7 @@ fn mixin() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
|
@ -64,7 +64,7 @@ fn throws() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
extern crate js_sys;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(use_extern_macros, wasm_import_module, js_globals)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate humantime;
|
||||
extern crate wasm_bindgen;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -39,7 +39,7 @@ wasm-bindgen = "0.2"
|
||||
Next up our actual code! We'll write this in `src/lib.rs`:
|
||||
|
||||
```rust,ignore
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
@ -5,7 +5,7 @@ can also [explore this code online](https://webassembly.studio/?f=t61j18noqz):
|
||||
|
||||
```rust,ignore
|
||||
// src/lib.rs
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
//! this crate and this crate also provides JS bindings through the `JsValue`
|
||||
//! interface.
|
||||
|
||||
#![feature(use_extern_macros, wasm_import_module, unsize)]
|
||||
#![feature(use_extern_macros, unsize)]
|
||||
#![no_std]
|
||||
#![doc(html_root_url = "https://docs.rs/wasm-bindgen/0.2")]
|
||||
|
||||
@ -368,7 +368,7 @@ numbers! { i8 u8 i16 u16 i32 u32 f32 f64 }
|
||||
macro_rules! externs {
|
||||
($(fn $name:ident($($args:tt)*) -> $ret:ty;)*) => (
|
||||
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
|
||||
#[wasm_import_module = "__wbindgen_placeholder__"]
|
||||
#[link(wasm_import_module = "__wbindgen_placeholder__")]
|
||||
extern {
|
||||
$(fn $name($($args)*) -> $ret;)*
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ fn null_keeps_working() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -6,7 +6,7 @@ fn works() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -6,7 +6,7 @@ fn simple() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -75,7 +75,7 @@ fn strings() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -139,7 +139,7 @@ fn exceptions() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -207,7 +207,7 @@ fn pass_one_to_another() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -263,7 +263,7 @@ fn pass_into_js() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -316,7 +316,7 @@ fn issue_27() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
@ -365,7 +365,7 @@ fn pass_into_js_as_js_class() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -418,7 +418,7 @@ fn constructors() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -502,7 +502,7 @@ fn empty_structs() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -538,7 +538,7 @@ fn public_fields() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -597,7 +597,7 @@ fn using_self() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -635,7 +635,7 @@ fn readonly_fields() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -677,7 +677,7 @@ fn readonly_fields() {
|
||||
fn double_consume() {
|
||||
project()
|
||||
.file("src/lib.rs", r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -714,7 +714,7 @@ fn double_consume() {
|
||||
fn rename_function_for_js() {
|
||||
project()
|
||||
.file("src/lib.rs", r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -6,7 +6,7 @@ fn works() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -56,7 +56,7 @@ fn cannot_reuse() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -105,7 +105,7 @@ fn long_lived() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -168,7 +168,7 @@ fn many_arity() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -269,7 +269,7 @@ fn long_lived_dropping() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -322,7 +322,7 @@ fn long_fnmut_recursive() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -369,7 +369,7 @@ fn fnmut() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -423,7 +423,7 @@ fn fnmut_bad() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -484,7 +484,7 @@ fn string_arguments() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -529,7 +529,7 @@ fn string_ret() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -6,7 +6,7 @@ fn works() {
|
||||
p.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -6,7 +6,7 @@ fn dependencies_work() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
extern crate dependency;
|
||||
use wasm_bindgen::prelude::*;
|
||||
@ -51,7 +51,7 @@ fn dependencies_work() {
|
||||
.file(
|
||||
"vendor/dependency/src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
@ -97,7 +97,7 @@ fn same_api_two_crates() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
extern crate a;
|
||||
extern crate b;
|
||||
@ -158,7 +158,7 @@ fn same_api_two_crates() {
|
||||
.file(
|
||||
"a/src/lib.rs",
|
||||
"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
use wasm_bindgen::prelude::*;
|
||||
@ -190,7 +190,7 @@ fn same_api_two_crates() {
|
||||
.file(
|
||||
"b/src/lib.rs",
|
||||
"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
@ -6,7 +6,7 @@ fn simple() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -52,7 +52,7 @@ fn import_class() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -104,7 +104,7 @@ fn construct() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -187,7 +187,7 @@ fn new_constructors() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -242,7 +242,7 @@ fn switch_methods() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -330,7 +330,7 @@ fn properties() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -396,7 +396,7 @@ fn rename_setter_getter() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -464,7 +464,7 @@ fn deny_missing_docs() {
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
//! dox
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
#![deny(missing_docs)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
@ -512,7 +512,7 @@ fn options() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -6,7 +6,7 @@ fn simple() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -94,7 +94,7 @@ fn unused() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
@ -131,7 +131,7 @@ fn string_ret() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -171,7 +171,7 @@ fn strings() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -218,7 +218,7 @@ fn exceptions() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -282,7 +282,7 @@ fn exn_caught() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -326,7 +326,7 @@ fn free_imports() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -363,7 +363,7 @@ fn import_a_field() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -401,7 +401,7 @@ fn rename() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -447,7 +447,7 @@ fn versions() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -496,7 +496,7 @@ fn underscore_pattern() {
|
||||
project()
|
||||
.debug(false)
|
||||
.file("src/lib.rs", r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -531,7 +531,7 @@ fn rust_keyword() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -573,7 +573,7 @@ fn rust_keyword2() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -614,7 +614,7 @@ fn custom_type() {
|
||||
project()
|
||||
.debug(false)
|
||||
.file("src/lib.rs", r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -677,7 +677,7 @@ fn unused_imports_not_generated() {
|
||||
project
|
||||
.debug(false)
|
||||
.file("src/lib.rs", r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -6,7 +6,7 @@ fn simple() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -53,7 +53,7 @@ fn owned() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -100,7 +100,7 @@ fn clone() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -153,7 +153,7 @@ fn promote() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -203,7 +203,7 @@ fn returning_vector() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -247,7 +247,7 @@ fn another_vector_return() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -290,7 +290,7 @@ fn serde() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
#[macro_use]
|
||||
|
@ -8,7 +8,7 @@ fn works() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -7,7 +7,7 @@ fn works() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -9,7 +9,7 @@ fn works() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -269,7 +269,7 @@ fn no_std() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
#![no_std]
|
||||
#![allow(dead_code)]
|
||||
|
||||
@ -322,7 +322,7 @@ fn no_std_class() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
#![no_std]
|
||||
#![allow(dead_code)]
|
||||
|
||||
@ -375,7 +375,7 @@ fn jsvalue_typeof() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
@ -420,7 +420,7 @@ fn binding_to_unimplemented_apis_doesnt_break_everything() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
@ -454,7 +454,7 @@ fn optional_slices() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_custom_section, wasm_import_module)]
|
||||
#![feature(use_extern_macros, wasm_custom_section)]
|
||||
extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
|
@ -92,7 +92,7 @@ fn import() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -247,7 +247,7 @@ fn pass_array_works() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -303,7 +303,7 @@ fn import_mut() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
@ -452,7 +452,7 @@ fn return_vec_ok() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
@ -6,7 +6,7 @@ fn works() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
@ -7,7 +7,7 @@ fn works() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -7,7 +7,7 @@ fn works() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
|
@ -6,7 +6,7 @@ fn works() {
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
#![feature(use_extern_macros, wasm_import_module)]
|
||||
#![feature(use_extern_macros)]
|
||||
extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
#[wasm_bindgen]
|
||||
|
Loading…
Reference in New Issue
Block a user