about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-06-22 12:59:57 +0000
committerbors <bors@rust-lang.org>2020-06-22 12:59:57 +0000
commit62878c20e9ce146123fbac23a98e44dfaae95d69 (patch)
tree7c00b342398c48898a8cba76e31ecfdde193f127 /src/test
parent1a4e2b6f9c75a0e21722c88a0e3b610d6ffc3ae3 (diff)
parentc5e6f48544a1a9dfdfc6a953d5c9d56c399bcb7d (diff)
downloadrust-62878c20e9ce146123fbac23a98e44dfaae95d69.tar.gz
rust-62878c20e9ce146123fbac23a98e44dfaae95d69.zip
Auto merge of #73617 - Dylan-DPC:rollup-zugh80o, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #71660 (impl PartialEq<Vec<B>> for &[A], &mut [A])
 - #72623 (Prefer accessible paths in 'use' suggestions)
 - #73502 (Add E0765)
 - #73580 (deprecate wrapping_offset_from)
 - #73582 (Miri: replace many bug! by span_bug!)
 - #73585 (Do not send a notification for P-high stable regressions)

Failed merges:

 - #73581 (Create 0766 error code)

r? @ghost
Diffstat (limited to 'src/test')
-rw-r--r--src/test/rustdoc-ui/test-compile-fail3.stderr3
-rw-r--r--src/test/rustdoc-ui/unparseable-doc-test.stdout3
-rw-r--r--src/test/ui/codemap_tests/tab_2.stderr3
-rw-r--r--src/test/ui/hygiene/globs.stderr6
-rw-r--r--src/test/ui/issues/issue-26545.rs12
-rw-r--r--src/test/ui/issues/issue-26545.stderr14
-rw-r--r--src/test/ui/issues/issue-35675.rs2
-rw-r--r--src/test/ui/issues/issue-42944.rs12
-rw-r--r--src/test/ui/issues/issue-42944.stderr14
-rw-r--r--src/test/ui/issues/issue-4366-2.stderr4
-rw-r--r--src/test/ui/issues/issue-4366.stderr4
-rw-r--r--src/test/ui/issues/issue-44078.stderr3
-rw-r--r--src/test/ui/parser/unbalanced-doublequote.stderr3
-rw-r--r--src/test/ui/privacy/privacy-ns1.stderr18
-rw-r--r--src/test/ui/privacy/privacy-ns2.stderr18
-rw-r--r--src/test/ui/resolve/issue-21221-1.stderr5
16 files changed, 60 insertions, 64 deletions
diff --git a/src/test/rustdoc-ui/test-compile-fail3.stderr b/src/test/rustdoc-ui/test-compile-fail3.stderr
index 7a2f1815ed8..fab801b3bea 100644
--- a/src/test/rustdoc-ui/test-compile-fail3.stderr
+++ b/src/test/rustdoc-ui/test-compile-fail3.stderr
@@ -1,4 +1,4 @@
-error: unterminated double quote string
+error[E0765]: unterminated double quote string
  --> $DIR/test-compile-fail3.rs:3:1
   |
 3 | "fail
@@ -6,3 +6,4 @@ error: unterminated double quote string
 
 error: aborting due to previous error
 
+For more information about this error, try `rustc --explain E0765`.
diff --git a/src/test/rustdoc-ui/unparseable-doc-test.stdout b/src/test/rustdoc-ui/unparseable-doc-test.stdout
index 4ea6455d3aa..29cb22e2e4b 100644
--- a/src/test/rustdoc-ui/unparseable-doc-test.stdout
+++ b/src/test/rustdoc-ui/unparseable-doc-test.stdout
@@ -5,7 +5,7 @@ test $DIR/unparseable-doc-test.rs - foo (line 6) ... FAILED
 failures:
 
 ---- $DIR/unparseable-doc-test.rs - foo (line 6) stdout ----
-error: unterminated double quote string
+error[E0765]: unterminated double quote string
   --> $DIR/unparseable-doc-test.rs:8:1
    |
 LL | "unterminated
@@ -13,6 +13,7 @@ LL | "unterminated
 
 error: aborting due to previous error
 
+For more information about this error, try `rustc --explain E0765`.
 Couldn't compile the test.
 
 failures:
diff --git a/src/test/ui/codemap_tests/tab_2.stderr b/src/test/ui/codemap_tests/tab_2.stderr
index 70414bbd953..0bfdc3ac265 100644
--- a/src/test/ui/codemap_tests/tab_2.stderr
+++ b/src/test/ui/codemap_tests/tab_2.stderr
@@ -1,4 +1,4 @@
-error: unterminated double quote string
+error[E0765]: unterminated double quote string
   --> $DIR/tab_2.rs:4:7
    |
 LL |                   """;
@@ -8,3 +8,4 @@ LL | | }
 
 error: aborting due to previous error
 
+For more information about this error, try `rustc --explain E0765`.
diff --git a/src/test/ui/hygiene/globs.stderr b/src/test/ui/hygiene/globs.stderr
index 8f6b7aca8fd..6dcbf055a8b 100644
--- a/src/test/ui/hygiene/globs.stderr
+++ b/src/test/ui/hygiene/globs.stderr
@@ -23,14 +23,10 @@ LL | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
-help: consider importing one of these items
+help: consider importing this function
    |
 LL | use bar::g;
    |
-LL | use foo::test2::test::g;
-   |
-LL | use foo::test::g;
-   |
 
 error[E0425]: cannot find function `f` in this scope
   --> $DIR/globs.rs:61:12
diff --git a/src/test/ui/issues/issue-26545.rs b/src/test/ui/issues/issue-26545.rs
new file mode 100644
index 00000000000..5652ee74706
--- /dev/null
+++ b/src/test/ui/issues/issue-26545.rs
@@ -0,0 +1,12 @@
+mod foo {
+    pub struct B(pub ());
+}
+
+mod baz {
+    fn foo() {
+        B(());
+        //~^ ERROR cannot find function, tuple struct or tuple variant `B` in this scope [E0425]
+    }
+}
+
+fn main() {}
diff --git a/src/test/ui/issues/issue-26545.stderr b/src/test/ui/issues/issue-26545.stderr
new file mode 100644
index 00000000000..d3c86692501
--- /dev/null
+++ b/src/test/ui/issues/issue-26545.stderr
@@ -0,0 +1,14 @@
+error[E0425]: cannot find function, tuple struct or tuple variant `B` in this scope
+  --> $DIR/issue-26545.rs:7:9
+   |
+LL |         B(());
+   |         ^ not found in this scope
+   |
+help: consider importing this tuple struct
+   |
+LL |     use foo::B;
+   |
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0425`.
diff --git a/src/test/ui/issues/issue-35675.rs b/src/test/ui/issues/issue-35675.rs
index 7876811a9ac..683761667d4 100644
--- a/src/test/ui/issues/issue-35675.rs
+++ b/src/test/ui/issues/issue-35675.rs
@@ -33,7 +33,7 @@ fn qux() -> Some {
 fn main() {}
 
 mod x {
-    enum Enum {
+    pub enum Enum {
         Variant1,
         Variant2(),
         Variant3(usize),
diff --git a/src/test/ui/issues/issue-42944.rs b/src/test/ui/issues/issue-42944.rs
index cc365dc4c93..a088f91554d 100644
--- a/src/test/ui/issues/issue-42944.rs
+++ b/src/test/ui/issues/issue-42944.rs
@@ -1,20 +1,20 @@
 mod foo {
-    pub struct B(());
+    pub struct Bx(());
 }
 
 mod bar {
-    use foo::B;
+    use foo::Bx;
 
     fn foo() {
-        B(());
-        //~^ ERROR expected function, tuple struct or tuple variant, found struct `B` [E0423]
+        Bx(());
+        //~^ ERROR expected function, tuple struct or tuple variant, found struct `Bx` [E0423]
     }
 }
 
 mod baz {
     fn foo() {
-        B(());
-        //~^ ERROR cannot find function, tuple struct or tuple variant `B` in this scope [E0425]
+        Bx(());
+        //~^ ERROR cannot find function, tuple struct or tuple variant `Bx` in this scope [E0425]
     }
 }
 
diff --git a/src/test/ui/issues/issue-42944.stderr b/src/test/ui/issues/issue-42944.stderr
index e7e251e39c0..9fad43757ba 100644
--- a/src/test/ui/issues/issue-42944.stderr
+++ b/src/test/ui/issues/issue-42944.stderr
@@ -1,18 +1,18 @@
-error[E0423]: expected function, tuple struct or tuple variant, found struct `B`
+error[E0423]: expected function, tuple struct or tuple variant, found struct `Bx`
   --> $DIR/issue-42944.rs:9:9
    |
-LL |         B(());
-   |         ^ constructor is not visible here due to private fields
+LL |         Bx(());
+   |         ^^ constructor is not visible here due to private fields
 
-error[E0425]: cannot find function, tuple struct or tuple variant `B` in this scope
+error[E0425]: cannot find function, tuple struct or tuple variant `Bx` in this scope
   --> $DIR/issue-42944.rs:16:9
    |
-LL |         B(());
-   |         ^ not found in this scope
+LL |         Bx(());
+   |         ^^ not found in this scope
    |
 help: consider importing this tuple struct
    |
-LL |     use foo::B;
+LL |     use foo::Bx;
    |
 
 error: aborting due to 2 previous errors
diff --git a/src/test/ui/issues/issue-4366-2.stderr b/src/test/ui/issues/issue-4366-2.stderr
index ecee595d4ab..a86ec7fabea 100644
--- a/src/test/ui/issues/issue-4366-2.stderr
+++ b/src/test/ui/issues/issue-4366-2.stderr
@@ -15,12 +15,10 @@ error[E0423]: expected function, found module `foo`
 LL |     foo();
    |     ^^^ not a function
    |
-help: consider importing one of these items instead
+help: consider importing this function instead
    |
 LL | use foo::foo;
    |
-LL | use m1::foo;
-   |
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-4366.stderr b/src/test/ui/issues/issue-4366.stderr
index a094180572d..469ea93e904 100644
--- a/src/test/ui/issues/issue-4366.stderr
+++ b/src/test/ui/issues/issue-4366.stderr
@@ -4,12 +4,10 @@ error[E0425]: cannot find function `foo` in this scope
 LL |         fn sub() -> isize { foo(); 1 }
    |                             ^^^ not found in this scope
    |
-help: consider importing one of these items
+help: consider importing this function
    |
 LL |         use foo::foo;
    |
-LL |         use m1::foo;
-   |
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-44078.stderr b/src/test/ui/issues/issue-44078.stderr
index 43b49e46312..daf67219f4d 100644
--- a/src/test/ui/issues/issue-44078.stderr
+++ b/src/test/ui/issues/issue-44078.stderr
@@ -1,4 +1,4 @@
-error: unterminated double quote string
+error[E0765]: unterminated double quote string
   --> $DIR/issue-44078.rs:2:8
    |
 LL |       "😊"";
@@ -8,3 +8,4 @@ LL | | }
 
 error: aborting due to previous error
 
+For more information about this error, try `rustc --explain E0765`.
diff --git a/src/test/ui/parser/unbalanced-doublequote.stderr b/src/test/ui/parser/unbalanced-doublequote.stderr
index 4d98515c224..94b300a7bd7 100644
--- a/src/test/ui/parser/unbalanced-doublequote.stderr
+++ b/src/test/ui/parser/unbalanced-doublequote.stderr
@@ -1,4 +1,4 @@
-error: unterminated double quote string
+error[E0765]: unterminated double quote string
   --> $DIR/unbalanced-doublequote.rs:5:5
    |
 LL | /     "
@@ -7,3 +7,4 @@ LL | | }
 
 error: aborting due to previous error
 
+For more information about this error, try `rustc --explain E0765`.
diff --git a/src/test/ui/privacy/privacy-ns1.stderr b/src/test/ui/privacy/privacy-ns1.stderr
index 4d2af735fa6..eda9d4c128d 100644
--- a/src/test/ui/privacy/privacy-ns1.stderr
+++ b/src/test/ui/privacy/privacy-ns1.stderr
@@ -11,14 +11,10 @@ help: a unit struct with a similar name exists
    |
 LL |     Baz();
    |     ^^^
-help: consider importing one of these items instead
-   |
-LL | use foo1::Bar;
+help: consider importing this function instead
    |
 LL | use foo2::Bar;
    |
-LL | use foo3::Bar;
-   |
 
 error[E0425]: cannot find function, tuple struct or tuple variant `Bar` in this scope
   --> $DIR/privacy-ns1.rs:51:5
@@ -33,14 +29,10 @@ help: a unit struct with a similar name exists
    |
 LL |     Baz();
    |     ^^^
-help: consider importing one of these items
-   |
-LL | use foo1::Bar;
+help: consider importing this function
    |
 LL | use foo2::Bar;
    |
-LL | use foo3::Bar;
-   |
 
 error[E0412]: cannot find type `Bar` in this scope
   --> $DIR/privacy-ns1.rs:52:17
@@ -55,14 +47,10 @@ help: a struct with a similar name exists
    |
 LL |     let _x: Box<Baz>;
    |                 ^^^
-help: consider importing one of these items
+help: consider importing this trait
    |
 LL | use foo1::Bar;
    |
-LL | use foo2::Bar;
-   |
-LL | use foo3::Bar;
-   |
 
 error[E0107]: wrong number of const arguments: expected 0, found 1
   --> $DIR/privacy-ns1.rs:35:17
diff --git a/src/test/ui/privacy/privacy-ns2.stderr b/src/test/ui/privacy/privacy-ns2.stderr
index f1aa523742a..d7d9b835275 100644
--- a/src/test/ui/privacy/privacy-ns2.stderr
+++ b/src/test/ui/privacy/privacy-ns2.stderr
@@ -4,14 +4,10 @@ error[E0423]: expected function, tuple struct or tuple variant, found trait `Bar
 LL |     Bar();
    |     ^^^ not a function, tuple struct or tuple variant
    |
-help: consider importing one of these items instead
-   |
-LL | use foo1::Bar;
+help: consider importing this function instead
    |
 LL | use foo2::Bar;
    |
-LL | use foo3::Bar;
-   |
 
 error[E0423]: expected function, tuple struct or tuple variant, found trait `Bar`
   --> $DIR/privacy-ns2.rs:26:5
@@ -26,14 +22,10 @@ help: a unit struct with a similar name exists
    |
 LL |     Baz();
    |     ^^^
-help: consider importing one of these items instead
-   |
-LL | use foo1::Bar;
+help: consider importing this function instead
    |
 LL | use foo2::Bar;
    |
-LL | use foo3::Bar;
-   |
 
 error[E0573]: expected type, found function `Bar`
   --> $DIR/privacy-ns2.rs:43:14
@@ -45,14 +37,10 @@ help: use `=` if you meant to assign
    |
 LL |     let _x = Bar();
    |            ^
-help: consider importing one of these items instead
+help: consider importing this trait instead
    |
 LL | use foo1::Bar;
    |
-LL | use foo2::Bar;
-   |
-LL | use foo3::Bar;
-   |
 
 error[E0603]: trait `Bar` is private
   --> $DIR/privacy-ns2.rs:63:15
diff --git a/src/test/ui/resolve/issue-21221-1.stderr b/src/test/ui/resolve/issue-21221-1.stderr
index d3e19534353..538eeead9fc 100644
--- a/src/test/ui/resolve/issue-21221-1.stderr
+++ b/src/test/ui/resolve/issue-21221-1.stderr
@@ -25,11 +25,8 @@ LL | use mul1::Mul;
    |
 LL | use mul2::Mul;
    |
-LL | use mul3::Mul;
-   |
-LL | use mul4::Mul;
+LL | use std::ops::Mul;
    |
-     and 2 other candidates
 
 error[E0405]: cannot find trait `ThisTraitReallyDoesntExistInAnyModuleReally` in this scope
   --> $DIR/issue-21221-1.rs:63:6