Skip to content

Update tests after nightly fix #1309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions crates/macro/ui-tests/invalid-items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ struct Foo<T>(T);
extern "C" {
static mut FOO: u32;

// FIXME(rust-lang/rust#58853) recent regression needs fixing before
// re-enabling.
// pub fn foo3(x: i32, ...);
pub fn foo3(x: i32, ...);
}

#[wasm_bindgen]
Expand Down
28 changes: 17 additions & 11 deletions crates/macro/ui-tests/invalid-items.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -28,35 +28,41 @@ error: cannot import mutable globals yet
21 | static mut FOO: u32;
| ^^^

error: can't #[wasm_bindgen] variadic functions
--> $DIR/invalid-items.rs:23:25
|
23 | pub fn foo3(x: i32, ...);
| ^^^

error: only foreign mods with the `C` ABI are allowed
--> $DIR/invalid-items.rs:29:8
--> $DIR/invalid-items.rs:27:8
|
29 | extern "system" {
27 | extern "system" {
| ^^^^^^^^

error: can't #[wasm_bindgen] functions with lifetime or type parameters
--> $DIR/invalid-items.rs:33:12
--> $DIR/invalid-items.rs:31:12
|
33 | pub fn foo4<T>() {}
31 | pub fn foo4<T>() {}
| ^^^

error: can't #[wasm_bindgen] functions with lifetime or type parameters
--> $DIR/invalid-items.rs:35:12
--> $DIR/invalid-items.rs:33:12
|
35 | pub fn foo5<'a>() {}
33 | pub fn foo5<'a>() {}
| ^^^^

error: can't #[wasm_bindgen] functions with lifetime or type parameters
--> $DIR/invalid-items.rs:37:12
--> $DIR/invalid-items.rs:35:12
|
37 | pub fn foo6<'a, T>() {}
35 | pub fn foo6<'a, T>() {}
| ^^^^^^^

error: #[wasm_bindgen] can only be applied to a function, struct, enum, impl, or extern block
--> $DIR/invalid-items.rs:40:1
--> $DIR/invalid-items.rs:38:1
|
40 | trait X {}
38 | trait X {}
| ^^^^^^^^^^

error: aborting due to 10 previous errors
error: aborting due to 11 previous errors