diff options
| author | bors <bors@rust-lang.org> | 2016-11-14 14:04:54 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-14 14:04:54 -0800 |
| commit | bd6a54db740e65e84f148e19cd6ab354d478b6a3 (patch) | |
| tree | 42887addda0e7330ec4373d9a99f4ed76e156e9a | |
| parent | 2154588f7a71a788cd098081d1915e0dda705e1f (diff) | |
| parent | 321602452311bbfdb8feb7db339cef93d436a9d4 (diff) | |
| download | rust-bd6a54db740e65e84f148e19cd6ab354d478b6a3.tar.gz rust-bd6a54db740e65e84f148e19cd6ab354d478b6a3.zip | |
Auto merge of #37771 - alexcrichton:fix-nightlies, r=brson
test: Move missing-items to a ui test This test is failing on nightly for unknown reasons, and my best guess is a difference in grep versions which is interpreting symbols differently. For now let's just move this to a ui test and hope it fixes nightlies.
| -rw-r--r-- | src/test/run-make/missing-items/Makefile | 10 | ||||
| -rw-r--r-- | src/test/ui/missing-items/auxiliary/m1.rs (renamed from src/test/run-make/missing-items/m1.rs) | 8 | ||||
| -rw-r--r-- | src/test/ui/missing-items/m2.rs (renamed from src/test/run-make/missing-items/m2.rs) | 4 | ||||
| -rw-r--r-- | src/test/ui/missing-items/m2.stderr | 14 |
4 files changed, 21 insertions, 15 deletions
diff --git a/src/test/run-make/missing-items/Makefile b/src/test/run-make/missing-items/Makefile deleted file mode 100644 index bcc9cdf2d65..00000000000 --- a/src/test/run-make/missing-items/Makefile +++ /dev/null @@ -1,10 +0,0 @@ --include ../tools.mk - -all: - $(RUSTC) m1.rs -C prefer-dynamic - $(RUSTC) m2.rs 2>&1 | grep "error\[E0046\]: not all trait items implemented, missing: .*" - $(RUSTC) m2.rs 2>&1 | grep " --> m2.rs:18:1" - $(RUSTC) m2.rs 2>&1 | grep " | ^ missing .CONSTANT., .Type., .method. in implementation" - $(RUSTC) m2.rs 2>&1 | grep " = note: .CONSTANT. from trait: .const CONSTANT: u32;." - $(RUSTC) m2.rs 2>&1 | grep " = note: .Type. from trait: .type Type;." - $(RUSTC) m2.rs 2>&1 | grep " = note: .method. from trait: .fn(&Self, std::string::String) -> <Self as m1::X>::Type." diff --git a/src/test/run-make/missing-items/m1.rs b/src/test/ui/missing-items/auxiliary/m1.rs index 060c7a9571b..f8389692267 100644 --- a/src/test/run-make/missing-items/m1.rs +++ b/src/test/ui/missing-items/auxiliary/m1.rs @@ -9,9 +9,9 @@ // except according to those terms. #![feature(associated_consts)] -#![crate_type = "dylib"] + pub trait X { - const CONSTANT: u32; - type Type; - fn method(&self, s: String) -> Self::Type; + const CONSTANT: u32; + type Type; + fn method(&self, s: String) -> Self::Type; } diff --git a/src/test/run-make/missing-items/m2.rs b/src/test/ui/missing-items/m2.rs index 7055673acc9..fc09039640b 100644 --- a/src/test/run-make/missing-items/m2.rs +++ b/src/test/ui/missing-items/m2.rs @@ -8,8 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// aux-build:m1.rs + #![feature(associated_consts)] -#![crate_type = "dylib"] + extern crate m1; struct X { diff --git a/src/test/ui/missing-items/m2.stderr b/src/test/ui/missing-items/m2.stderr new file mode 100644 index 00000000000..caeb9ff415c --- /dev/null +++ b/src/test/ui/missing-items/m2.stderr @@ -0,0 +1,14 @@ +error: main function not found + +error[E0046]: not all trait items implemented, missing: `CONSTANT`, `Type`, `method` + --> $DIR/m2.rs:20:1 + | +20 | impl m1::X for X { + | ^ missing `CONSTANT`, `Type`, `method` in implementation + | + = note: `CONSTANT` from trait: `const CONSTANT: u32;` + = note: `Type` from trait: `type Type;` + = note: `method` from trait: `fn(&Self, std::string::String) -> <Self as m1::X>::Type` + +error: aborting due to previous error + |
