about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-11-14 08:03:01 +0000
committerbors <bors@rust-lang.org>2019-11-14 08:03:01 +0000
commita2491ee4e6c74451371aee8f4a2a5786d7a35406 (patch)
tree276dc5a1368ab04c84a6387bf15bffab129aa5ff /src/test
parent5e380b797b22e5361a43b2b82f6278df17d89f3e (diff)
parentd145d1e72c184177f40447c63b2813dcef729860 (diff)
Auto merge of #66403 - JohnTitor:rollup-7obuivl, r=JohnTitor
Rollup of 9 pull requests

Successful merges:

 - #66253 (Improve errors after re rebalance coherence)
 - #66264 (fix an ICE in macro's diagnostic message)
 - #66349 (expand source_util macros with def-site context)
 - #66351 (Tweak non-char/numeric in range pattern diagnostic)
 - #66360 (Fix link to Exten in Vec::set_len)
 - #66361 (parser: don't use `unreachable!()` in `fn unexpected`.)
 - #66363 (Improve error message in make_tests)
 - #66369 (compiletest: Obtain timestamps for common inputs only once)
 - #66372 (Fix broken links in Ipv4Addr::is_benchmarking docs)

Failed merges:

r? @ghost
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/coherence/coherence-all-remote.stderr1
-rw-r--r--src/test/ui/coherence/coherence-bigint-param.stderr7
-rw-r--r--src/test/ui/coherence/coherence-cross-crate-conflict.stderr1
-rw-r--r--src/test/ui/coherence/coherence-lone-type-parameter.stderr1
-rw-r--r--src/test/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr1
-rw-r--r--src/test/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].stderr2
-rw-r--r--src/test/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr1
-rw-r--r--src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.stderr2
-rw-r--r--src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].stderr2
-rw-r--r--src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.stderr2
-rw-r--r--src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs4
-rw-r--r--src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.stderr14
-rw-r--r--src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].rs4
-rw-r--r--src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].stderr14
-rw-r--r--src/test/ui/coherence/impl[t]-foreign[local]-for-t.rs2
-rw-r--r--src/test/ui/coherence/impl[t]-foreign[local]-for-t.stderr7
-rw-r--r--src/test/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr1
-rw-r--r--src/test/ui/coherence/impl[t]-foreign[t]-for-fundamental.stderr2
-rw-r--r--src/test/ui/coherence/impl[t]-foreign[t]-for-t.stderr1
-rw-r--r--src/test/ui/error-codes/E0029-teach.stderr7
-rw-r--r--src/test/ui/error-codes/E0029.stderr8
-rw-r--r--src/test/ui/error-codes/e0119/issue-28981.stderr1
-rw-r--r--src/test/ui/issues/issue-41974.stderr1
-rw-r--r--src/test/ui/match/match-range-fail.rs9
-rw-r--r--src/test/ui/match/match-range-fail.stderr28
-rw-r--r--src/test/ui/orphan-check-diagnostics.stderr1
-rw-r--r--src/test/ui/parser/issue-66357-unexpected-unreachable.rs14
-rw-r--r--src/test/ui/parser/issue-66357-unexpected-unreachable.stderr16
-rw-r--r--src/test/ui/parser/macros-no-semicolon-items.stderr6
-rw-r--r--src/test/ui/parser/mbe_missing_right_paren.rs3
-rw-r--r--src/test/ui/parser/mbe_missing_right_paren.stderr31
-rw-r--r--src/test/ui/parser/recover-range-pats.stderr72
-rw-r--r--src/test/ui/pattern/patkind-litrange-no-expr.stderr8
-rw-r--r--src/test/ui/qualified/qualified-path-params.stderr7
34 files changed, 178 insertions, 103 deletions
diff --git a/src/test/ui/coherence/coherence-all-remote.stderr b/src/test/ui/coherence/coherence-all-remote.stderr
index b35ae46f888..6ecfb2c5eb0 100644
--- a/src/test/ui/coherence/coherence-all-remote.stderr
+++ b/src/test/ui/coherence/coherence-all-remote.stderr
@@ -4,6 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
 LL | impl<T> Remote1<T> for isize { }
    |      ^ type parameter `T` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error: aborting due to previous error
diff --git a/src/test/ui/coherence/coherence-bigint-param.stderr b/src/test/ui/coherence/coherence-bigint-param.stderr
index bb81d7adea2..d431c5f4b52 100644
--- a/src/test/ui/coherence/coherence-bigint-param.stderr
+++ b/src/test/ui/coherence/coherence-bigint-param.stderr
@@ -1,10 +1,11 @@
-error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
+error[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`BigInt`)
   --> $DIR/coherence-bigint-param.rs:8:6
    |
 LL | impl<T> Remote1<BigInt> for T { }
-   |      ^ type parameter `T` must be used as the type parameter for some local type
+   |      ^ type parameter `T` must be covered by another type when it appears before the first local type (`BigInt`)
    |
-   = note: only traits defined in the current crate can be implemented for a type parameter
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local, and no uncovered type parameters appear before that first local type
+   = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/coherence/coherence-cross-crate-conflict.stderr b/src/test/ui/coherence/coherence-cross-crate-conflict.stderr
index cb66f9b0c7f..c00751a0f23 100644
--- a/src/test/ui/coherence/coherence-cross-crate-conflict.stderr
+++ b/src/test/ui/coherence/coherence-cross-crate-conflict.stderr
@@ -13,6 +13,7 @@ error[E0210]: type parameter `A` must be used as the type parameter for some loc
 LL | impl<A> Foo for A {
    |      ^ type parameter `A` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error: aborting due to 2 previous errors
diff --git a/src/test/ui/coherence/coherence-lone-type-parameter.stderr b/src/test/ui/coherence/coherence-lone-type-parameter.stderr
index 3791d96302b..2c3b4fc3ad2 100644
--- a/src/test/ui/coherence/coherence-lone-type-parameter.stderr
+++ b/src/test/ui/coherence/coherence-lone-type-parameter.stderr
@@ -4,6 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
 LL | impl<T> Remote for T { }
    |      ^ type parameter `T` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error: aborting due to previous error
diff --git a/src/test/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr b/src/test/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr
index 69194bdaf56..8a951d407ca 100644
--- a/src/test/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr
+++ b/src/test/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr
@@ -4,6 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
 LL | impl<T> Remote for Box<T> {
    |      ^ type parameter `T` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error: aborting due to previous error
diff --git a/src/test/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].stderr b/src/test/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].stderr
index b0f34419bb3..c5759244eff 100644
--- a/src/test/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].stderr
+++ b/src/test/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].stderr
@@ -4,6 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
 LL | impl<T> Remote1<u32> for Box<T> {
    |      ^ type parameter `T` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
@@ -12,6 +13,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
 LL | impl<'a, T> Remote1<u32> for &'a T {
    |          ^ type parameter `T` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error: aborting due to 2 previous errors
diff --git a/src/test/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr b/src/test/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr
index 002f8b7286a..e8663fd7d82 100644
--- a/src/test/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr
+++ b/src/test/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr
@@ -4,6 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
 LL | impl<T> Remote1<u32> for T {
    |      ^ type parameter `T` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error: aborting due to previous error
diff --git a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.stderr b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.stderr
index 0c43936e6d4..639bee2b8ec 100644
--- a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.stderr
+++ b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.stderr
@@ -4,6 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
 LL | impl<T> Remote1<Box<T>> for u32 {
    |      ^ type parameter `T` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
@@ -12,6 +13,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
 LL | impl<'a, T> Remote1<&'a T> for u32 {
    |          ^ type parameter `T` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error: aborting due to 2 previous errors
diff --git a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].stderr b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].stderr
index f81f15b204b..0b6c81b53cd 100644
--- a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].stderr
+++ b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].stderr
@@ -4,6 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
 LL | impl<'a, T> Remote1<Box<T>> for &'a T {
    |          ^ type parameter `T` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
@@ -12,6 +13,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
 LL | impl<'a, T> Remote1<&'a T> for Box<T> {
    |          ^ type parameter `T` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error: aborting due to 2 previous errors
diff --git a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.stderr b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.stderr
index 24fd492c57c..fe40490822e 100644
--- a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.stderr
+++ b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.stderr
@@ -4,6 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
 LL | impl<T> Remote1<Box<T>> for T {
    |      ^ type parameter `T` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
@@ -12,6 +13,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
 LL | impl<'a, T> Remote1<&'a T> for T {
    |          ^ type parameter `T` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error: aborting due to 2 previous errors
diff --git a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs
index 4666e449ca9..c9e3594cd34 100644
--- a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs
+++ b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs
@@ -8,11 +8,11 @@ use std::rc::Rc;
 struct Local;
 
 impl<T> Remote2<Box<T>, Local> for u32 {
-    //~^ ERROR type parameter `T` must be used as the type parameter for some local type
+    //~^ ERROR type parameter `T` must be covered by another type
 }
 
 impl<'a, T> Remote2<&'a T, Local> for u32 {
-    //~^ ERROR type parameter `T` must be used as the type parameter for some local type
+    //~^ ERROR type parameter `T` must be covered by another type
 }
 
 fn main() {}
diff --git a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.stderr b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.stderr
index 6a1db165416..1eaef59b3f8 100644
--- a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.stderr
+++ b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.stderr
@@ -1,18 +1,20 @@
-error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
+error[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
   --> $DIR/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs:10:6
    |
 LL | impl<T> Remote2<Box<T>, Local> for u32 {
-   |      ^ type parameter `T` must be used as the type parameter for some local type
+   |      ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
    |
-   = note: only traits defined in the current crate can be implemented for a type parameter
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local, and no uncovered type parameters appear before that first local type
+   = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
 
-error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
+error[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
   --> $DIR/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs:14:10
    |
 LL | impl<'a, T> Remote2<&'a T, Local> for u32 {
-   |          ^ type parameter `T` must be used as the type parameter for some local type
+   |          ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
    |
-   = note: only traits defined in the current crate can be implemented for a type parameter
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local, and no uncovered type parameters appear before that first local type
+   = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].rs b/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].rs
index db88c330b39..7709bd9c89b 100644
--- a/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].rs
+++ b/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].rs
@@ -8,11 +8,11 @@ use std::rc::Rc;
 struct Local;
 
 impl<T> Remote1<Local> for Box<T> {
-    //~^ ERROR type parameter `T` must be used as the type parameter for some local type
+    //~^ ERROR type parameter `T` must be covered by another type
 }
 
 impl<T> Remote1<Local> for &T {
-    //~^ ERROR type parameter `T` must be used as the type parameter for some local type
+    //~^ ERROR type parameter `T` must be covered by another type
 }
 
 fn main() {}
diff --git a/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].stderr b/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].stderr
index b5fdb16c2f3..4d39186d494 100644
--- a/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].stderr
+++ b/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].stderr
@@ -1,18 +1,20 @@
-error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
+error[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
   --> $DIR/impl[t]-foreign[local]-for-fundamental[t].rs:10:6
    |
 LL | impl<T> Remote1<Local> for Box<T> {
-   |      ^ type parameter `T` must be used as the type parameter for some local type
+   |      ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
    |
-   = note: only traits defined in the current crate can be implemented for a type parameter
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local, and no uncovered type parameters appear before that first local type
+   = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
 
-error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
+error[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
   --> $DIR/impl[t]-foreign[local]-for-fundamental[t].rs:14:6
    |
 LL | impl<T> Remote1<Local> for &T {
-   |      ^ type parameter `T` must be used as the type parameter for some local type
+   |      ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
    |
-   = note: only traits defined in the current crate can be implemented for a type parameter
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local, and no uncovered type parameters appear before that first local type
+   = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/coherence/impl[t]-foreign[local]-for-t.rs b/src/test/ui/coherence/impl[t]-foreign[local]-for-t.rs
index dd4110d31e6..eed3a4b5c23 100644
--- a/src/test/ui/coherence/impl[t]-foreign[local]-for-t.rs
+++ b/src/test/ui/coherence/impl[t]-foreign[local]-for-t.rs
@@ -8,7 +8,7 @@ use std::rc::Rc;
 struct Local;
 
 impl<T> Remote1<Local> for T {
-    //~^ ERROR type parameter `T` must be used as the type parameter for some local type
+    //~^ ERROR type parameter `T` must be covered by another type
 }
 
 fn main() {}
diff --git a/src/test/ui/coherence/impl[t]-foreign[local]-for-t.stderr b/src/test/ui/coherence/impl[t]-foreign[local]-for-t.stderr
index 7b65212f62a..d74be4cec72 100644
--- a/src/test/ui/coherence/impl[t]-foreign[local]-for-t.stderr
+++ b/src/test/ui/coherence/impl[t]-foreign[local]-for-t.stderr
@@ -1,10 +1,11 @@
-error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
+error[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
   --> $DIR/impl[t]-foreign[local]-for-t.rs:10:6
    |
 LL | impl<T> Remote1<Local> for T {
-   |      ^ type parameter `T` must be used as the type parameter for some local type
+   |      ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
    |
-   = note: only traits defined in the current crate can be implemented for a type parameter
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local, and no uncovered type parameters appear before that first local type
+   = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr b/src/test/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr
index 2e5ae6a8eb3..b26feb4914c 100644
--- a/src/test/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr
+++ b/src/test/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr
@@ -4,6 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
 LL | impl<T> Remote1<T> for u32 {
    |      ^ type parameter `T` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error: aborting due to previous error
diff --git a/src/test/ui/coherence/impl[t]-foreign[t]-for-fundamental.stderr b/src/test/ui/coherence/impl[t]-foreign[t]-for-fundamental.stderr
index 3976f06947f..5e8cc552c98 100644
--- a/src/test/ui/coherence/impl[t]-foreign[t]-for-fundamental.stderr
+++ b/src/test/ui/coherence/impl[t]-foreign[t]-for-fundamental.stderr
@@ -4,6 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
 LL | impl<T> Remote1<T> for Box<T> {
    |      ^ type parameter `T` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error[E0210]: type parameter `B` must be used as the type parameter for some local type (e.g., `MyStruct<B>`)
@@ -12,6 +13,7 @@ error[E0210]: type parameter `B` must be used as the type parameter for some loc
 LL | impl<'a, A, B> Remote1<A> for &'a B {
    |             ^ type parameter `B` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error: aborting due to 2 previous errors
diff --git a/src/test/ui/coherence/impl[t]-foreign[t]-for-t.stderr b/src/test/ui/coherence/impl[t]-foreign[t]-for-t.stderr
index 8d858b8abee..d3226d33bee 100644
--- a/src/test/ui/coherence/impl[t]-foreign[t]-for-t.stderr
+++ b/src/test/ui/coherence/impl[t]-foreign[t]-for-t.stderr
@@ -4,6 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
 LL | impl<T> Remote1<T> for T {
    |      ^ type parameter `T` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error: aborting due to previous error
diff --git a/src/test/ui/error-codes/E0029-teach.stderr b/src/test/ui/error-codes/E0029-teach.stderr
index 998ef4bc1d7..ec146ca86f5 100644
--- a/src/test/ui/error-codes/E0029-teach.stderr
+++ b/src/test/ui/error-codes/E0029-teach.stderr
@@ -2,10 +2,11 @@ error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/E0029-teach.rs:7:9
    |
 LL |         "hello" ..= "world" => {}
-   |         ^^^^^^^^^^^^^^^^^^^ ranges require char or numeric types
+   |         -------^^^^^-------
+   |         |           |
+   |         |           this is of type `&'static str` but it should be `char` or numeric
+   |         this is of type `&'static str` but it should be `char` or numeric
    |
-   = note: start type: &'static str
-   = note: end type: &'static str
    = note: In a match expression, only numbers and characters can be matched against a range. This is because the compiler checks that the range is non-empty at compile-time, and is unable to evaluate arbitrary comparison functions. If you want to capture values of an orderable type between two end-points, you can use a guard.
 
 error: aborting due to previous error
diff --git a/src/test/ui/error-codes/E0029.stderr b/src/test/ui/error-codes/E0029.stderr
index 209d219191c..e54722ae7b9 100644
--- a/src/test/ui/error-codes/E0029.stderr
+++ b/src/test/ui/error-codes/E0029.stderr
@@ -2,10 +2,10 @@ error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/E0029.rs:5:9
    |
 LL |         "hello" ..= "world" => {}
-   |         ^^^^^^^^^^^^^^^^^^^ ranges require char or numeric types
-   |
-   = note: start type: &'static str
-   = note: end type: &'static str
+   |         -------^^^^^-------
+   |         |           |
+   |         |           this is of type `&'static str` but it should be `char` or numeric
+   |         this is of type `&'static str` but it should be `char` or numeric
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/e0119/issue-28981.stderr b/src/test/ui/error-codes/e0119/issue-28981.stderr
index ec8e8144d42..2a78cc8b2db 100644
--- a/src/test/ui/error-codes/e0119/issue-28981.stderr
+++ b/src/test/ui/error-codes/e0119/issue-28981.stderr
@@ -14,6 +14,7 @@ error[E0210]: type parameter `Foo` must be used as the type parameter for some l
 LL | impl<Foo> Deref for Foo { }
    |      ^^^ type parameter `Foo` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error: aborting due to 2 previous errors
diff --git a/src/test/ui/issues/issue-41974.stderr b/src/test/ui/issues/issue-41974.stderr
index 12d4da71599..9f164822dea 100644
--- a/src/test/ui/issues/issue-41974.stderr
+++ b/src/test/ui/issues/issue-41974.stderr
@@ -21,6 +21,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
 LL | impl<T> Drop for T where T: A {
    |      ^ type parameter `T` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error: aborting due to 3 previous errors
diff --git a/src/test/ui/match/match-range-fail.rs b/src/test/ui/match/match-range-fail.rs
index 8a3678577b4..252d4cbf162 100644
--- a/src/test/ui/match/match-range-fail.rs
+++ b/src/test/ui/match/match-range-fail.rs
@@ -3,15 +3,16 @@ fn main() {
         "bar" ..= "foo" => { }
     };
     //~^^ ERROR only char and numeric types are allowed in range
-    //~| start type: &'static str
-    //~| end type: &'static str
 
     match "wow" {
         10 ..= "what" => ()
     };
     //~^^ ERROR only char and numeric types are allowed in range
-    //~| start type: {integer}
-    //~| end type: &'static str
+
+    match "wow" {
+        true ..= "what" => {}
+    };
+    //~^^ ERROR only char and numeric types are allowed in range
 
     match 5 {
         'c' ..= 100 => { }
diff --git a/src/test/ui/match/match-range-fail.stderr b/src/test/ui/match/match-range-fail.stderr
index 3fd2a499e2b..25fa9c2f618 100644
--- a/src/test/ui/match/match-range-fail.stderr
+++ b/src/test/ui/match/match-range-fail.stderr
@@ -2,22 +2,30 @@ error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/match-range-fail.rs:3:9
    |
 LL |         "bar" ..= "foo" => { }
-   |         ^^^^^^^^^^^^^^^ ranges require char or numeric types
-   |
-   = note: start type: &'static str
-   = note: end type: &'static str
+   |         -----^^^^^-----
+   |         |         |
+   |         |         this is of type `&'static str` but it should be `char` or numeric
+   |         this is of type `&'static str` but it should be `char` or numeric
 
 error[E0029]: only char and numeric types are allowed in range patterns
-  --> $DIR/match-range-fail.rs:10:16
+  --> $DIR/match-range-fail.rs:8:16
    |
 LL |         10 ..= "what" => ()
-   |                ^^^^^^ ranges require char or numeric types
+   |         --     ^^^^^^ this is of type `&'static str` but it should be `char` or numeric
+   |         |
+   |         this is of type `{integer}`
+
+error[E0029]: only char and numeric types are allowed in range patterns
+  --> $DIR/match-range-fail.rs:13:9
    |
-   = note: start type: {integer}
-   = note: end type: &'static str
+LL |         true ..= "what" => {}
+   |         ----^^^^^------
+   |         |        |
+   |         |        this is of type `&'static str` but it should be `char` or numeric
+   |         this is of type `bool` but it should be `char` or numeric
 
 error[E0308]: mismatched types
-  --> $DIR/match-range-fail.rs:17:9
+  --> $DIR/match-range-fail.rs:18:9
    |
 LL |         'c' ..= 100 => { }
    |         ^^^^^^^^^^^ expected integer, found char
@@ -25,7 +33,7 @@ LL |         'c' ..= 100 => { }
    = note: expected type `{integer}`
               found type `char`
 
-error: aborting due to 3 previous errors
+error: aborting due to 4 previous errors
 
 Some errors have detailed explanations: E0029, E0308.
 For more information about an error, try `rustc --explain E0029`.
diff --git a/src/test/ui/orphan-check-diagnostics.stderr b/src/test/ui/orphan-check-diagnostics.stderr
index cb21b26bba7..c84d401898c 100644
--- a/src/test/ui/orphan-check-diagnostics.stderr
+++ b/src/test/ui/orphan-check-diagnostics.stderr
@@ -4,6 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
 LL | impl<T> RemoteTrait for T where T: LocalTrait {}
    |      ^ type parameter `T` must be used as the type parameter for some local type
    |
+   = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
 error: aborting due to previous error
diff --git a/src/test/ui/parser/issue-66357-unexpected-unreachable.rs b/src/test/ui/parser/issue-66357-unexpected-unreachable.rs
new file mode 100644
index 00000000000..1730adfa914
--- /dev/null
+++ b/src/test/ui/parser/issue-66357-unexpected-unreachable.rs
@@ -0,0 +1,14 @@
+// The problem in #66357 was that the call trace:
+//
+// - parse_fn_block_decl
+// - expect_or
+// - unexpected
+// - expect_one_of
+// - expected_one_of_not_found
+// - recover_closing_delimiter
+//
+// ended up bubbling up `Ok(true)` to `unexpected` which then used `unreachable!()`.
+
+fn f() { |[](* }
+//~^ ERROR expected one of `,` or `:`, found `(`
+//~| ERROR expected one of `)`, `-`, `_`, `box`, `mut`, `ref`, `|`, identifier, or path, found `*`
diff --git a/src/test/ui/parser/issue-66357-unexpected-unreachable.stderr b/src/test/ui/parser/issue-66357-unexpected-unreachable.stderr
new file mode 100644
index 00000000000..00d84e2afe3
--- /dev/null
+++ b/src/test/ui/parser/issue-66357-unexpected-unreachable.stderr
@@ -0,0 +1,16 @@
+error: expected one of `,` or `:`, found `(`
+  --> $DIR/issue-66357-unexpected-unreachable.rs:12:13
+   |
+LL | fn f() { |[](* }
+   |             ^ expected one of `,` or `:`
+
+error: expected one of `)`, `-`, `_`, `box`, `mut`, `ref`, `|`, identifier, or path, found `*`
+  --> $DIR/issue-66357-unexpected-unreachable.rs:12:14
+   |
+LL | fn f() { |[](* }
+   |             -^ help: `)` may belong here
+   |             |
+   |             unclosed delimiter
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/parser/macros-no-semicolon-items.stderr b/src/test/ui/parser/macros-no-semicolon-items.stderr
index 980ceeed8c6..f9019b78c8d 100644
--- a/src/test/ui/parser/macros-no-semicolon-items.stderr
+++ b/src/test/ui/parser/macros-no-semicolon-items.stderr
@@ -6,8 +6,8 @@ LL | macro_rules! foo()
    |
 help: change the delimiters to curly braces
    |
-LL | macro_rules! foo {}
-   |                  ^^
+LL | macro_rules! foo{}
+   |                 ^^
 help: add a semicolon
    |
 LL | macro_rules! foo();
@@ -26,7 +26,7 @@ LL | | )
    |
 help: change the delimiters to curly braces
    |
-LL | bar! {
+LL | bar!{
 LL |     blah
 LL |     blah
 LL |     blah
diff --git a/src/test/ui/parser/mbe_missing_right_paren.rs b/src/test/ui/parser/mbe_missing_right_paren.rs
new file mode 100644
index 00000000000..689176b3eb7
--- /dev/null
+++ b/src/test/ui/parser/mbe_missing_right_paren.rs
@@ -0,0 +1,3 @@
+// ignore-tidy-trailing-newlines
+// error-pattern: aborting due to 3 previous errors
+macro_rules! abc(ؼ
\ No newline at end of file
diff --git a/src/test/ui/parser/mbe_missing_right_paren.stderr b/src/test/ui/parser/mbe_missing_right_paren.stderr
new file mode 100644
index 00000000000..4504fc0eb00
--- /dev/null
+++ b/src/test/ui/parser/mbe_missing_right_paren.stderr
@@ -0,0 +1,31 @@
+error: this file contains an un-closed delimiter
+  --> $DIR/mbe_missing_right_paren.rs:3:19
+   |
+LL | macro_rules! abc(ؼ
+   |                 - ^
+   |                 |
+   |                 un-closed delimiter
+
+error: macros that expand to items must be delimited with braces or followed by a semicolon
+  --> $DIR/mbe_missing_right_paren.rs:3:17
+   |
+LL | macro_rules! abc(ؼ
+   |                 ^^
+   |
+help: change the delimiters to curly braces
+   |
+LL | macro_rules! abc{ؼ}
+   |                 ^ ^
+help: add a semicolon
+   |
+LL | macro_rules! abc(ؼ;
+   |                   ^
+
+error: unexpected end of macro invocation
+  --> $DIR/mbe_missing_right_paren.rs:3:1
+   |
+LL | macro_rules! abc(ؼ
+   | ^^^^^^^^^^^^^^^^^^ missing tokens in macro arguments
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/parser/recover-range-pats.stderr b/src/test/ui/parser/recover-range-pats.stderr
index 89ec059cb82..160ab18e34a 100644
--- a/src/test/ui/parser/recover-range-pats.stderr
+++ b/src/test/ui/parser/recover-range-pats.stderr
@@ -401,19 +401,17 @@ error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:19:12
    |
 LL |     if let true..Y = 0 {}
-   |            ^^^^ ranges require char or numeric types
-   |
-   = note: start type: bool
-   = note: end type: u8
+   |            ^^^^  - this is of type `u8`
+   |            |
+   |            this is of type `bool` but it should be `char` or numeric
 
 error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:20:15
    |
 LL |     if let X..true = 0 {}
-   |               ^^^^ ranges require char or numeric types
-   |
-   = note: start type: u8
-   = note: end type: bool
+   |            -  ^^^^ this is of type `bool` but it should be `char` or numeric
+   |            |
+   |            this is of type `u8`
 
 error[E0308]: mismatched types
   --> $DIR/recover-range-pats.rs:21:12
@@ -437,19 +435,17 @@ error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:32:12
    |
 LL |     if let true..=Y = 0 {}
-   |            ^^^^ ranges require char or numeric types
-   |
-   = note: start type: bool
-   = note: end type: u8
+   |            ^^^^   - this is of type `u8`
+   |            |
+   |            this is of type `bool` but it should be `char` or numeric
 
 error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:33:16
    |
 LL |     if let X..=true = 0 {}
-   |                ^^^^ ranges require char or numeric types
-   |
-   = note: start type: u8
-   = note: end type: bool
+   |            -   ^^^^ this is of type `bool` but it should be `char` or numeric
+   |            |
+   |            this is of type `u8`
 
 error[E0308]: mismatched types
   --> $DIR/recover-range-pats.rs:34:12
@@ -473,19 +469,17 @@ error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:45:12
    |
 LL |     if let true...Y = 0 {}
-   |            ^^^^ ranges require char or numeric types
-   |
-   = note: start type: bool
-   = note: end type: u8
+   |            ^^^^   - this is of type `u8`
+   |            |
+   |            this is of type `bool` but it should be `char` or numeric
 
 error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:47:16
    |
 LL |     if let X...true = 0 {}
-   |                ^^^^ ranges require char or numeric types
-   |
-   = note: start type: u8
-   = note: end type: bool
+   |            -   ^^^^ this is of type `bool` but it should be `char` or numeric
+   |            |
+   |            this is of type `u8`
 
 error[E0308]: mismatched types
   --> $DIR/recover-range-pats.rs:49:12
@@ -509,10 +503,7 @@ error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:60:12
    |
 LL |     if let true.. = 0 {}
-   |            ^^^^ ranges require char or numeric types
-   |
-   = note: start type: bool
-   = note: end type: [type error]
+   |            ^^^^ this is of type `bool` but it should be `char` or numeric
 
 error[E0308]: mismatched types
   --> $DIR/recover-range-pats.rs:62:12
@@ -527,10 +518,7 @@ error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:70:12
    |
 LL |     if let true..= = 0 {}
-   |            ^^^^ ranges require char or numeric types
-   |
-   = note: start type: bool
-   = note: end type: [type error]
+   |            ^^^^ this is of type `bool` but it should be `char` or numeric
 
 error[E0308]: mismatched types
   --> $DIR/recover-range-pats.rs:72:12
@@ -545,10 +533,7 @@ error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:82:12
    |
 LL |     if let true... = 0 {}
-   |            ^^^^ ranges require char or numeric types
-   |
-   = note: start type: bool
-   = note: end type: [type error]
+   |            ^^^^ this is of type `bool` but it should be `char` or numeric
 
 error[E0308]: mismatched types
   --> $DIR/recover-range-pats.rs:85:12
@@ -563,10 +548,7 @@ error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:94:14
    |
 LL |     if let ..true = 0 {}
-   |              ^^^^ ranges require char or numeric types
-   |
-   = note: start type: [type error]
-   = note: end type: bool
+   |              ^^^^ this is of type `bool` but it should be `char` or numeric
 
 error[E0308]: mismatched types
   --> $DIR/recover-range-pats.rs:96:12
@@ -581,10 +563,7 @@ error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:104:15
    |
 LL |     if let ..=true = 0 {}
-   |               ^^^^ ranges require char or numeric types
-   |
-   = note: start type: [type error]
-   = note: end type: bool
+   |               ^^^^ this is of type `bool` but it should be `char` or numeric
 
 error[E0308]: mismatched types
   --> $DIR/recover-range-pats.rs:106:12
@@ -599,10 +578,7 @@ error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:116:15
    |
 LL |     if let ...true = 0 {}
-   |               ^^^^ ranges require char or numeric types
-   |
-   = note: start type: [type error]
-   = note: end type: bool
+   |               ^^^^ this is of type `bool` but it should be `char` or numeric
 
 error[E0308]: mismatched types
   --> $DIR/recover-range-pats.rs:119:12
diff --git a/src/test/ui/pattern/patkind-litrange-no-expr.stderr b/src/test/ui/pattern/patkind-litrange-no-expr.stderr
index 7474d326793..78768d282e7 100644
--- a/src/test/ui/pattern/patkind-litrange-no-expr.stderr
+++ b/src/test/ui/pattern/patkind-litrange-no-expr.stderr
@@ -7,11 +7,11 @@ LL |     Arith = 1 + 1,
 error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/patkind-litrange-no-expr.rs:20:13
    |
+LL |                 $( $value ..= 42 => Some($name::$variant), )* // PatKind::Range
+   |                               -- this is of type `{integer}`
+...
 LL |     Arith = 1 + 1,
-   |             ^^^^^ ranges require char or numeric types
-   |
-   = note: start type: {integer}
-   = note: end type: {integer}
+   |             ^^^^^ this is of type `_` but it should be `char` or numeric
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/qualified/qualified-path-params.stderr b/src/test/ui/qualified/qualified-path-params.stderr
index 92792f2e86a..7a74a37021b 100644
--- a/src/test/ui/qualified/qualified-path-params.stderr
+++ b/src/test/ui/qualified/qualified-path-params.stderr
@@ -8,10 +8,9 @@ error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/qualified-path-params.rs:22:15
    |
 LL |         0 ..= <S as Tr>::A::f::<u8> => {}
-   |               ^^^^^^^^^^^^^^^^^^^^^ ranges require char or numeric types
-   |
-   = note: start type: {integer}
-   = note: end type: fn() {S::f::<u8>}
+   |         -     ^^^^^^^^^^^^^^^^^^^^^ this is of type `fn() {S::f::<u8>}` but it should be `char` or numeric
+   |         |
+   |         this is of type `{integer}`
 
 error: aborting due to 2 previous errors