diff options
| author | bors <bors@rust-lang.org> | 2018-01-31 20:51:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-01-31 20:51:02 +0000 |
| commit | 8ccab7eed5f4fc93500fbf242e575073ca70d7cb (patch) | |
| tree | f0bd6d1dd0033e29407991b9bbe13c7c7a764abf /src/test | |
| parent | 560a2f4faf4828ba5f48fe2bd7709265c2f5354d (diff) | |
| parent | af95302d3cb2f5cd59eb38b88eab6a054d965e9f (diff) | |
Auto merge of #47900 - kennytm:rollup, r=kennytm
Rollup of 16 pull requests - Successful merges: #47838, #47840, #47844, #47874, #47875, #47876, #47884, #47886, #47889, #47890, #47891, #47795, #47677, #47893, #47895, #47552 - Failed merges:
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/codegen/function-arguments.rs | 4 | ||||
| -rw-r--r-- | src/test/compile-fail/associated-const-type-parameter-arms.rs | 7 | ||||
| -rw-r--r-- | src/test/run-make/stdin-non-utf8/Makefile | 6 | ||||
| -rw-r--r-- | src/test/run-make/stdin-non-utf8/non-utf8 | 1 | ||||
| -rw-r--r-- | src/test/run-pass/issue-47638.rs | 18 | ||||
| -rw-r--r-- | src/test/run-pass/sse2.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/blind-item-item-shadow.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/double-import.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/imports/duplicate.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/issue-26886.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/issue-47706-trait.rs | 16 | ||||
| -rw-r--r-- | src/test/ui/issue-47706-trait.stderr | 12 | ||||
| -rw-r--r-- | src/test/ui/resolve-conflict-item-vs-import.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/suggestions/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/use-mod.stderr | 2 |
15 files changed, 73 insertions, 17 deletions
diff --git a/src/test/codegen/function-arguments.rs b/src/test/codegen/function-arguments.rs index f8945a6ee8d..0e98d3f9050 100644 --- a/src/test/codegen/function-arguments.rs +++ b/src/test/codegen/function-arguments.rs @@ -122,13 +122,13 @@ pub fn unsafe_slice(_: &[UnsafeInner]) { pub fn str(_: &[u8]) { } -// CHECK: @trait_borrow(%"core::ops::drop::Drop"* nonnull %arg0.0, {}* noalias nonnull readonly %arg0.1) +// CHECK: @trait_borrow({}* nonnull %arg0.0, {}* noalias nonnull readonly %arg0.1) // FIXME #25759 This should also have `nocapture` #[no_mangle] pub fn trait_borrow(_: &Drop) { } -// CHECK: @trait_box(%"core::ops::drop::Drop"* noalias nonnull, {}* noalias nonnull readonly) +// CHECK: @trait_box({}* noalias nonnull, {}* noalias nonnull readonly) #[no_mangle] pub fn trait_box(_: Box<Drop>) { } diff --git a/src/test/compile-fail/associated-const-type-parameter-arms.rs b/src/test/compile-fail/associated-const-type-parameter-arms.rs index 52bb4a1b463..630a234fa66 100644 --- a/src/test/compile-fail/associated-const-type-parameter-arms.rs +++ b/src/test/compile-fail/associated-const-type-parameter-arms.rs @@ -16,6 +16,7 @@ pub trait Foo { } struct Abc; + impl Foo for Abc { const X: EFoo = EFoo::B; } @@ -27,8 +28,10 @@ impl Foo for Def { pub fn test<A: Foo, B: Foo>(arg: EFoo) { match arg { - A::X => println!("A::X"), //~ error: statics cannot be referenced in patterns [E0158] - B::X => println!("B::X"), //~ error: statics cannot be referenced in patterns [E0158] + A::X => println!("A::X"), + //~^ error: associated consts cannot be referenced in patterns [E0158] + B::X => println!("B::X"), + //~^ error: associated consts cannot be referenced in patterns [E0158] _ => (), } } diff --git a/src/test/run-make/stdin-non-utf8/Makefile b/src/test/run-make/stdin-non-utf8/Makefile new file mode 100644 index 00000000000..7948c442616 --- /dev/null +++ b/src/test/run-make/stdin-non-utf8/Makefile @@ -0,0 +1,6 @@ +-include ../tools.mk + +all: + cp non-utf8 $(TMPDIR)/non-utf.rs + cat $(TMPDIR)/non-utf.rs | $(RUSTC) - 2>&1 \ + | $(CGREP) "error: couldn't read from stdin, as it did not contain valid UTF-8" diff --git a/src/test/run-make/stdin-non-utf8/non-utf8 b/src/test/run-make/stdin-non-utf8/non-utf8 new file mode 100644 index 00000000000..bc87051a852 --- /dev/null +++ b/src/test/run-make/stdin-non-utf8/non-utf8 @@ -0,0 +1 @@ +Ò diff --git a/src/test/run-pass/issue-47638.rs b/src/test/run-pass/issue-47638.rs new file mode 100644 index 00000000000..6f627b2a3c1 --- /dev/null +++ b/src/test/run-pass/issue-47638.rs @@ -0,0 +1,18 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn id<'c, 'b>(f: &'c &'b Fn(&i32)) -> &'c &'b Fn(&'static i32) { + f +} + +fn main() { + let f: &Fn(&i32) = &|x| {}; + id(&f); +} diff --git a/src/test/run-pass/sse2.rs b/src/test/run-pass/sse2.rs index c2414e5ff5d..22469b2fde0 100644 --- a/src/test/run-pass/sse2.rs +++ b/src/test/run-pass/sse2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// min-llvm-version 4.0 +// no-system-llvm -- needs MCSubtargetInfo::getFeatureTable() // ignore-cloudabi no std::env #![feature(cfg_target_feature)] diff --git a/src/test/ui/blind-item-item-shadow.stderr b/src/test/ui/blind-item-item-shadow.stderr index 855b3799eb5..d3588be2669 100644 --- a/src/test/ui/blind-item-item-shadow.stderr +++ b/src/test/ui/blind-item-item-shadow.stderr @@ -10,8 +10,8 @@ error[E0255]: the name `foo` is defined multiple times = note: `foo` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -13 | use foo::foo as Otherfoo; - | ^^^^^^^^^^^^^^^^^^^^ +13 | use foo::foo as other_foo; + | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/double-import.stderr b/src/test/ui/double-import.stderr index fcd3f2696f2..2a0f9ee34f2 100644 --- a/src/test/ui/double-import.stderr +++ b/src/test/ui/double-import.stderr @@ -9,8 +9,8 @@ error[E0252]: the name `foo` is defined multiple times = note: `foo` must be defined only once in the value namespace of this module help: You can use `as` to change the binding name of the import | -23 | use sub2::foo as Otherfoo; //~ ERROR the name `foo` is defined multiple times - | ^^^^^^^^^^^^^^^^^^^^^ +23 | use sub2::foo as other_foo; //~ ERROR the name `foo` is defined multiple times + | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/imports/duplicate.stderr b/src/test/ui/imports/duplicate.stderr index a74401314a1..6e5b91a11c9 100644 --- a/src/test/ui/imports/duplicate.stderr +++ b/src/test/ui/imports/duplicate.stderr @@ -9,8 +9,8 @@ error[E0252]: the name `foo` is defined multiple times = note: `foo` must be defined only once in the value namespace of this module help: You can use `as` to change the binding name of the import | -25 | use a::foo as Otherfoo; //~ ERROR the name `foo` is defined multiple times - | ^^^^^^^^^^^^^^^^^^ +25 | use a::foo as other_foo; //~ ERROR the name `foo` is defined multiple times + | ^^^^^^^^^^^^^^^^^^^ error[E0659]: `foo` is ambiguous --> $DIR/duplicate.rs:56:9 diff --git a/src/test/ui/issue-26886.stderr b/src/test/ui/issue-26886.stderr index cb2eca87068..e6424e535ee 100644 --- a/src/test/ui/issue-26886.stderr +++ b/src/test/ui/issue-26886.stderr @@ -24,8 +24,8 @@ error[E0252]: the name `sync` is defined multiple times = note: `sync` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -14 | use std::sync as Othersync; //~ ERROR the name `sync` is defined multiple times - | ^^^^^^^^^^^^^^^^^^^^^^ +14 | use std::sync as other_sync; //~ ERROR the name `sync` is defined multiple times + | ^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-47706-trait.rs b/src/test/ui/issue-47706-trait.rs new file mode 100644 index 00000000000..86a9da49a05 --- /dev/null +++ b/src/test/ui/issue-47706-trait.rs @@ -0,0 +1,16 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +trait T { + fn f(&self, _: ()) { + None::<()>.map(Self::f); + } + //~^^ ERROR function is expected to take a single 0-tuple as argument +} diff --git a/src/test/ui/issue-47706-trait.stderr b/src/test/ui/issue-47706-trait.stderr new file mode 100644 index 00000000000..320e98dee4a --- /dev/null +++ b/src/test/ui/issue-47706-trait.stderr @@ -0,0 +1,12 @@ +error[E0601]: main function not found + +error[E0593]: function is expected to take a single 0-tuple as argument, but it takes 2 distinct arguments + --> $DIR/issue-47706-trait.rs:13:20 + | +12 | fn f(&self, _: ()) { + | ------------------ takes 2 distinct arguments +13 | None::<()>.map(Self::f); + | ^^^ expected function that takes a single 0-tuple as argument + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/resolve-conflict-item-vs-import.stderr b/src/test/ui/resolve-conflict-item-vs-import.stderr index 03ef66681e4..e2245b8a8b1 100644 --- a/src/test/ui/resolve-conflict-item-vs-import.stderr +++ b/src/test/ui/resolve-conflict-item-vs-import.stderr @@ -10,8 +10,8 @@ error[E0255]: the name `transmute` is defined multiple times = note: `transmute` must be defined only once in the value namespace of this module help: You can use `as` to change the binding name of the import | -11 | use std::mem::transmute as Othertransmute; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11 | use std::mem::transmute as other_transmute; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/suggestions/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr b/src/test/ui/suggestions/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr index d2ac15f7ffc..01dba62a851 100644 --- a/src/test/ui/suggestions/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr +++ b/src/test/ui/suggestions/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr @@ -7,7 +7,7 @@ error[E0259]: the name `std` is defined multiple times = note: `std` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -11 | extern crate std as Otherstd; +11 | extern crate std as other_std; | error: aborting due to previous error diff --git a/src/test/ui/use-mod.stderr b/src/test/ui/use-mod.stderr index bb64909e64a..1c9f306f493 100644 --- a/src/test/ui/use-mod.stderr +++ b/src/test/ui/use-mod.stderr @@ -25,7 +25,7 @@ error[E0252]: the name `bar` is defined multiple times = note: `bar` must be defined only once in the type namespace of this module help: You can use `as` to change the binding name of the import | -15 | self as Otherbar +15 | self as other_bar | error: aborting due to 3 previous errors |
