about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-08-02 06:12:23 -0700
committerGitHub <noreply@github.com>2016-08-02 06:12:23 -0700
commit32e462ef99e2f61b75e2b0ef37048d50ad8ccf6c (patch)
treec28042027b4845f70058ac29352ea772490110c3 /src/test
parent97d5be98191038f24bf3c98f772cbf1662486581 (diff)
parent6656a30ca161d3ea46add7e6538f74ed1e671e4e (diff)
downloadrust-32e462ef99e2f61b75e2b0ef37048d50ad8ccf6c.tar.gz
rust-32e462ef99e2f61b75e2b0ef37048d50ad8ccf6c.zip
Auto merge of #35145 - jseyfried:avoid_extra_resolve_error, r=arielb1
resolve: Avoid emitting an unhelpful cascading resolution error

Fixes #35142.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/issue-3907.rs4
-rw-r--r--src/test/compile-fail/issue-5035.rs7
-rw-r--r--src/test/ui/codemap_tests/two_files.stderr7
3 files changed, 9 insertions, 9 deletions
diff --git a/src/test/compile-fail/issue-3907.rs b/src/test/compile-fail/issue-3907.rs
index c99ff1813e0..cbc09a028c2 100644
--- a/src/test/compile-fail/issue-3907.rs
+++ b/src/test/compile-fail/issue-3907.rs
@@ -11,14 +11,14 @@
 // aux-build:issue_3907.rs
 extern crate issue_3907;
 
-type Foo = issue_3907::Foo; //~ NOTE: type aliases cannot be used for traits
+type Foo = issue_3907::Foo;
 
 struct S {
     name: isize
 }
 
 impl Foo for S { //~ ERROR: `Foo` is not a trait
-    //~| `Foo` is not a trait
+                 //~| NOTE: type aliases cannot be used for traits
     fn bar() { }
 }
 
diff --git a/src/test/compile-fail/issue-5035.rs b/src/test/compile-fail/issue-5035.rs
index a186a399a11..9648d64d1fb 100644
--- a/src/test/compile-fail/issue-5035.rs
+++ b/src/test/compile-fail/issue-5035.rs
@@ -10,7 +10,10 @@
 
 trait I {}
 type K = I;
-//~^ NOTE: aliases cannot be used for traits
 impl K for isize {} //~ ERROR: `K` is not a trait
-//~| is not a trait
+                    //~| NOTE: aliases cannot be used for traits
+
+use ImportError; //~ ERROR unresolved
+impl ImportError for () {} // check that this is not an additional error (c.f. #35142)
+
 fn main() {}
diff --git a/src/test/ui/codemap_tests/two_files.stderr b/src/test/ui/codemap_tests/two_files.stderr
index 6c388cd6939..cf3f187af93 100644
--- a/src/test/ui/codemap_tests/two_files.stderr
+++ b/src/test/ui/codemap_tests/two_files.stderr
@@ -2,12 +2,9 @@ error[E0404]: `Bar` is not a trait
   --> $DIR/two_files.rs:16:6
    |
 16 | impl Bar for Baz { }
-   |      ^^^ `Bar` is not a trait
-   | 
-  ::: $DIR/two_files_data.rs
+   |      ^^^
    |
-15 | type Bar = Foo;
-   | --------------- type aliases cannot be used for traits
+   = note: type aliases cannot be used for traits
 
 error: cannot continue compilation due to previous error