diff options
| author | bors <bors@rust-lang.org> | 2019-03-28 08:56:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-03-28 08:56:34 +0000 |
| commit | 237bf3244fffef501cf37d4bda00e1fce3fcfb46 (patch) | |
| tree | ca483d5330b97887970dca2110c007a1084e4aa1 /src/test | |
| parent | 6bfe4b7b51f47ca014d535506cbc5682f00d8d2a (diff) | |
| parent | d403cd787c98610cf5287301820ad3353b35481d (diff) | |
| download | rust-237bf3244fffef501cf37d4bda00e1fce3fcfb46.tar.gz rust-237bf3244fffef501cf37d4bda00e1fce3fcfb46.zip | |
Auto merge of #59478 - Centril:rollup, r=Centril
Rollup of 12 pull requests Successful merges: - #57987 (Fix some AArch64 typos) - #58581 (Refactor generic parameter encoder functions) - #58803 (fs::copy() unix: set file mode early) - #58848 (Prevent cache issues on version updates) - #59198 (Do not complain about unmentioned fields in recovered patterns) - #59351 (Include llvm-ar with llvm-tools component) - #59413 (HirIdify hir::ItemId) - #59441 (Remove the block on natvis for lld-link.) - #59448 (Use consistent phrasing for all macro summaries) - #59456 (Add documentation about `for` used as higher ranked trait bounds) - #59472 (Document that `std::io::BufReader` discards contents on drop) - #59474 (Fix link capitalization in documentation of std::io::BufWriter.) Failed merges: r? @ghost
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/paths-containing-nul.rs | 13 | ||||
| -rw-r--r-- | src/test/ui/parser/bind-struct-early-modifiers.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/parser/bind-struct-early-modifiers.stderr | 9 | ||||
| -rw-r--r-- | src/test/ui/parser/issue-10392.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/parser/issue-10392.stderr | 9 | ||||
| -rw-r--r-- | src/test/ui/resolve/issue-54379.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/resolve/issue-54379.stderr | 9 |
7 files changed, 13 insertions, 31 deletions
diff --git a/src/test/run-pass/paths-containing-nul.rs b/src/test/run-pass/paths-containing-nul.rs index 8c800089d1c..dfcef59aa57 100644 --- a/src/test/run-pass/paths-containing-nul.rs +++ b/src/test/run-pass/paths-containing-nul.rs @@ -1,6 +1,7 @@ #![allow(deprecated)] // ignore-cloudabi no files or I/O // ignore-wasm32-bare no files or I/O +// ignore-emscripten no files use std::fs; use std::io; @@ -22,14 +23,18 @@ fn main() { assert_invalid_input("remove_file", fs::remove_file("\0")); assert_invalid_input("metadata", fs::metadata("\0")); assert_invalid_input("symlink_metadata", fs::symlink_metadata("\0")); + + // If `dummy_file` does not exist, then we might get another unrelated error + let dummy_file = std::env::current_exe().unwrap(); + assert_invalid_input("rename1", fs::rename("\0", "a")); - assert_invalid_input("rename2", fs::rename("a", "\0")); + assert_invalid_input("rename2", fs::rename(&dummy_file, "\0")); assert_invalid_input("copy1", fs::copy("\0", "a")); - assert_invalid_input("copy2", fs::copy("a", "\0")); + assert_invalid_input("copy2", fs::copy(&dummy_file, "\0")); assert_invalid_input("hard_link1", fs::hard_link("\0", "a")); - assert_invalid_input("hard_link2", fs::hard_link("a", "\0")); + assert_invalid_input("hard_link2", fs::hard_link(&dummy_file, "\0")); assert_invalid_input("soft_link1", fs::soft_link("\0", "a")); - assert_invalid_input("soft_link2", fs::soft_link("a", "\0")); + assert_invalid_input("soft_link2", fs::soft_link(&dummy_file, "\0")); assert_invalid_input("read_link", fs::read_link("\0")); assert_invalid_input("canonicalize", fs::canonicalize("\0")); assert_invalid_input("create_dir", fs::create_dir("\0")); diff --git a/src/test/ui/parser/bind-struct-early-modifiers.rs b/src/test/ui/parser/bind-struct-early-modifiers.rs index c1de0df54e2..c4b1937de10 100644 --- a/src/test/ui/parser/bind-struct-early-modifiers.rs +++ b/src/test/ui/parser/bind-struct-early-modifiers.rs @@ -2,7 +2,6 @@ fn main() { struct Foo { x: isize } match (Foo { x: 10 }) { Foo { ref x: ref x } => {}, //~ ERROR expected `,` - //~| ERROR pattern does not mention field `x` _ => {} } } diff --git a/src/test/ui/parser/bind-struct-early-modifiers.stderr b/src/test/ui/parser/bind-struct-early-modifiers.stderr index 50c95b8cf40..03482a41f54 100644 --- a/src/test/ui/parser/bind-struct-early-modifiers.stderr +++ b/src/test/ui/parser/bind-struct-early-modifiers.stderr @@ -4,12 +4,5 @@ error: expected `,` LL | Foo { ref x: ref x } => {}, | ^ -error[E0027]: pattern does not mention field `x` - --> $DIR/bind-struct-early-modifiers.rs:4:9 - | -LL | Foo { ref x: ref x } => {}, - | ^^^^^^^^^^^^^^^^^^^^ missing field `x` - -error: aborting due to 2 previous errors +error: aborting due to previous error -For more information about this error, try `rustc --explain E0027`. diff --git a/src/test/ui/parser/issue-10392.rs b/src/test/ui/parser/issue-10392.rs index dd84af39300..5b0c2fc2be4 100644 --- a/src/test/ui/parser/issue-10392.rs +++ b/src/test/ui/parser/issue-10392.rs @@ -4,5 +4,4 @@ fn a() -> A { panic!() } fn main() { let A { , } = a(); //~ ERROR expected ident - //~| ERROR pattern does not mention field `foo` } diff --git a/src/test/ui/parser/issue-10392.stderr b/src/test/ui/parser/issue-10392.stderr index 7bf5aa93f0a..34991151c1e 100644 --- a/src/test/ui/parser/issue-10392.stderr +++ b/src/test/ui/parser/issue-10392.stderr @@ -4,12 +4,5 @@ error: expected identifier, found `,` LL | let A { , } = a(); | ^ expected identifier -error[E0027]: pattern does not mention field `foo` - --> $DIR/issue-10392.rs:6:9 - | -LL | let A { , } = a(); - | ^^^^^^^ missing field `foo` - -error: aborting due to 2 previous errors +error: aborting due to previous error -For more information about this error, try `rustc --explain E0027`. diff --git a/src/test/ui/resolve/issue-54379.rs b/src/test/ui/resolve/issue-54379.rs index a48f66bf0fd..807c54393f2 100644 --- a/src/test/ui/resolve/issue-54379.rs +++ b/src/test/ui/resolve/issue-54379.rs @@ -6,7 +6,7 @@ fn main() { let thing = MyStruct { s1: None }; match thing { - MyStruct { .., Some(_) } => {}, //~ ERROR pattern does not mention field `s1` + MyStruct { .., Some(_) } => {}, //~^ ERROR expected `,` //~| ERROR expected `}`, found `,` _ => {} diff --git a/src/test/ui/resolve/issue-54379.stderr b/src/test/ui/resolve/issue-54379.stderr index 60a6f904610..2a6b54572de 100644 --- a/src/test/ui/resolve/issue-54379.stderr +++ b/src/test/ui/resolve/issue-54379.stderr @@ -13,12 +13,5 @@ error: expected `,` LL | MyStruct { .., Some(_) } => {}, | ^^^^ -error[E0027]: pattern does not mention field `s1` - --> $DIR/issue-54379.rs:9:9 - | -LL | MyStruct { .., Some(_) } => {}, - | ^^^^^^^^^^^^^^^^^^^^^^^^ missing field `s1` - -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0027`. |
