about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/issue-23595-1.rs4
-rw-r--r--src/test/debuginfo/pretty-std-collections.rs11
-rw-r--r--src/test/rustdoc-ui/failed-doctest-output.stdout4
-rw-r--r--src/test/rustdoc-ui/private-item-doc-test.rs20
-rw-r--r--src/test/rustdoc-ui/private-item-doc-test.stderr16
-rw-r--r--src/test/ui-fulldeps/proc-macro/extern-prelude-extern-crate-proc-macro.rs2
-rw-r--r--src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr5
-rw-r--r--src/test/ui/associated-types/associated-types-incomplete-object.rs3
-rw-r--r--src/test/ui/associated-types/associated-types-incomplete-object.stderr30
-rw-r--r--src/test/ui/consts/const-err4.rs2
-rw-r--r--src/test/ui/consts/const-err4.stderr6
-rw-r--r--src/test/ui/consts/const-eval/const-pointer-values-in-various-types.rs4
-rw-r--r--src/test/ui/consts/const-eval/const-pointer-values-in-various-types.stderr12
-rw-r--r--src/test/ui/consts/const-eval/ub-enum.rs10
-rw-r--r--src/test/ui/consts/const-eval/ub-enum.stderr8
-rw-r--r--src/test/ui/consts/const-eval/union-const-eval-field.rs3
-rw-r--r--src/test/ui/consts/const-eval/union-const-eval-field.stderr9
-rw-r--r--src/test/ui/consts/const-eval/union-ice.rs2
-rw-r--r--src/test/ui/consts/const-eval/union-ice.stderr8
-rw-r--r--src/test/ui/consts/min_const_fn/loop_ice.rs5
-rw-r--r--src/test/ui/consts/min_const_fn/loop_ice.stderr8
-rw-r--r--src/test/ui/error-codes/E0107.rs3
-rw-r--r--src/test/ui/error-codes/E0107.stderr6
-rw-r--r--src/test/ui/error-codes/E0191.stderr5
-rw-r--r--src/test/ui/error-codes/E0220.stderr5
-rw-r--r--src/test/ui/feature-gates/feature-gate-extern_crate_item_prelude.rs46
-rw-r--r--src/test/ui/feature-gates/feature-gate-extern_crate_item_prelude.stderr75
-rw-r--r--src/test/ui/imports/auxiliary/issue-55811.rs5
-rw-r--r--src/test/ui/imports/auxiliary/issue-56125.rs9
-rw-r--r--src/test/ui/imports/extern-prelude-extern-crate-absolute-expanded.rs2
-rw-r--r--src/test/ui/imports/extern-prelude-extern-crate-cfg.rs1
-rw-r--r--src/test/ui/imports/extern-prelude-extern-crate-pass.rs2
-rw-r--r--src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs11
-rw-r--r--src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.stderr15
-rw-r--r--src/test/ui/imports/extern-prelude-extern-crate-shadowing.rs12
-rw-r--r--src/test/ui/imports/issue-55811.rs6
-rw-r--r--src/test/ui/imports/issue-56125.rs12
-rw-r--r--src/test/ui/imports/issue-56125.stderr46
-rw-r--r--src/test/ui/invalid-self-argument/bare-fn-start.rs5
-rw-r--r--src/test/ui/invalid-self-argument/bare-fn-start.stderr8
-rw-r--r--src/test/ui/invalid-self-argument/bare-fn.rs5
-rw-r--r--src/test/ui/invalid-self-argument/bare-fn.stderr8
-rw-r--r--src/test/ui/invalid-self-argument/trait-fn.rs11
-rw-r--r--src/test/ui/invalid-self-argument/trait-fn.stderr8
-rw-r--r--src/test/ui/issues/issue-19482.stderr5
-rw-r--r--src/test/ui/issues/issue-21950.stderr2
-rw-r--r--src/test/ui/issues/issue-22434.stderr5
-rw-r--r--src/test/ui/issues/issue-22560.stderr2
-rw-r--r--src/test/ui/issues/issue-23024.stderr2
-rw-r--r--src/test/ui/issues/issue-28344.stderr4
-rw-r--r--src/test/ui/issues/issue-56128.rs15
-rw-r--r--src/test/ui/lint/must_use-trait.rs22
-rw-r--r--src/test/ui/lint/must_use-trait.stderr14
-rw-r--r--src/test/ui/mismatched_types/closure-arg-count.rs2
-rw-r--r--src/test/ui/mismatched_types/closure-arg-count.stderr38
-rw-r--r--src/test/ui/panic-runtime/bad-panic-flag1.rs2
-rw-r--r--src/test/ui/panic-runtime/bad-panic-flag1.stderr2
-rw-r--r--src/test/ui/panic-runtime/bad-panic-flag2.rs2
-rw-r--r--src/test/ui/panic-runtime/bad-panic-flag2.stderr2
-rw-r--r--src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.rs8
-rw-r--r--src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr31
-rw-r--r--src/test/ui/traits/trait-alias-object.stderr2
62 files changed, 431 insertions, 207 deletions
diff --git a/src/test/compile-fail/issue-23595-1.rs b/src/test/compile-fail/issue-23595-1.rs
index a3422d859c6..1e615c4c0db 100644
--- a/src/test/compile-fail/issue-23595-1.rs
+++ b/src/test/compile-fail/issue-23595-1.rs
@@ -16,9 +16,7 @@ trait Hierarchy {
     type Value;
     type ChildKey;
     type Children = Index<Self::ChildKey, Output=Hierarchy>;
-    //~^ ERROR: the value of the associated type `ChildKey`
-    //~^^ ERROR: the value of the associated type `Children`
-    //~^^^ ERROR: the value of the associated type `Value`
+    //~^ ERROR: the value of the associated types `Value` (from the trait `Hierarchy`), `ChildKey`
 
     fn data(&self) -> Option<(Self::Value, Self::Children)>;
 }
diff --git a/src/test/debuginfo/pretty-std-collections.rs b/src/test/debuginfo/pretty-std-collections.rs
index 8e37a884b34..0d3f4b90f23 100644
--- a/src/test/debuginfo/pretty-std-collections.rs
+++ b/src/test/debuginfo/pretty-std-collections.rs
@@ -28,6 +28,9 @@
 // gdb-command: print vec_deque
 // gdb-check:$3 = VecDeque<i32>(len: 3, cap: 8) = {5, 3, 7}
 
+// gdb-command: print vec_deque2
+// gdb-check:$4 = VecDeque<i32>(len: 7, cap: 8) = {2, 3, 4, 5, 6, 7, 8}
+
 #![allow(unused_variables)]
 use std::collections::BTreeSet;
 use std::collections::BTreeMap;
@@ -54,6 +57,14 @@ fn main() {
     vec_deque.push_back(3);
     vec_deque.push_back(7);
 
+    // VecDeque where an element was popped.
+    let mut vec_deque2 = VecDeque::new();
+    for i in 1..8 {
+        vec_deque2.push_back(i)
+    }
+    vec_deque2.pop_front();
+    vec_deque2.push_back(8);
+
     zzz(); // #break
 }
 
diff --git a/src/test/rustdoc-ui/failed-doctest-output.stdout b/src/test/rustdoc-ui/failed-doctest-output.stdout
index 527f1355a9e..cab7bda6c67 100644
--- a/src/test/rustdoc-ui/failed-doctest-output.stdout
+++ b/src/test/rustdoc-ui/failed-doctest-output.stdout
@@ -12,7 +12,7 @@ error[E0425]: cannot find value `no` in this scope
 3 | no
   | ^^ not found in this scope
 
-thread '$DIR/failed-doctest-output.rs - OtherStruct (line 27)' panicked at 'couldn't compile the test', librustdoc/test.rs:323:13
+thread '$DIR/failed-doctest-output.rs - OtherStruct (line 27)' panicked at 'couldn't compile the test', src/librustdoc/test.rs:323:13
 note: Run with `RUST_BACKTRACE=1` for a backtrace.
 
 ---- $DIR/failed-doctest-output.rs - SomeStruct (line 21) stdout ----
@@ -21,7 +21,7 @@ thread '$DIR/failed-doctest-output.rs - SomeStruct (line 21)' panicked at 'test
 thread 'main' panicked at 'oh no', $DIR/failed-doctest-output.rs:3:1
 note: Run with `RUST_BACKTRACE=1` for a backtrace.
 
-', librustdoc/test.rs:358:17
+', src/librustdoc/test.rs:358:17
 
 
 failures:
diff --git a/src/test/rustdoc-ui/private-item-doc-test.rs b/src/test/rustdoc-ui/private-item-doc-test.rs
new file mode 100644
index 00000000000..5a13fe359f5
--- /dev/null
+++ b/src/test/rustdoc-ui/private-item-doc-test.rs
@@ -0,0 +1,20 @@
+// 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.
+
+#![deny(private_doc_tests)]
+
+mod foo {
+    /// private doc test
+    ///
+    /// ```
+    /// assert!(false);
+    /// ```
+    fn bar() {}
+}
diff --git a/src/test/rustdoc-ui/private-item-doc-test.stderr b/src/test/rustdoc-ui/private-item-doc-test.stderr
new file mode 100644
index 00000000000..b43add7ea50
--- /dev/null
+++ b/src/test/rustdoc-ui/private-item-doc-test.stderr
@@ -0,0 +1,16 @@
+error: Documentation test in private item
+  --> $DIR/private-item-doc-test.rs:14:5
+   |
+LL | /     /// private doc test
+LL | |     ///
+LL | |     /// ```
+LL | |     /// assert!(false);
+LL | |     /// ```
+   | |___________^
+   |
+note: lint level defined here
+  --> $DIR/private-item-doc-test.rs:11:9
+   |
+LL | #![deny(private_doc_tests)]
+   |         ^^^^^^^^^^^^^^^^^
+
diff --git a/src/test/ui-fulldeps/proc-macro/extern-prelude-extern-crate-proc-macro.rs b/src/test/ui-fulldeps/proc-macro/extern-prelude-extern-crate-proc-macro.rs
index e320ad97135..25a2a376147 100644
--- a/src/test/ui-fulldeps/proc-macro/extern-prelude-extern-crate-proc-macro.rs
+++ b/src/test/ui-fulldeps/proc-macro/extern-prelude-extern-crate-proc-macro.rs
@@ -1,8 +1,6 @@
 // compile-pass
 // edition:2018
 
-#![feature(extern_crate_item_prelude)]
-
 extern crate proc_macro;
 use proc_macro::TokenStream; // OK
 
diff --git a/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr b/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr
index 7a10b6d021f..b4285c0de29 100644
--- a/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr
+++ b/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr
@@ -25,8 +25,11 @@ LL | fn dent_object<COLOR>(c: BoxCar<Color=COLOR>) {
 error[E0191]: the value of the associated type `Color` (from the trait `Vehicle`) must be specified
   --> $DIR/associated-type-projection-from-multiple-supertraits.rs:33:26
    |
+LL |     type Color;
+   |     ----------- `Color` defined here
+...
 LL | fn dent_object<COLOR>(c: BoxCar<Color=COLOR>) {
-   |                          ^^^^^^^^^^^^^^^^^^^ missing associated type `Color` value
+   |                          ^^^^^^^^^^^^^^^^^^^ associated type `Color` must be specified
 
 error[E0221]: ambiguous associated type `Color` in bounds of `C`
   --> $DIR/associated-type-projection-from-multiple-supertraits.rs:38:29
diff --git a/src/test/ui/associated-types/associated-types-incomplete-object.rs b/src/test/ui/associated-types/associated-types-incomplete-object.rs
index 9f1df14605b..e575fd695b2 100644
--- a/src/test/ui/associated-types/associated-types-incomplete-object.rs
+++ b/src/test/ui/associated-types/associated-types-incomplete-object.rs
@@ -37,6 +37,5 @@ pub fn main() {
     //~^ ERROR the value of the associated type `A` (from the trait `Foo`) must be specified
 
     let d = &42isize as &Foo;
-    //~^ ERROR the value of the associated type `A` (from the trait `Foo`) must be specified
-    //~| ERROR the value of the associated type `B` (from the trait `Foo`) must be specified
+    //~^ ERROR the value of the associated types `A` (from the trait `Foo`), `B` (from the trait
 }
diff --git a/src/test/ui/associated-types/associated-types-incomplete-object.stderr b/src/test/ui/associated-types/associated-types-incomplete-object.stderr
index 95b1c631250..eb8e6f998a5 100644
--- a/src/test/ui/associated-types/associated-types-incomplete-object.stderr
+++ b/src/test/ui/associated-types/associated-types-incomplete-object.stderr
@@ -1,27 +1,35 @@
 error[E0191]: the value of the associated type `B` (from the trait `Foo`) must be specified
   --> $DIR/associated-types-incomplete-object.rs:33:26
    |
+LL |     type B;
+   |     ------- `B` defined here
+...
 LL |     let b = &42isize as &Foo<A=usize>;
-   |                          ^^^^^^^^^^^^ missing associated type `B` value
+   |                          ^^^^^^^^^^^^ associated type `B` must be specified
 
 error[E0191]: the value of the associated type `A` (from the trait `Foo`) must be specified
   --> $DIR/associated-types-incomplete-object.rs:36:26
    |
+LL |     type A;
+   |     ------- `A` defined here
+...
 LL |     let c = &42isize as &Foo<B=char>;
-   |                          ^^^^^^^^^^^ missing associated type `A` value
+   |                          ^^^^^^^^^^^ associated type `A` must be specified
 
-error[E0191]: the value of the associated type `A` (from the trait `Foo`) must be specified
-  --> $DIR/associated-types-incomplete-object.rs:39:26
-   |
-LL |     let d = &42isize as &Foo;
-   |                          ^^^ missing associated type `A` value
-
-error[E0191]: the value of the associated type `B` (from the trait `Foo`) must be specified
+error[E0191]: the value of the associated types `A` (from the trait `Foo`), `B` (from the trait `Foo`) must be specified
   --> $DIR/associated-types-incomplete-object.rs:39:26
    |
+LL |     type A;
+   |     ------- `A` defined here
+LL |     type B;
+   |     ------- `B` defined here
+...
 LL |     let d = &42isize as &Foo;
-   |                          ^^^ missing associated type `B` value
+   |                          ^^^
+   |                          |
+   |                          associated type `A` must be specified
+   |                          associated type `B` must be specified
 
-error: aborting due to 4 previous errors
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0191`.
diff --git a/src/test/ui/consts/const-err4.rs b/src/test/ui/consts/const-err4.rs
index 0bbc254453c..129177e9a1a 100644
--- a/src/test/ui/consts/const-err4.rs
+++ b/src/test/ui/consts/const-err4.rs
@@ -16,7 +16,7 @@ union Foo {
 
 enum Bar {
     Boo = [unsafe { Foo { b: () }.a }; 4][3],
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR it is undefined behavior to use this value
 }
 
 fn main() {
diff --git a/src/test/ui/consts/const-err4.stderr b/src/test/ui/consts/const-err4.stderr
index bb50f38062e..38a8f75a5c2 100644
--- a/src/test/ui/consts/const-err4.stderr
+++ b/src/test/ui/consts/const-err4.stderr
@@ -1,8 +1,10 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: it is undefined behavior to use this value
   --> $DIR/const-err4.rs:18:11
    |
 LL |     Boo = [unsafe { Foo { b: () }.a }; 4][3],
-   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempted to read undefined bytes
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized bytes, but expected initialized plain (non-pointer) bytes
+   |
+   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/consts/const-eval/const-pointer-values-in-various-types.rs b/src/test/ui/consts/const-eval/const-pointer-values-in-various-types.rs
index 23e1ab013ef..cc5ddb44016 100644
--- a/src/test/ui/consts/const-eval/const-pointer-values-in-various-types.rs
+++ b/src/test/ui/consts/const-eval/const-pointer-values-in-various-types.rs
@@ -37,7 +37,7 @@ fn main() {
     //~^ ERROR it is undefined behavior to use this value
 
     const I32_REF_U128_UNION: u128 = unsafe { Nonsense { int_32_ref: &3 }.uint_128 };
-    //~^ ERROR any use of this value will cause an error
+    //~^ ERROR it is undefined behavior to use this value
 
     const I32_REF_I8_UNION: i8 = unsafe { Nonsense { int_32_ref: &3 }.int_8 };
     //~^ ERROR any use of this value will cause an error
@@ -52,7 +52,7 @@ fn main() {
     //~^ ERROR it is undefined behavior to use this value
 
     const I32_REF_I128_UNION: i128 = unsafe { Nonsense { int_32_ref: &3 }.int_128 };
-    //~^ ERROR any use of this value will cause an error
+    //~^ ERROR it is undefined behavior to use this value
 
     const I32_REF_F32_UNION: f32 = unsafe { Nonsense { int_32_ref: &3 }.float_32 };
     //~^ ERROR any use of this value will cause an error
diff --git a/src/test/ui/consts/const-eval/const-pointer-values-in-various-types.stderr b/src/test/ui/consts/const-eval/const-pointer-values-in-various-types.stderr
index 0126743eede..786338222e3 100644
--- a/src/test/ui/consts/const-eval/const-pointer-values-in-various-types.stderr
+++ b/src/test/ui/consts/const-eval/const-pointer-values-in-various-types.stderr
@@ -40,11 +40,13 @@ LL |     const I32_REF_U64_UNION: u64 = unsafe { Nonsense { int_32_ref: &3 }.uin
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
 
-error: any use of this value will cause an error
+error[E0080]: it is undefined behavior to use this value
   --> $DIR/const-pointer-values-in-various-types.rs:39:5
    |
 LL |     const I32_REF_U128_UNION: u128 = unsafe { Nonsense { int_32_ref: &3 }.uint_128 };
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempted to read undefined bytes
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized bytes, but expected initialized plain (non-pointer) bytes
+   |
+   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
 
 error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:42:5
@@ -78,11 +80,13 @@ LL |     const I32_REF_I64_UNION: i64 = unsafe { Nonsense { int_32_ref: &3 }.int
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
 
-error: any use of this value will cause an error
+error[E0080]: it is undefined behavior to use this value
   --> $DIR/const-pointer-values-in-various-types.rs:54:5
    |
 LL |     const I32_REF_I128_UNION: i128 = unsafe { Nonsense { int_32_ref: &3 }.int_128 };
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempted to read undefined bytes
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized bytes, but expected initialized plain (non-pointer) bytes
+   |
+   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
 
 error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:57:5
diff --git a/src/test/ui/consts/const-eval/ub-enum.rs b/src/test/ui/consts/const-eval/ub-enum.rs
index 89b44946441..2bf85e25a21 100644
--- a/src/test/ui/consts/const-eval/ub-enum.rs
+++ b/src/test/ui/consts/const-eval/ub-enum.rs
@@ -16,12 +16,12 @@ enum Enum {
     A = 0,
 }
 union TransmuteEnum {
-    a: &'static u8,
-    out: Enum,
+    in1: &'static u8,
+    out1: Enum,
 }
 
 // A pointer is guaranteed non-null
-const BAD_ENUM: Enum = unsafe { TransmuteEnum { a: &1 }.out };
+const BAD_ENUM: Enum = unsafe { TransmuteEnum { in1: &1 }.out1 };
 //~^ ERROR is undefined behavior
 
 // (Potentially) invalid enum discriminant
@@ -48,8 +48,8 @@ const BAD_ENUM3: Enum2 = unsafe { TransmuteEnum2 { in2: &0 }.out1 };
 const BAD_ENUM4: Wrap<Enum2> = unsafe { TransmuteEnum2 { in2: &0 }.out2 };
 //~^ ERROR is undefined behavior
 
-// Undef enum discriminant. In an arry to avoid `Scalar` layout.
-const BAD_ENUM_UNDEF: [Enum2; 2] = [unsafe { TransmuteEnum2 { in3: () }.out1 }; 2];
+// Undef enum discriminant.
+const BAD_ENUM_UNDEF : Enum2 = unsafe { TransmuteEnum2 { in3: () }.out1 };
 //~^ ERROR is undefined behavior
 
 // Pointer value in an enum with a niche that is not just 0.
diff --git a/src/test/ui/consts/const-eval/ub-enum.stderr b/src/test/ui/consts/const-eval/ub-enum.stderr
index 5aae3a2f351..509faaa46f8 100644
--- a/src/test/ui/consts/const-eval/ub-enum.stderr
+++ b/src/test/ui/consts/const-eval/ub-enum.stderr
@@ -1,8 +1,8 @@
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-enum.rs:24:1
    |
-LL | const BAD_ENUM: Enum = unsafe { TransmuteEnum { a: &1 }.out };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a pointer, but expected a valid enum discriminant
+LL | const BAD_ENUM: Enum = unsafe { TransmuteEnum { in1: &1 }.out1 };
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a pointer, but expected a valid enum discriminant
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
 
@@ -33,8 +33,8 @@ LL | const BAD_ENUM4: Wrap<Enum2> = unsafe { TransmuteEnum2 { in2: &0 }.out2 };
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-enum.rs:52:1
    |
-LL | const BAD_ENUM_UNDEF: [Enum2; 2] = [unsafe { TransmuteEnum2 { in3: () }.out1 }; 2];
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized bytes at [0], but expected a valid enum discriminant
+LL | const BAD_ENUM_UNDEF : Enum2 = unsafe { TransmuteEnum2 { in3: () }.out1 };
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized bytes, but expected a valid enum discriminant
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
 
diff --git a/src/test/ui/consts/const-eval/union-const-eval-field.rs b/src/test/ui/consts/const-eval/union-const-eval-field.rs
index c0bfbc17629..2bdad3af889 100644
--- a/src/test/ui/consts/const-eval/union-const-eval-field.rs
+++ b/src/test/ui/consts/const-eval/union-const-eval-field.rs
@@ -34,7 +34,8 @@ const fn read_field2() -> Field2 {
 }
 
 const fn read_field3() -> Field3 {
-    const FIELD3: Field3 = unsafe { UNION.field3 }; //~ ERROR any use of this value
+    const FIELD3: Field3 = unsafe { UNION.field3 };
+    //~^ ERROR it is undefined behavior to use this value
     FIELD3
 }
 
diff --git a/src/test/ui/consts/const-eval/union-const-eval-field.stderr b/src/test/ui/consts/const-eval/union-const-eval-field.stderr
index 565cd916ffc..ca7cf2b028c 100644
--- a/src/test/ui/consts/const-eval/union-const-eval-field.stderr
+++ b/src/test/ui/consts/const-eval/union-const-eval-field.stderr
@@ -1,10 +1,11 @@
-error: any use of this value will cause an error
+error[E0080]: it is undefined behavior to use this value
   --> $DIR/union-const-eval-field.rs:37:5
    |
-LL |     const FIELD3: Field3 = unsafe { UNION.field3 }; //~ ERROR any use of this value
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempted to read undefined bytes
+LL |     const FIELD3: Field3 = unsafe { UNION.field3 };
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized bytes, but expected initialized plain (non-pointer) bytes
    |
-   = note: #[deny(const_err)] on by default
+   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
 
 error: aborting due to previous error
 
+For more information about this error, try `rustc --explain E0080`.
diff --git a/src/test/ui/consts/const-eval/union-ice.rs b/src/test/ui/consts/const-eval/union-ice.rs
index 0e4f1e09171..6bd63472b21 100644
--- a/src/test/ui/consts/const-eval/union-ice.rs
+++ b/src/test/ui/consts/const-eval/union-ice.rs
@@ -20,7 +20,7 @@ union DummyUnion {
 
 const UNION: DummyUnion = DummyUnion { field1: 1065353216 };
 
-const FIELD3: Field3 = unsafe { UNION.field3 }; //~ ERROR will cause an error
+const FIELD3: Field3 = unsafe { UNION.field3 }; //~ ERROR it is undefined behavior to use this value
 
 const FIELD_PATH: Struct = Struct { //~ ERROR it is undefined behavior to use this value
     a: 42,
diff --git a/src/test/ui/consts/const-eval/union-ice.stderr b/src/test/ui/consts/const-eval/union-ice.stderr
index 98c2c1472aa..7cadef24617 100644
--- a/src/test/ui/consts/const-eval/union-ice.stderr
+++ b/src/test/ui/consts/const-eval/union-ice.stderr
@@ -1,10 +1,10 @@
-error: any use of this value will cause an error
+error[E0080]: it is undefined behavior to use this value
   --> $DIR/union-ice.rs:23:1
    |
-LL | const FIELD3: Field3 = unsafe { UNION.field3 }; //~ ERROR will cause an error
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempted to read undefined bytes
+LL | const FIELD3: Field3 = unsafe { UNION.field3 }; //~ ERROR it is undefined behavior to use this value
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized bytes, but expected initialized plain (non-pointer) bytes
    |
-   = note: #[deny(const_err)] on by default
+   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
 
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/union-ice.rs:25:1
diff --git a/src/test/ui/consts/min_const_fn/loop_ice.rs b/src/test/ui/consts/min_const_fn/loop_ice.rs
new file mode 100644
index 00000000000..4278a8e2d00
--- /dev/null
+++ b/src/test/ui/consts/min_const_fn/loop_ice.rs
@@ -0,0 +1,5 @@
+const fn foo() {
+    loop {} //~ ERROR loops are not allowed in const fn
+}
+
+fn main() {}
diff --git a/src/test/ui/consts/min_const_fn/loop_ice.stderr b/src/test/ui/consts/min_const_fn/loop_ice.stderr
new file mode 100644
index 00000000000..1424cea65af
--- /dev/null
+++ b/src/test/ui/consts/min_const_fn/loop_ice.stderr
@@ -0,0 +1,8 @@
+error: loops are not allowed in const fn
+  --> $DIR/loop_ice.rs:2:5
+   |
+LL |     loop {} //~ ERROR loops are not allowed in const fn
+   |     ^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/error-codes/E0107.rs b/src/test/ui/error-codes/E0107.rs
index 815c7fefd2a..87ac9e37853 100644
--- a/src/test/ui/error-codes/E0107.rs
+++ b/src/test/ui/error-codes/E0107.rs
@@ -26,7 +26,8 @@ struct Baz<'a, 'b, 'c> {
     //~| unexpected lifetime argument
     foo2: Foo<'a, 'b, 'c>,
     //~^ ERROR E0107
-    //~| 2 unexpected lifetime arguments
+    //~| unexpected lifetime argument
+    //~| unexpected lifetime argument
 }
 
 fn main() {}
diff --git a/src/test/ui/error-codes/E0107.stderr b/src/test/ui/error-codes/E0107.stderr
index 497fa91bd4f..a07c92cf26a 100644
--- a/src/test/ui/error-codes/E0107.stderr
+++ b/src/test/ui/error-codes/E0107.stderr
@@ -11,10 +11,12 @@ LL |     bar: Bar<'a>,
    |              ^^ unexpected lifetime argument
 
 error[E0107]: wrong number of lifetime arguments: expected 1, found 3
-  --> $DIR/E0107.rs:27:11
+  --> $DIR/E0107.rs:27:19
    |
 LL |     foo2: Foo<'a, 'b, 'c>,
-   |           ^^^^^^^^^^^^^^^ 2 unexpected lifetime arguments
+   |                   ^^  ^^ unexpected lifetime argument
+   |                   |
+   |                   unexpected lifetime argument
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/error-codes/E0191.stderr b/src/test/ui/error-codes/E0191.stderr
index 08b0a845814..f07529e7e9e 100644
--- a/src/test/ui/error-codes/E0191.stderr
+++ b/src/test/ui/error-codes/E0191.stderr
@@ -1,8 +1,11 @@
 error[E0191]: the value of the associated type `Bar` (from the trait `Trait`) must be specified
   --> $DIR/E0191.rs:15:12
    |
+LL |     type Bar;
+   |     --------- `Bar` defined here
+...
 LL | type Foo = Trait; //~ ERROR E0191
-   |            ^^^^^ missing associated type `Bar` value
+   |            ^^^^^ associated type `Bar` must be specified
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0220.stderr b/src/test/ui/error-codes/E0220.stderr
index c8a587f2b53..d26e61fba8c 100644
--- a/src/test/ui/error-codes/E0220.stderr
+++ b/src/test/ui/error-codes/E0220.stderr
@@ -7,8 +7,11 @@ LL | type Foo = Trait<F=i32>; //~ ERROR E0220
 error[E0191]: the value of the associated type `Bar` (from the trait `Trait`) must be specified
   --> $DIR/E0220.rs:15:12
    |
+LL |     type Bar;
+   |     --------- `Bar` defined here
+...
 LL | type Foo = Trait<F=i32>; //~ ERROR E0220
-   |            ^^^^^^^^^^^^ missing associated type `Bar` value
+   |            ^^^^^^^^^^^^ associated type `Bar` must be specified
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/feature-gates/feature-gate-extern_crate_item_prelude.rs b/src/test/ui/feature-gates/feature-gate-extern_crate_item_prelude.rs
deleted file mode 100644
index 27b9a34ff4e..00000000000
--- a/src/test/ui/feature-gates/feature-gate-extern_crate_item_prelude.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-// edition:2018
-
-#![feature(alloc, underscore_imports)]
-
-extern crate alloc;
-
-mod in_scope {
-    fn check() {
-        let v = alloc::vec![0];
-        //~^ ERROR use of extern prelude names introduced with `extern crate` items is unstable
-        type A = alloc::boxed::Box<u8>;
-        //~^ ERROR use of extern prelude names introduced with `extern crate` items is unstable
-    }
-}
-
-mod absolute {
-    fn check() {
-        let v = ::alloc::vec![0];
-        //~^ ERROR use of extern prelude names introduced with `extern crate` items is unstable
-        type A = ::alloc::boxed::Box<u8>;
-        //~^ ERROR use of extern prelude names introduced with `extern crate` items is unstable
-    }
-}
-
-mod import_in_scope {
-    use alloc as _;
-    //~^ ERROR use of extern prelude names introduced with `extern crate` items is unstable
-    use alloc::boxed;
-    //~^ ERROR use of extern prelude names introduced with `extern crate` items is unstable
-}
-
-mod import_absolute {
-    use ::alloc;
-    //~^ ERROR use of extern prelude names introduced with `extern crate` items is unstable
-    use ::alloc::boxed;
-    //~^ ERROR use of extern prelude names introduced with `extern crate` items is unstable
-}
-
-extern crate alloc as core;
-
-mod unrelated_crate_renamed {
-    type A = core::boxed::Box<u8>;
-    //~^ ERROR use of extern prelude names introduced with `extern crate` items is unstable
-}
-
-fn main() {}
diff --git a/src/test/ui/feature-gates/feature-gate-extern_crate_item_prelude.stderr b/src/test/ui/feature-gates/feature-gate-extern_crate_item_prelude.stderr
deleted file mode 100644
index 103ab79ef84..00000000000
--- a/src/test/ui/feature-gates/feature-gate-extern_crate_item_prelude.stderr
+++ /dev/null
@@ -1,75 +0,0 @@
-error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #55599)
-  --> $DIR/feature-gate-extern_crate_item_prelude.rs:26:9
-   |
-LL |     use alloc as _;
-   |         ^^^^^
-   |
-   = help: add #![feature(extern_crate_item_prelude)] to the crate attributes to enable
-
-error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #55599)
-  --> $DIR/feature-gate-extern_crate_item_prelude.rs:28:9
-   |
-LL |     use alloc::boxed;
-   |         ^^^^^
-   |
-   = help: add #![feature(extern_crate_item_prelude)] to the crate attributes to enable
-
-error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #55599)
-  --> $DIR/feature-gate-extern_crate_item_prelude.rs:33:11
-   |
-LL |     use ::alloc;
-   |           ^^^^^
-   |
-   = help: add #![feature(extern_crate_item_prelude)] to the crate attributes to enable
-
-error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #55599)
-  --> $DIR/feature-gate-extern_crate_item_prelude.rs:35:11
-   |
-LL |     use ::alloc::boxed;
-   |           ^^^^^
-   |
-   = help: add #![feature(extern_crate_item_prelude)] to the crate attributes to enable
-
-error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #55599)
-  --> $DIR/feature-gate-extern_crate_item_prelude.rs:9:17
-   |
-LL |         let v = alloc::vec![0];
-   |                 ^^^^^
-   |
-   = help: add #![feature(extern_crate_item_prelude)] to the crate attributes to enable
-
-error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #55599)
-  --> $DIR/feature-gate-extern_crate_item_prelude.rs:11:18
-   |
-LL |         type A = alloc::boxed::Box<u8>;
-   |                  ^^^^^
-   |
-   = help: add #![feature(extern_crate_item_prelude)] to the crate attributes to enable
-
-error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #55599)
-  --> $DIR/feature-gate-extern_crate_item_prelude.rs:18:19
-   |
-LL |         let v = ::alloc::vec![0];
-   |                   ^^^^^
-   |
-   = help: add #![feature(extern_crate_item_prelude)] to the crate attributes to enable
-
-error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #55599)
-  --> $DIR/feature-gate-extern_crate_item_prelude.rs:20:20
-   |
-LL |         type A = ::alloc::boxed::Box<u8>;
-   |                    ^^^^^
-   |
-   = help: add #![feature(extern_crate_item_prelude)] to the crate attributes to enable
-
-error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #55599)
-  --> $DIR/feature-gate-extern_crate_item_prelude.rs:42:14
-   |
-LL |     type A = core::boxed::Box<u8>;
-   |              ^^^^
-   |
-   = help: add #![feature(extern_crate_item_prelude)] to the crate attributes to enable
-
-error: aborting due to 9 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/imports/auxiliary/issue-55811.rs b/src/test/ui/imports/auxiliary/issue-55811.rs
new file mode 100644
index 00000000000..877e4cdb0bd
--- /dev/null
+++ b/src/test/ui/imports/auxiliary/issue-55811.rs
@@ -0,0 +1,5 @@
+mod m {}
+
+// These two imports should not conflict when this crate is loaded from some other crate.
+use m::{};
+use m::{};
diff --git a/src/test/ui/imports/auxiliary/issue-56125.rs b/src/test/ui/imports/auxiliary/issue-56125.rs
new file mode 100644
index 00000000000..0ff407756b3
--- /dev/null
+++ b/src/test/ui/imports/auxiliary/issue-56125.rs
@@ -0,0 +1,9 @@
+pub mod last_segment {
+    pub mod issue_56125 {}
+}
+
+pub mod non_last_segment {
+    pub mod non_last_segment {
+        pub mod issue_56125 {}
+    }
+}
diff --git a/src/test/ui/imports/extern-prelude-extern-crate-absolute-expanded.rs b/src/test/ui/imports/extern-prelude-extern-crate-absolute-expanded.rs
index b1154f2076b..cf91a9714ad 100644
--- a/src/test/ui/imports/extern-prelude-extern-crate-absolute-expanded.rs
+++ b/src/test/ui/imports/extern-prelude-extern-crate-absolute-expanded.rs
@@ -1,8 +1,6 @@
 // compile-pass
 // edition:2018
 
-#![feature(extern_crate_item_prelude)]
-
 macro_rules! define_iso { () => {
     extern crate std as iso;
 }}
diff --git a/src/test/ui/imports/extern-prelude-extern-crate-cfg.rs b/src/test/ui/imports/extern-prelude-extern-crate-cfg.rs
index c48a65798b6..6117e5f6f3c 100644
--- a/src/test/ui/imports/extern-prelude-extern-crate-cfg.rs
+++ b/src/test/ui/imports/extern-prelude-extern-crate-cfg.rs
@@ -1,7 +1,6 @@
 // compile-pass
 // compile-flags:--cfg my_feature
 
-#![feature(extern_crate_item_prelude)]
 #![no_std]
 
 #[cfg(my_feature)]
diff --git a/src/test/ui/imports/extern-prelude-extern-crate-pass.rs b/src/test/ui/imports/extern-prelude-extern-crate-pass.rs
index 8c147dfd04a..bb4cf6ca99c 100644
--- a/src/test/ui/imports/extern-prelude-extern-crate-pass.rs
+++ b/src/test/ui/imports/extern-prelude-extern-crate-pass.rs
@@ -1,8 +1,6 @@
 // compile-pass
 // aux-build:two_macros.rs
 
-#![feature(extern_crate_item_prelude)]
-
 extern crate two_macros;
 
 mod m {
diff --git a/src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs b/src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs
index 732f1c4de2f..6ff3ab73639 100644
--- a/src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs
+++ b/src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs
@@ -1,7 +1,5 @@
 // aux-build:two_macros.rs
 
-#![feature(extern_crate_item_prelude)]
-
 macro_rules! define_vec {
     () => {
         extern crate std as Vec;
@@ -16,4 +14,13 @@ mod m {
     }
 }
 
+macro_rules! define_other_core {
+    () => {
+        extern crate std as core;
+        //~^ ERROR macro-expanded `extern crate` items cannot shadow names passed with `--extern`
+    }
+}
+
+define_other_core!();
+
 fn main() {}
diff --git a/src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.stderr b/src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.stderr
index 218dfb796f7..795e1761ccd 100644
--- a/src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.stderr
+++ b/src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.stderr
@@ -1,12 +1,21 @@
+error: macro-expanded `extern crate` items cannot shadow names passed with `--extern`
+  --> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:19:9
+   |
+LL |         extern crate std as core;
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL | define_other_core!();
+   | --------------------- in this macro invocation
+
 error[E0659]: `Vec` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
-  --> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:15:9
+  --> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:13:9
    |
 LL |         Vec::panic!(); //~ ERROR `Vec` is ambiguous
    |         ^^^ ambiguous name
    |
    = note: `Vec` could refer to a struct from prelude
 note: `Vec` could also refer to the extern crate imported here
-  --> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:7:9
+  --> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:5:9
    |
 LL |         extern crate std as Vec;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -14,6 +23,6 @@ LL |         extern crate std as Vec;
 LL | define_vec!();
    | -------------- in this macro invocation
 
-error: aborting due to previous error
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0659`.
diff --git a/src/test/ui/imports/extern-prelude-extern-crate-shadowing.rs b/src/test/ui/imports/extern-prelude-extern-crate-shadowing.rs
new file mode 100644
index 00000000000..c5adeaf17fa
--- /dev/null
+++ b/src/test/ui/imports/extern-prelude-extern-crate-shadowing.rs
@@ -0,0 +1,12 @@
+// compile-pass
+// aux-build:two_macros.rs
+
+extern crate two_macros as core;
+
+mod m {
+    fn check() {
+        core::m!(); // OK
+    }
+}
+
+fn main() {}
diff --git a/src/test/ui/imports/issue-55811.rs b/src/test/ui/imports/issue-55811.rs
new file mode 100644
index 00000000000..95316777fab
--- /dev/null
+++ b/src/test/ui/imports/issue-55811.rs
@@ -0,0 +1,6 @@
+// compile-pass
+// aux-build:issue-55811.rs
+
+extern crate issue_55811;
+
+fn main() {}
diff --git a/src/test/ui/imports/issue-56125.rs b/src/test/ui/imports/issue-56125.rs
new file mode 100644
index 00000000000..4baeb8a34dd
--- /dev/null
+++ b/src/test/ui/imports/issue-56125.rs
@@ -0,0 +1,12 @@
+// edition:2018
+// compile-flags:--extern issue_56125
+// aux-build:issue-56125.rs
+
+use issue_56125::last_segment::*;
+//~^ ERROR `issue_56125` is ambiguous
+//~| ERROR unresolved import `issue_56125::last_segment`
+use issue_56125::non_last_segment::non_last_segment::*;
+//~^ ERROR `issue_56125` is ambiguous
+//~| ERROR failed to resolve: could not find `non_last_segment` in `issue_56125`
+
+fn main() {}
diff --git a/src/test/ui/imports/issue-56125.stderr b/src/test/ui/imports/issue-56125.stderr
new file mode 100644
index 00000000000..096d5be97f0
--- /dev/null
+++ b/src/test/ui/imports/issue-56125.stderr
@@ -0,0 +1,46 @@
+error[E0433]: failed to resolve: could not find `non_last_segment` in `issue_56125`
+  --> $DIR/issue-56125.rs:8:18
+   |
+LL | use issue_56125::non_last_segment::non_last_segment::*;
+   |                  ^^^^^^^^^^^^^^^^ could not find `non_last_segment` in `issue_56125`
+
+error[E0432]: unresolved import `issue_56125::last_segment`
+  --> $DIR/issue-56125.rs:5:18
+   |
+LL | use issue_56125::last_segment::*;
+   |                  ^^^^^^^^^^^^ could not find `last_segment` in `issue_56125`
+
+error[E0659]: `issue_56125` is ambiguous (name vs any other name during import resolution)
+  --> $DIR/issue-56125.rs:5:5
+   |
+LL | use issue_56125::last_segment::*;
+   |     ^^^^^^^^^^^ ambiguous name
+   |
+   = note: `issue_56125` could refer to an extern crate passed with `--extern`
+   = help: use `::issue_56125` to refer to this extern crate unambiguously
+note: `issue_56125` could also refer to the module imported here
+  --> $DIR/issue-56125.rs:5:5
+   |
+LL | use issue_56125::last_segment::*;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = help: use `self::issue_56125` to refer to this module unambiguously
+
+error[E0659]: `issue_56125` is ambiguous (name vs any other name during import resolution)
+  --> $DIR/issue-56125.rs:8:5
+   |
+LL | use issue_56125::non_last_segment::non_last_segment::*;
+   |     ^^^^^^^^^^^ ambiguous name
+   |
+   = note: `issue_56125` could refer to an extern crate passed with `--extern`
+   = help: use `::issue_56125` to refer to this extern crate unambiguously
+note: `issue_56125` could also refer to the module imported here
+  --> $DIR/issue-56125.rs:5:5
+   |
+LL | use issue_56125::last_segment::*;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = help: use `self::issue_56125` to refer to this module unambiguously
+
+error: aborting due to 4 previous errors
+
+Some errors occurred: E0432, E0433, E0659.
+For more information about an error, try `rustc --explain E0432`.
diff --git a/src/test/ui/invalid-self-argument/bare-fn-start.rs b/src/test/ui/invalid-self-argument/bare-fn-start.rs
new file mode 100644
index 00000000000..741ba5f41ce
--- /dev/null
+++ b/src/test/ui/invalid-self-argument/bare-fn-start.rs
@@ -0,0 +1,5 @@
+fn a(&self) { }
+//~^ ERROR unexpected `self` argument in function
+//~| NOTE `self` is only valid as the first argument of an associated function
+
+fn main() { }
diff --git a/src/test/ui/invalid-self-argument/bare-fn-start.stderr b/src/test/ui/invalid-self-argument/bare-fn-start.stderr
new file mode 100644
index 00000000000..6a878b619d8
--- /dev/null
+++ b/src/test/ui/invalid-self-argument/bare-fn-start.stderr
@@ -0,0 +1,8 @@
+error: unexpected `self` argument in function
+  --> $DIR/bare-fn-start.rs:1:7
+   |
+LL | fn a(&self) { }
+   |       ^^^^ `self` is only valid as the first argument of an associated function
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/invalid-self-argument/bare-fn.rs b/src/test/ui/invalid-self-argument/bare-fn.rs
new file mode 100644
index 00000000000..704fa996ca6
--- /dev/null
+++ b/src/test/ui/invalid-self-argument/bare-fn.rs
@@ -0,0 +1,5 @@
+fn b(foo: u32, &mut self) { }
+//~^ ERROR unexpected `self` argument in function
+//~| NOTE `self` is only valid as the first argument of an associated function
+
+fn main() { }
diff --git a/src/test/ui/invalid-self-argument/bare-fn.stderr b/src/test/ui/invalid-self-argument/bare-fn.stderr
new file mode 100644
index 00000000000..b13f746a4ec
--- /dev/null
+++ b/src/test/ui/invalid-self-argument/bare-fn.stderr
@@ -0,0 +1,8 @@
+error: unexpected `self` argument in function
+  --> $DIR/bare-fn.rs:1:21
+   |
+LL | fn b(foo: u32, &mut self) { }
+   |                     ^^^^ `self` is only valid as the first argument of an associated function
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/invalid-self-argument/trait-fn.rs b/src/test/ui/invalid-self-argument/trait-fn.rs
new file mode 100644
index 00000000000..31e867bc764
--- /dev/null
+++ b/src/test/ui/invalid-self-argument/trait-fn.rs
@@ -0,0 +1,11 @@
+struct Foo {}
+
+impl Foo {
+    fn c(foo: u32, self) {}
+    //~^ ERROR unexpected `self` argument in function
+    //~| NOTE `self` is only valid as the first argument of an associated function
+
+    fn good(&mut self, foo: u32) {}
+}
+
+fn main() { }
diff --git a/src/test/ui/invalid-self-argument/trait-fn.stderr b/src/test/ui/invalid-self-argument/trait-fn.stderr
new file mode 100644
index 00000000000..b3c2cc5b5eb
--- /dev/null
+++ b/src/test/ui/invalid-self-argument/trait-fn.stderr
@@ -0,0 +1,8 @@
+error: unexpected `self` argument in function
+  --> $DIR/trait-fn.rs:4:20
+   |
+LL |     fn c(foo: u32, self) {}
+   |                    ^^^^ `self` is only valid as the first argument of an associated function
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/issues/issue-19482.stderr b/src/test/ui/issues/issue-19482.stderr
index 5e2d427ab72..d125438b851 100644
--- a/src/test/ui/issues/issue-19482.stderr
+++ b/src/test/ui/issues/issue-19482.stderr
@@ -1,8 +1,11 @@
 error[E0191]: the value of the associated type `A` (from the trait `Foo`) must be specified
   --> $DIR/issue-19482.rs:20:12
    |
+LL |     type A;
+   |     ------- `A` defined here
+...
 LL | fn bar(x: &Foo) {}
-   |            ^^^ missing associated type `A` value
+   |            ^^^ associated type `A` must be specified
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-21950.stderr b/src/test/ui/issues/issue-21950.stderr
index a2f74a29aab..33c89dd4994 100644
--- a/src/test/ui/issues/issue-21950.stderr
+++ b/src/test/ui/issues/issue-21950.stderr
@@ -10,7 +10,7 @@ error[E0191]: the value of the associated type `Output` (from the trait `std::op
   --> $DIR/issue-21950.rs:17:14
    |
 LL |             &Add;
-   |              ^^^ missing associated type `Output` value
+   |              ^^^ associated type `Output` must be specified
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-22434.stderr b/src/test/ui/issues/issue-22434.stderr
index 914da801ad4..3ba77346a1f 100644
--- a/src/test/ui/issues/issue-22434.stderr
+++ b/src/test/ui/issues/issue-22434.stderr
@@ -1,8 +1,11 @@
 error[E0191]: the value of the associated type `A` (from the trait `Foo`) must be specified
   --> $DIR/issue-22434.rs:15:19
    |
+LL |     type A;
+   |     ------- `A` defined here
+...
 LL | type I<'a> = &'a (Foo + 'a);
-   |                   ^^^^^^^^ missing associated type `A` value
+   |                   ^^^^^^^^ associated type `A` must be specified
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-22560.stderr b/src/test/ui/issues/issue-22560.stderr
index b5524036fae..715f84011f6 100644
--- a/src/test/ui/issues/issue-22560.stderr
+++ b/src/test/ui/issues/issue-22560.stderr
@@ -28,7 +28,7 @@ LL |   type Test = Add +
 LL | |             //~^ ERROR E0393
 LL | |             //~| ERROR E0191
 LL | |             Sub;
-   | |_______________^ missing associated type `Output` value
+   | |_______________^ associated type `Output` must be specified
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/issues/issue-23024.stderr b/src/test/ui/issues/issue-23024.stderr
index 129d0945303..adee12a36d3 100644
--- a/src/test/ui/issues/issue-23024.stderr
+++ b/src/test/ui/issues/issue-23024.stderr
@@ -16,7 +16,7 @@ error[E0191]: the value of the associated type `Output` (from the trait `std::op
   --> $DIR/issue-23024.rs:19:35
    |
 LL |     println!("{:?}",(vfnfer[0] as Fn)(3));
-   |                                   ^^ missing associated type `Output` value
+   |                                   ^^ associated type `Output` must be specified
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/issues/issue-28344.stderr b/src/test/ui/issues/issue-28344.stderr
index 7ef2e906422..734c761d0b7 100644
--- a/src/test/ui/issues/issue-28344.stderr
+++ b/src/test/ui/issues/issue-28344.stderr
@@ -2,7 +2,7 @@ error[E0191]: the value of the associated type `Output` (from the trait `std::op
   --> $DIR/issue-28344.rs:14:17
    |
 LL |     let x: u8 = BitXor::bitor(0 as u8, 0 as u8);
-   |                 ^^^^^^^^^^^^^ missing associated type `Output` value
+   |                 ^^^^^^^^^^^^^ associated type `Output` must be specified
 
 error[E0599]: no function or associated item named `bitor` found for type `dyn std::ops::BitXor<_>` in the current scope
   --> $DIR/issue-28344.rs:14:17
@@ -16,7 +16,7 @@ error[E0191]: the value of the associated type `Output` (from the trait `std::op
   --> $DIR/issue-28344.rs:18:13
    |
 LL |     let g = BitXor::bitor;
-   |             ^^^^^^^^^^^^^ missing associated type `Output` value
+   |             ^^^^^^^^^^^^^ associated type `Output` must be specified
 
 error[E0599]: no function or associated item named `bitor` found for type `dyn std::ops::BitXor<_>` in the current scope
   --> $DIR/issue-28344.rs:18:13
diff --git a/src/test/ui/issues/issue-56128.rs b/src/test/ui/issues/issue-56128.rs
new file mode 100644
index 00000000000..3a3eccdc33c
--- /dev/null
+++ b/src/test/ui/issues/issue-56128.rs
@@ -0,0 +1,15 @@
+// Regression test for #56128. When this `pub(super) use...` gets
+// exploded in the HIR, we were not handling ids correctly.
+//
+// compile-pass
+
+mod bar {
+    pub(super) use self::baz::{x, y};
+
+    mod baz {
+        pub fn x() { }
+        pub fn y() { }
+    }
+}
+
+fn main() { }
diff --git a/src/test/ui/lint/must_use-trait.rs b/src/test/ui/lint/must_use-trait.rs
new file mode 100644
index 00000000000..23df4fa6132
--- /dev/null
+++ b/src/test/ui/lint/must_use-trait.rs
@@ -0,0 +1,22 @@
+#![deny(unused_must_use)]
+
+#[must_use]
+trait Critical {}
+
+trait NotSoCritical {}
+
+trait DecidedlyUnimportant {}
+
+struct Anon;
+
+impl Critical for Anon {}
+impl NotSoCritical for Anon {}
+impl DecidedlyUnimportant for Anon {}
+
+fn get_critical() -> impl NotSoCritical + Critical + DecidedlyUnimportant {
+    Anon {}
+}
+
+fn main() {
+    get_critical(); //~ ERROR unused implementer of `Critical` that must be used
+}
diff --git a/src/test/ui/lint/must_use-trait.stderr b/src/test/ui/lint/must_use-trait.stderr
new file mode 100644
index 00000000000..94f5f4f40d2
--- /dev/null
+++ b/src/test/ui/lint/must_use-trait.stderr
@@ -0,0 +1,14 @@
+error: unused implementer of `Critical` that must be used
+  --> $DIR/must_use-trait.rs:21:5
+   |
+LL |     get_critical(); //~ ERROR unused implementer of `Critical` that must be used
+   |     ^^^^^^^^^^^^^^^
+   |
+note: lint level defined here
+  --> $DIR/must_use-trait.rs:1:9
+   |
+LL | #![deny(unused_must_use)]
+   |         ^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/mismatched_types/closure-arg-count.rs b/src/test/ui/mismatched_types/closure-arg-count.rs
index 9eb11148a8b..2dcc7a25c84 100644
--- a/src/test/ui/mismatched_types/closure-arg-count.rs
+++ b/src/test/ui/mismatched_types/closure-arg-count.rs
@@ -22,6 +22,8 @@ fn main() {
     //~^ ERROR closure is expected to take
     f(|| panic!());
     //~^ ERROR closure is expected to take
+    f(  move    || panic!());
+    //~^ ERROR closure is expected to take
 
     let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x| i);
     //~^ ERROR closure is expected to take
diff --git a/src/test/ui/mismatched_types/closure-arg-count.stderr b/src/test/ui/mismatched_types/closure-arg-count.stderr
index 057cf6efa1d..eeadf07262c 100644
--- a/src/test/ui/mismatched_types/closure-arg-count.stderr
+++ b/src/test/ui/mismatched_types/closure-arg-count.stderr
@@ -60,8 +60,26 @@ help: consider changing the closure to take and ignore the expected argument
 LL |     f(|_| panic!());
    |       ^^^
 
+error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
+  --> $DIR/closure-arg-count.rs:25:5
+   |
+LL |     f(  move    || panic!());
+   |     ^   ---------- takes 0 arguments
+   |     |
+   |     expected closure that takes 1 argument
+   |
+note: required by `f`
+  --> $DIR/closure-arg-count.rs:13:1
+   |
+LL | fn f<F: Fn<usize>>(_: F) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
+help: consider changing the closure to take and ignore the expected argument
+   |
+LL |     f(  move    |_| panic!());
+   |                 ^^^
+
 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
-  --> $DIR/closure-arg-count.rs:26:53
+  --> $DIR/closure-arg-count.rs:28:53
    |
 LL |     let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x| i);
    |                                                     ^^^ ------ takes 2 distinct arguments
@@ -73,7 +91,7 @@ LL |     let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i);
    |                                                         ^^^^^^^^
 
 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
-  --> $DIR/closure-arg-count.rs:28:53
+  --> $DIR/closure-arg-count.rs:30:53
    |
 LL |     let _it = vec![1, 2, 3].into_iter().enumerate().map(|i: usize, x| i);
    |                                                     ^^^ ------------- takes 2 distinct arguments
@@ -85,7 +103,7 @@ LL |     let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i);
    |                                                         ^^^^^^^^
 
 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments
-  --> $DIR/closure-arg-count.rs:30:53
+  --> $DIR/closure-arg-count.rs:32:53
    |
 LL |     let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x, y| i);
    |                                                     ^^^ --------- takes 3 distinct arguments
@@ -93,7 +111,7 @@ LL |     let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x, y| i);
    |                                                     expected closure that takes a single 2-tuple as argument
 
 error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 0 arguments
-  --> $DIR/closure-arg-count.rs:32:53
+  --> $DIR/closure-arg-count.rs:34:53
    |
 LL |     let _it = vec![1, 2, 3].into_iter().enumerate().map(foo);
    |                                                     ^^^ expected function that takes a single 2-tuple as argument
@@ -102,7 +120,7 @@ LL | fn foo() {}
    | -------- takes 0 arguments
 
 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments
-  --> $DIR/closure-arg-count.rs:35:53
+  --> $DIR/closure-arg-count.rs:37:53
    |
 LL |     let bar = |i, x, y| i;
    |               --------- takes 3 distinct arguments
@@ -110,7 +128,7 @@ LL |     let _it = vec![1, 2, 3].into_iter().enumerate().map(bar);
    |                                                     ^^^ expected closure that takes a single 2-tuple as argument
 
 error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
-  --> $DIR/closure-arg-count.rs:37:53
+  --> $DIR/closure-arg-count.rs:39:53
    |
 LL |     let _it = vec![1, 2, 3].into_iter().enumerate().map(qux);
    |                                                     ^^^ expected function that takes a single 2-tuple as argument
@@ -119,13 +137,13 @@ LL | fn qux(x: usize, y: usize) {}
    | -------------------------- takes 2 distinct arguments
 
 error[E0593]: function is expected to take 1 argument, but it takes 2 arguments
-  --> $DIR/closure-arg-count.rs:40:41
+  --> $DIR/closure-arg-count.rs:42:41
    |
 LL |     let _it = vec![1, 2, 3].into_iter().map(usize::checked_add);
    |                                         ^^^ expected function that takes 1 argument
 
 error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
-  --> $DIR/closure-arg-count.rs:43:5
+  --> $DIR/closure-arg-count.rs:45:5
    |
 LL |     call(Foo);
    |     ^^^^ expected function that takes 0 arguments
@@ -134,11 +152,11 @@ LL | struct Foo(u8);
    | --------------- takes 1 argument
    |
 note: required by `call`
-  --> $DIR/closure-arg-count.rs:50:1
+  --> $DIR/closure-arg-count.rs:52:1
    |
 LL | fn call<F, R>(_: F) where F: FnOnce() -> R {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 13 previous errors
+error: aborting due to 14 previous errors
 
 For more information about this error, try `rustc --explain E0593`.
diff --git a/src/test/ui/panic-runtime/bad-panic-flag1.rs b/src/test/ui/panic-runtime/bad-panic-flag1.rs
index f067b6b8349..4e553c4df2f 100644
--- a/src/test/ui/panic-runtime/bad-panic-flag1.rs
+++ b/src/test/ui/panic-runtime/bad-panic-flag1.rs
@@ -9,6 +9,6 @@
 // except according to those terms.
 
 // compile-flags:-C panic=foo
-// error-pattern:either `panic` or `abort` was expected
+// error-pattern:either `unwind` or `abort` was expected
 
 fn main() {}
diff --git a/src/test/ui/panic-runtime/bad-panic-flag1.stderr b/src/test/ui/panic-runtime/bad-panic-flag1.stderr
index 3a65419c98f..013373c6f93 100644
--- a/src/test/ui/panic-runtime/bad-panic-flag1.stderr
+++ b/src/test/ui/panic-runtime/bad-panic-flag1.stderr
@@ -1,2 +1,2 @@
-error: incorrect value `foo` for codegen option `panic` - either `panic` or `abort` was expected
+error: incorrect value `foo` for codegen option `panic` - either `unwind` or `abort` was expected
 
diff --git a/src/test/ui/panic-runtime/bad-panic-flag2.rs b/src/test/ui/panic-runtime/bad-panic-flag2.rs
index 0ecf65f080f..f560e7f4eb2 100644
--- a/src/test/ui/panic-runtime/bad-panic-flag2.rs
+++ b/src/test/ui/panic-runtime/bad-panic-flag2.rs
@@ -9,6 +9,6 @@
 // except according to those terms.
 
 // compile-flags:-C panic
-// error-pattern:requires either `panic` or `abort`
+// error-pattern:requires either `unwind` or `abort`
 
 fn main() {}
diff --git a/src/test/ui/panic-runtime/bad-panic-flag2.stderr b/src/test/ui/panic-runtime/bad-panic-flag2.stderr
index 8d919e55c90..6ab94ea704d 100644
--- a/src/test/ui/panic-runtime/bad-panic-flag2.stderr
+++ b/src/test/ui/panic-runtime/bad-panic-flag2.stderr
@@ -1,2 +1,2 @@
-error: codegen option `panic` requires either `panic` or `abort` (C panic=<value>)
+error: codegen option `panic` requires either `unwind` or `abort` (C panic=<value>)
 
diff --git a/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.rs b/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.rs
new file mode 100644
index 00000000000..58e7718ba5b
--- /dev/null
+++ b/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.rs
@@ -0,0 +1,8 @@
+pub trait T<X, Y> {
+    type A;
+    type B;
+    type C;
+}
+ pub struct Foo { i: Box<T<usize, usize, usize, usize, B=usize>> }
+
+ fn main() {}
diff --git a/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr b/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr
new file mode 100644
index 00000000000..b62b5d3b04c
--- /dev/null
+++ b/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr
@@ -0,0 +1,31 @@
+error[E0107]: wrong number of type arguments: expected 2, found 4
+  --> $DIR/use-type-argument-instead-of-assoc-type.rs:6:42
+   |
+LL |  pub struct Foo { i: Box<T<usize, usize, usize, usize, B=usize>> }
+   |                                          ^^^^^  ^^^^^ unexpected type argument
+   |                                          |
+   |                                          unexpected type argument
+
+error[E0191]: the value of the associated types `A` (from the trait `T`), `C` (from the trait `T`) must be specified
+  --> $DIR/use-type-argument-instead-of-assoc-type.rs:6:26
+   |
+LL |     type A;
+   |     ------- `A` defined here
+LL |     type B;
+LL |     type C;
+   |     ------- `C` defined here
+LL | }
+LL |  pub struct Foo { i: Box<T<usize, usize, usize, usize, B=usize>> }
+   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                          |
+   |                          associated type `A` must be specified
+   |                          associated type `C` must be specified
+help: if you meant to specify the associated types, write
+   |
+LL |  pub struct Foo { i: Box<T<usize, usize, A = usize, C = usize, B=usize>> }
+   |                                          ^^^^^^^^^  ^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0107, E0191.
+For more information about an error, try `rustc --explain E0107`.
diff --git a/src/test/ui/traits/trait-alias-object.stderr b/src/test/ui/traits/trait-alias-object.stderr
index 6b7b322a53d..fdb9427cba7 100644
--- a/src/test/ui/traits/trait-alias-object.stderr
+++ b/src/test/ui/traits/trait-alias-object.stderr
@@ -10,7 +10,7 @@ error[E0191]: the value of the associated type `Item` (from the trait `std::iter
   --> $DIR/trait-alias-object.rs:18:13
    |
 LL |     let _: &dyn IteratorAlias = &vec![123].into_iter();
-   |             ^^^^^^^^^^^^^^^^^ missing associated type `Item` value
+   |             ^^^^^^^^^^^^^^^^^ associated type `Item` must be specified
 
 error: aborting due to 2 previous errors