about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/codegen/simd/unpadded-simd.rs9
-rw-r--r--tests/codegen/unchecked_shifts.rs4
-rw-r--r--tests/coverage/auxiliary/macro_name_span_helper.rs10
-rw-r--r--tests/coverage/macro_name_span.cov-map16
-rw-r--r--tests/coverage/macro_name_span.coverage39
-rw-r--r--tests/coverage/macro_name_span.rs25
-rw-r--r--tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir4
-rw-r--r--tests/mir-opt/building/match_false_edges.full_tested_match.built.after.mir2
-rw-r--r--tests/mir-opt/building/match_false_edges.full_tested_match2.built.after.mir2
-rw-r--r--tests/mir-opt/building/match_false_edges.main.built.after.mir4
-rw-r--r--tests/mir-opt/match_arm_scopes.complicated_match.panic-abort.SimplifyCfg-initial.after-ElaborateDrops.after.diff8
-rw-r--r--tests/mir-opt/match_arm_scopes.complicated_match.panic-unwind.SimplifyCfg-initial.after-ElaborateDrops.after.diff8
-rw-r--r--tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir2
-rw-r--r--tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-abort.diff8
-rw-r--r--tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-unwind.diff8
-rw-r--r--tests/rustdoc-json/reexport/pub_use_doc_hidden.rs5
-rw-r--r--tests/ui/auto-traits/has-arguments.rs10
-rw-r--r--tests/ui/auto-traits/has-arguments.stderr11
-rw-r--r--tests/ui/auto-traits/issue-117789.rs7
-rw-r--r--tests/ui/auto-traits/issue-117789.stderr21
-rw-r--r--tests/ui/coroutine/issue-57084.rs2
-rw-r--r--tests/ui/coroutine/witness-ignore-fake-reads.rs34
-rw-r--r--tests/ui/deriving/deriving-all-codegen.stdout15
-rw-r--r--tests/ui/generic-const-items/const-trait-impl.rs4
-rw-r--r--tests/ui/generic-const-items/const-trait-impl.stderr6
-rw-r--r--tests/ui/nll/closure-requirements/escape-argument-callee.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/escape-argument.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-ref.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr4
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-val.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/return-wrong-bound-region.stderr2
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr4
-rw-r--r--tests/ui/parser/brace-in-let-chain.rs58
-rw-r--r--tests/ui/parser/brace-in-let-chain.stderr65
-rw-r--r--tests/ui/parser/semi-in-let-chain.rs27
-rw-r--r--tests/ui/parser/semi-in-let-chain.stderr50
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr10
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr10
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-bound-on-not-const-associated-fn.rs (renamed from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const-bound-on-not-const-associated-fn.rs)2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-bound-on-not-const-associated-fn.stderr (renamed from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const-bound-on-not-const-associated-fn.stderr)0
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise.stderr21
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs1
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock.stderr21
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/issue-90052.rs9
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/issue-90052.stderr14
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs6
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr14
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr15
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr16
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs1
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr16
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yy.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.rs54
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr246
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-maybe-trait.rs6
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-maybe-trait.stderr8
-rw-r--r--tests/ui/structs/method-chain-expression-failure.rs31
-rw-r--r--tests/ui/structs/method-chain-expression-failure.stderr15
-rw-r--r--tests/ui/suggestions/chain-method-call-mutation-in-place.stderr5
-rw-r--r--tests/ui/suggestions/import-trait-for-method-call.rs2
-rw-r--r--tests/ui/suggestions/issue-117669.rs4
-rw-r--r--tests/ui/suggestions/issue-117669.stderr18
-rw-r--r--tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr26
-rw-r--r--tests/ui/where-clauses/higher-ranked-fn-type.verbose.stderr4
71 files changed, 928 insertions, 145 deletions
diff --git a/tests/codegen/simd/unpadded-simd.rs b/tests/codegen/simd/unpadded-simd.rs
index eb44dbd9313..797bca38ffa 100644
--- a/tests/codegen/simd/unpadded-simd.rs
+++ b/tests/codegen/simd/unpadded-simd.rs
@@ -5,10 +5,15 @@
 #![crate_type = "lib"]
 #![feature(repr_simd)]
 
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Clone)]
 #[repr(simd)]
 pub struct int16x4_t(pub i16, pub i16, pub i16, pub i16);
 
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Clone)]
 pub struct int16x4x2_t(pub int16x4_t, pub int16x4_t);
+
 // CHECK: %int16x4x2_t = type { <4 x i16>, <4 x i16> }
+#[no_mangle]
+fn takes_int16x4x2_t(t: int16x4x2_t) -> int16x4x2_t {
+    t
+}
diff --git a/tests/codegen/unchecked_shifts.rs b/tests/codegen/unchecked_shifts.rs
index aca9bec77df..eded894c6d0 100644
--- a/tests/codegen/unchecked_shifts.rs
+++ b/tests/codegen/unchecked_shifts.rs
@@ -31,7 +31,7 @@ pub unsafe fn unchecked_shl_unsigned_smaller(a: u16, b: u32) -> u16 {
 #[no_mangle]
 pub unsafe fn unchecked_shl_unsigned_bigger(a: u64, b: u32) -> u64 {
     // CHECK-NOT: assume
-    // CHECK: %[[EXT:.+]] = zext i32 %b to i64
+    // CHECK: %[[EXT:.+]] = zext{{( nneg)?}} i32 %b to i64
     // CHECK: shl i64 %a, %[[EXT]]
     a.unchecked_shl(b)
 }
@@ -63,7 +63,7 @@ pub unsafe fn unchecked_shr_signed_smaller(a: i16, b: u32) -> i16 {
 #[no_mangle]
 pub unsafe fn unchecked_shr_signed_bigger(a: i64, b: u32) -> i64 {
     // CHECK-NOT: assume
-    // CHECK: %[[EXT:.+]] = zext i32 %b to i64
+    // CHECK: %[[EXT:.+]] = zext{{( nneg)?}} i32 %b to i64
     // CHECK: ashr i64 %a, %[[EXT]]
     a.unchecked_shr(b)
 }
diff --git a/tests/coverage/auxiliary/macro_name_span_helper.rs b/tests/coverage/auxiliary/macro_name_span_helper.rs
new file mode 100644
index 00000000000..6797c081d93
--- /dev/null
+++ b/tests/coverage/auxiliary/macro_name_span_helper.rs
@@ -0,0 +1,10 @@
+// edition: 2021
+
+#[macro_export]
+macro_rules! macro_that_defines_a_function {
+    (fn $name:ident () $body:tt) => {
+        fn $name () -> () $body
+    }
+}
+
+// Non-executable comment.
diff --git a/tests/coverage/macro_name_span.cov-map b/tests/coverage/macro_name_span.cov-map
new file mode 100644
index 00000000000..b84628fc788
--- /dev/null
+++ b/tests/coverage/macro_name_span.cov-map
@@ -0,0 +1,16 @@
+Function name: macro_name_span::affected_function
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 06, 1b, 00, 20]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 0
+Number of file 0 mappings: 1
+- Code(Counter(0)) at (prev + 6, 27) to (start + 0, 32)
+
+Function name: macro_name_span::main
+Raw bytes (9): 0x[01, 02, 00, 01, 01, 0b, 01, 02, 02]
+Number of files: 1
+- file 0 => global file 2
+Number of expressions: 0
+Number of file 0 mappings: 1
+- Code(Counter(0)) at (prev + 11, 1) to (start + 2, 2)
+
diff --git a/tests/coverage/macro_name_span.coverage b/tests/coverage/macro_name_span.coverage
new file mode 100644
index 00000000000..cadf7024657
--- /dev/null
+++ b/tests/coverage/macro_name_span.coverage
@@ -0,0 +1,39 @@
+$DIR/auxiliary/macro_name_span_helper.rs:
+   LL|       |// edition: 2021
+   LL|       |
+   LL|       |#[macro_export]
+   LL|       |macro_rules! macro_that_defines_a_function {
+   LL|       |    (fn $name:ident () $body:tt) => {
+   LL|      1|        fn $name () -> () $body
+   LL|       |    }
+   LL|       |}
+   LL|       |
+   LL|       |// Non-executable comment.
+
+$DIR/macro_name_span.rs:
+   LL|       |// edition: 2021
+   LL|       |
+   LL|       |// Regression test for <https://github.com/rust-lang/rust/issues/117788>.
+   LL|       |// Under some circumstances, the heuristics that detect macro name spans can
+   LL|       |// get confused and produce incorrect spans beyond the bounds of the span
+   LL|       |// being processed.
+   LL|       |
+   LL|       |// aux-build: macro_name_span_helper.rs
+   LL|       |extern crate macro_name_span_helper;
+   LL|       |
+   LL|      1|fn main() {
+   LL|      1|    affected_function();
+   LL|      1|}
+   LL|       |
+   LL|       |macro_rules! macro_with_an_unreasonably_and_egregiously_long_name {
+   LL|       |    () => {
+   LL|       |        println!("hello");
+   LL|       |    };
+   LL|       |}
+   LL|       |
+   LL|       |macro_name_span_helper::macro_that_defines_a_function! {
+   LL|       |    fn affected_function() {
+   LL|       |        macro_with_an_unreasonably_and_egregiously_long_name!();
+   LL|       |    }
+   LL|       |}
+
diff --git a/tests/coverage/macro_name_span.rs b/tests/coverage/macro_name_span.rs
new file mode 100644
index 00000000000..5d15977c498
--- /dev/null
+++ b/tests/coverage/macro_name_span.rs
@@ -0,0 +1,25 @@
+// edition: 2021
+
+// Regression test for <https://github.com/rust-lang/rust/issues/117788>.
+// Under some circumstances, the heuristics that detect macro name spans can
+// get confused and produce incorrect spans beyond the bounds of the span
+// being processed.
+
+// aux-build: macro_name_span_helper.rs
+extern crate macro_name_span_helper;
+
+fn main() {
+    affected_function();
+}
+
+macro_rules! macro_with_an_unreasonably_and_egregiously_long_name {
+    () => {
+        println!("hello");
+    };
+}
+
+macro_name_span_helper::macro_that_defines_a_function! {
+    fn affected_function() {
+        macro_with_an_unreasonably_and_egregiously_long_name!();
+    }
+}
diff --git a/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir b/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir
index 396e4a378f6..111dd8e97f9 100644
--- a/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir
+++ b/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir
@@ -14,7 +14,7 @@
                 Static,
             ),
             source_info: SourceInfo {
-                span: $DIR/async_await.rs:16:9: 16:14 (#8),
+                span: $DIR/async_await.rs:16:5: 16:14 (#9),
                 scope: scope[0],
             },
             ignore_for_traits: false,
@@ -32,7 +32,7 @@
                 Static,
             ),
             source_info: SourceInfo {
-                span: $DIR/async_await.rs:17:9: 17:14 (#10),
+                span: $DIR/async_await.rs:17:5: 17:14 (#11),
                 scope: scope[0],
             },
             ignore_for_traits: false,
diff --git a/tests/mir-opt/building/match_false_edges.full_tested_match.built.after.mir b/tests/mir-opt/building/match_false_edges.full_tested_match.built.after.mir
index 1946c70e476..b99b0b99559 100644
--- a/tests/mir-opt/building/match_false_edges.full_tested_match.built.after.mir
+++ b/tests/mir-opt/building/match_false_edges.full_tested_match.built.after.mir
@@ -52,7 +52,7 @@ fn full_tested_match() -> () {
     bb5: {
         StorageLive(_6);
         _6 = &((_2 as Some).0: i32);
-        _4 = &shallow _2;
+        _4 = &fake _2;
         StorageLive(_7);
         _7 = guard() -> [return: bb6, unwind: bb12];
     }
diff --git a/tests/mir-opt/building/match_false_edges.full_tested_match2.built.after.mir b/tests/mir-opt/building/match_false_edges.full_tested_match2.built.after.mir
index b6175b05156..d1d86b55d68 100644
--- a/tests/mir-opt/building/match_false_edges.full_tested_match2.built.after.mir
+++ b/tests/mir-opt/building/match_false_edges.full_tested_match2.built.after.mir
@@ -58,7 +58,7 @@ fn full_tested_match2() -> () {
     bb5: {
         StorageLive(_6);
         _6 = &((_2 as Some).0: i32);
-        _4 = &shallow _2;
+        _4 = &fake _2;
         StorageLive(_7);
         _7 = guard() -> [return: bb6, unwind: bb12];
     }
diff --git a/tests/mir-opt/building/match_false_edges.main.built.after.mir b/tests/mir-opt/building/match_false_edges.main.built.after.mir
index 0b57d1b97e1..1d4fe67f350 100644
--- a/tests/mir-opt/building/match_false_edges.main.built.after.mir
+++ b/tests/mir-opt/building/match_false_edges.main.built.after.mir
@@ -78,7 +78,7 @@ fn main() -> () {
     bb8: {
         StorageLive(_7);
         _7 = &((_2 as Some).0: i32);
-        _5 = &shallow _2;
+        _5 = &fake _2;
         StorageLive(_8);
         _8 = guard() -> [return: bb9, unwind: bb20];
     }
@@ -120,7 +120,7 @@ fn main() -> () {
     bb14: {
         StorageLive(_11);
         _11 = &((_2 as Some).0: i32);
-        _5 = &shallow _2;
+        _5 = &fake _2;
         StorageLive(_12);
         StorageLive(_13);
         _13 = (*_11);
diff --git a/tests/mir-opt/match_arm_scopes.complicated_match.panic-abort.SimplifyCfg-initial.after-ElaborateDrops.after.diff b/tests/mir-opt/match_arm_scopes.complicated_match.panic-abort.SimplifyCfg-initial.after-ElaborateDrops.after.diff
index 2989582d038..b4bd45ba597 100644
--- a/tests/mir-opt/match_arm_scopes.complicated_match.panic-abort.SimplifyCfg-initial.after-ElaborateDrops.after.diff
+++ b/tests/mir-opt/match_arm_scopes.complicated_match.panic-abort.SimplifyCfg-initial.after-ElaborateDrops.after.diff
@@ -80,8 +80,8 @@
           _6 = &(_2.1: bool);
           StorageLive(_8);
           _8 = &(_2.2: std::string::String);
--         _3 = &shallow (_2.0: bool);
--         _4 = &shallow (_2.1: bool);
+-         _3 = &fake (_2.0: bool);
+-         _4 = &fake (_2.1: bool);
           StorageLive(_9);
           StorageLive(_10);
           _10 = _1;
@@ -137,8 +137,8 @@
           _6 = &(_2.0: bool);
           StorageLive(_8);
           _8 = &(_2.2: std::string::String);
--         _3 = &shallow (_2.0: bool);
--         _4 = &shallow (_2.1: bool);
+-         _3 = &fake (_2.0: bool);
+-         _4 = &fake (_2.1: bool);
           StorageLive(_12);
           StorageLive(_13);
           _13 = _1;
diff --git a/tests/mir-opt/match_arm_scopes.complicated_match.panic-unwind.SimplifyCfg-initial.after-ElaborateDrops.after.diff b/tests/mir-opt/match_arm_scopes.complicated_match.panic-unwind.SimplifyCfg-initial.after-ElaborateDrops.after.diff
index 2989582d038..b4bd45ba597 100644
--- a/tests/mir-opt/match_arm_scopes.complicated_match.panic-unwind.SimplifyCfg-initial.after-ElaborateDrops.after.diff
+++ b/tests/mir-opt/match_arm_scopes.complicated_match.panic-unwind.SimplifyCfg-initial.after-ElaborateDrops.after.diff
@@ -80,8 +80,8 @@
           _6 = &(_2.1: bool);
           StorageLive(_8);
           _8 = &(_2.2: std::string::String);
--         _3 = &shallow (_2.0: bool);
--         _4 = &shallow (_2.1: bool);
+-         _3 = &fake (_2.0: bool);
+-         _4 = &fake (_2.1: bool);
           StorageLive(_9);
           StorageLive(_10);
           _10 = _1;
@@ -137,8 +137,8 @@
           _6 = &(_2.0: bool);
           StorageLive(_8);
           _8 = &(_2.2: std::string::String);
--         _3 = &shallow (_2.0: bool);
--         _4 = &shallow (_2.1: bool);
+-         _3 = &fake (_2.0: bool);
+-         _4 = &fake (_2.1: bool);
           StorageLive(_12);
           StorageLive(_13);
           _13 = _1;
diff --git a/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir b/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir
index 90ec3ab49ad..ebb2f70a475 100644
--- a/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir
+++ b/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir
@@ -68,7 +68,7 @@ fn main() -> () {
     }
 
     bb9: {
-        _8 = &shallow _1;
+        _8 = &fake _1;
         StorageLive(_9);
         _9 = _2;
         switchInt(move _9) -> [0: bb11, otherwise: bb10];
diff --git a/tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-abort.diff b/tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-abort.diff
index 61329bb75d1..54da6ee659f 100644
--- a/tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-abort.diff
+++ b/tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-abort.diff
@@ -33,10 +33,10 @@
       }
   
       bb4: {
--         _4 = &shallow _1;
--         _5 = &shallow (*((_1 as Some).0: &&i32));
--         _6 = &shallow ((_1 as Some).0: &&i32);
--         _7 = &shallow (*(*((_1 as Some).0: &&i32)));
+-         _4 = &fake _1;
+-         _5 = &fake (*((_1 as Some).0: &&i32));
+-         _6 = &fake ((_1 as Some).0: &&i32);
+-         _7 = &fake (*(*((_1 as Some).0: &&i32)));
 +         nop;
 +         nop;
 +         nop;
diff --git a/tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-unwind.diff b/tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-unwind.diff
index 61329bb75d1..54da6ee659f 100644
--- a/tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-unwind.diff
+++ b/tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-unwind.diff
@@ -33,10 +33,10 @@
       }
   
       bb4: {
--         _4 = &shallow _1;
--         _5 = &shallow (*((_1 as Some).0: &&i32));
--         _6 = &shallow ((_1 as Some).0: &&i32);
--         _7 = &shallow (*(*((_1 as Some).0: &&i32)));
+-         _4 = &fake _1;
+-         _5 = &fake (*((_1 as Some).0: &&i32));
+-         _6 = &fake ((_1 as Some).0: &&i32);
+-         _7 = &fake (*(*((_1 as Some).0: &&i32)));
 +         nop;
 +         nop;
 +         nop;
diff --git a/tests/rustdoc-json/reexport/pub_use_doc_hidden.rs b/tests/rustdoc-json/reexport/pub_use_doc_hidden.rs
index 46c3da4c15b..15d194ef5d9 100644
--- a/tests/rustdoc-json/reexport/pub_use_doc_hidden.rs
+++ b/tests/rustdoc-json/reexport/pub_use_doc_hidden.rs
@@ -2,11 +2,12 @@
 
 mod repeat_n {
     #[doc(hidden)]
+    /// not here
     pub struct RepeatN {}
 }
 
+/// not here
 pub use repeat_n::RepeatN;
 
 // @count "$.index[*][?(@.name=='pub_use_doc_hidden')].inner.items[*]" 0
-// @!has "$.index[*][?(@.kind=='struct')]"
-// @!has "$.index[*][?(@.kind=='import')]"
+// @!has "$.index[*][?(@.docs == 'not here')]"
diff --git a/tests/ui/auto-traits/has-arguments.rs b/tests/ui/auto-traits/has-arguments.rs
new file mode 100644
index 00000000000..f579eb6772d
--- /dev/null
+++ b/tests/ui/auto-traits/has-arguments.rs
@@ -0,0 +1,10 @@
+#![feature(auto_traits)]
+
+auto trait Trait1<'outer> {}
+//~^ ERROR auto traits cannot have generic parameters
+
+fn f<'a>(x: impl Trait1<'a>) {}
+
+fn main() {
+    f("");
+}
diff --git a/tests/ui/auto-traits/has-arguments.stderr b/tests/ui/auto-traits/has-arguments.stderr
new file mode 100644
index 00000000000..3bba74badbc
--- /dev/null
+++ b/tests/ui/auto-traits/has-arguments.stderr
@@ -0,0 +1,11 @@
+error[E0567]: auto traits cannot have generic parameters
+  --> $DIR/has-arguments.rs:3:18
+   |
+LL | auto trait Trait1<'outer> {}
+   |            ------^^^^^^^^ help: remove the parameters
+   |            |
+   |            auto trait cannot have generic parameters
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0567`.
diff --git a/tests/ui/auto-traits/issue-117789.rs b/tests/ui/auto-traits/issue-117789.rs
new file mode 100644
index 00000000000..0c30931a1b5
--- /dev/null
+++ b/tests/ui/auto-traits/issue-117789.rs
@@ -0,0 +1,7 @@
+#![deny(suspicious_auto_trait_impls)]
+
+auto trait Trait<P> {} //~ ERROR auto traits cannot have generic parameters
+//~^ ERROR auto traits are experimental and possibly buggy
+impl<P> Trait<P> for () {}
+
+fn main() {}
diff --git a/tests/ui/auto-traits/issue-117789.stderr b/tests/ui/auto-traits/issue-117789.stderr
new file mode 100644
index 00000000000..9a3a7efed3e
--- /dev/null
+++ b/tests/ui/auto-traits/issue-117789.stderr
@@ -0,0 +1,21 @@
+error[E0567]: auto traits cannot have generic parameters
+  --> $DIR/issue-117789.rs:3:17
+   |
+LL | auto trait Trait<P> {}
+   |            -----^^^ help: remove the parameters
+   |            |
+   |            auto trait cannot have generic parameters
+
+error[E0658]: auto traits are experimental and possibly buggy
+  --> $DIR/issue-117789.rs:3:1
+   |
+LL | auto trait Trait<P> {}
+   | ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #13231 <https://github.com/rust-lang/rust/issues/13231> for more information
+   = help: add `#![feature(auto_traits)]` to the crate attributes to enable
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0567, E0658.
+For more information about an error, try `rustc --explain E0567`.
diff --git a/tests/ui/coroutine/issue-57084.rs b/tests/ui/coroutine/issue-57084.rs
index 95bed5b151e..e0aeae66735 100644
--- a/tests/ui/coroutine/issue-57084.rs
+++ b/tests/ui/coroutine/issue-57084.rs
@@ -1,5 +1,5 @@
 // This issue reproduces an ICE on compile (E.g. fails on 2018-12-19 nightly).
-// "cannot relate bound region: ReLateBound(DebruijnIndex(1), BrAnon(1)) <= '?1"
+// "cannot relate bound region: ReBound(DebruijnIndex(1), BrAnon(1)) <= '?1"
 // run-pass
 // edition:2018
 #![feature(coroutines,coroutine_trait)]
diff --git a/tests/ui/coroutine/witness-ignore-fake-reads.rs b/tests/ui/coroutine/witness-ignore-fake-reads.rs
new file mode 100644
index 00000000000..ccf9ce8b49e
--- /dev/null
+++ b/tests/ui/coroutine/witness-ignore-fake-reads.rs
@@ -0,0 +1,34 @@
+// check-pass
+// edition: 2021
+
+// regression test for #117059
+struct SendNotSync(*const ());
+unsafe impl Send for SendNotSync {}
+// impl !Sync for SendNotSync {} // automatically disabled
+
+struct Inner {
+    stream: SendNotSync,
+    state: bool,
+}
+
+struct SendSync;
+impl std::ops::Deref for SendSync {
+    type Target = Inner;
+    fn deref(&self) -> &Self::Target {
+        todo!();
+    }
+}
+
+async fn next() {
+    let inner = SendSync;
+    match inner.state {
+        true if false => {}
+        false => async {}.await,
+        _ => {}
+    }
+}
+
+fn is_send<T: Send>(_: T) {}
+fn main() {
+    is_send(next())
+}
diff --git a/tests/ui/deriving/deriving-all-codegen.stdout b/tests/ui/deriving/deriving-all-codegen.stdout
index 3d9f8129d93..42154c3c3be 100644
--- a/tests/ui/deriving/deriving-all-codegen.stdout
+++ b/tests/ui/deriving/deriving-all-codegen.stdout
@@ -33,6 +33,7 @@ impl ::core::clone::Clone for Empty {
 impl ::core::marker::Copy for Empty { }
 #[automatically_derived]
 impl ::core::fmt::Debug for Empty {
+    #[inline]
     fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
         ::core::fmt::Formatter::write_str(f, "Empty")
     }
@@ -97,6 +98,7 @@ impl ::core::clone::Clone for Point {
 impl ::core::marker::Copy for Point { }
 #[automatically_derived]
 impl ::core::fmt::Debug for Point {
+    #[inline]
     fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
         ::core::fmt::Formatter::debug_struct_field2_finish(f, "Point", "x",
             &self.x, "y", &&self.y)
@@ -183,6 +185,7 @@ impl ::core::clone::Clone for PackedPoint {
 impl ::core::marker::Copy for PackedPoint { }
 #[automatically_derived]
 impl ::core::fmt::Debug for PackedPoint {
+    #[inline]
     fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
         ::core::fmt::Formatter::debug_struct_field2_finish(f, "PackedPoint",
             "x", &{ self.x }, "y", &&{ self.y })
@@ -276,6 +279,7 @@ impl ::core::clone::Clone for Big {
 impl ::core::marker::Copy for Big { }
 #[automatically_derived]
 impl ::core::fmt::Debug for Big {
+    #[inline]
     fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
         let names: &'static _ =
             &["b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8"];
@@ -475,6 +479,7 @@ impl Copy for PackedManualCopy {}
 struct Unsized([u32]);
 #[automatically_derived]
 impl ::core::fmt::Debug for Unsized {
+    #[inline]
     fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
         ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Unsized",
             &&self.0)
@@ -527,6 +532,7 @@ impl ::core::cmp::Ord for Unsized {
 struct PackedUnsizedU8([u8]);
 #[automatically_derived]
 impl ::core::fmt::Debug for PackedUnsizedU8 {
+    #[inline]
     fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
         ::core::fmt::Formatter::debug_tuple_field1_finish(f,
             "PackedUnsizedU8", &&self.0)
@@ -569,6 +575,7 @@ impl<T: ::core::marker::Copy + Trait, U: ::core::marker::Copy>
 #[automatically_derived]
 impl<T: ::core::fmt::Debug + Trait, U: ::core::fmt::Debug> ::core::fmt::Debug
     for Generic<T, U> where T::A: ::core::fmt::Debug {
+    #[inline]
     fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
         ::core::fmt::Formatter::debug_struct_field3_finish(f, "Generic", "t",
             &self.t, "ta", &self.ta, "u", &&self.u)
@@ -687,6 +694,7 @@ impl<T: ::core::fmt::Debug + ::core::marker::Copy + Trait,
     U: ::core::fmt::Debug + ::core::marker::Copy> ::core::fmt::Debug for
     PackedGeneric<T, U> where T::A: ::core::fmt::Debug + ::core::marker::Copy
     {
+    #[inline]
     fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
         ::core::fmt::Formatter::debug_tuple_field3_finish(f, "PackedGeneric",
             &{ self.0 }, &{ self.1 }, &&{ self.2 })
@@ -797,6 +805,7 @@ impl ::core::clone::Clone for Enum0 {
 impl ::core::marker::Copy for Enum0 { }
 #[automatically_derived]
 impl ::core::fmt::Debug for Enum0 {
+    #[inline]
     fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
         match *self {}
     }
@@ -856,6 +865,7 @@ impl ::core::clone::Clone for Enum1 {
 }
 #[automatically_derived]
 impl ::core::fmt::Debug for Enum1 {
+    #[inline]
     fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
         match self {
             Enum1::Single { x: __self_0 } =>
@@ -932,6 +942,7 @@ impl ::core::clone::Clone for Fieldless1 {
 }
 #[automatically_derived]
 impl ::core::fmt::Debug for Fieldless1 {
+    #[inline]
     fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
         ::core::fmt::Formatter::write_str(f, "A")
     }
@@ -995,6 +1006,7 @@ impl ::core::clone::Clone for Fieldless {
 impl ::core::marker::Copy for Fieldless { }
 #[automatically_derived]
 impl ::core::fmt::Debug for Fieldless {
+    #[inline]
     fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
         ::core::fmt::Formatter::write_str(f,
             match self {
@@ -1083,6 +1095,7 @@ impl ::core::clone::Clone for Mixed {
 impl ::core::marker::Copy for Mixed { }
 #[automatically_derived]
 impl ::core::fmt::Debug for Mixed {
+    #[inline]
     fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
         match self {
             Mixed::P => ::core::fmt::Formatter::write_str(f, "P"),
@@ -1217,6 +1230,7 @@ impl ::core::clone::Clone for Fielded {
 }
 #[automatically_derived]
 impl ::core::fmt::Debug for Fielded {
+    #[inline]
     fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
         match self {
             Fielded::X(__self_0) =>
@@ -1341,6 +1355,7 @@ impl<T: ::core::marker::Copy, U: ::core::marker::Copy> ::core::marker::Copy
 #[automatically_derived]
 impl<T: ::core::fmt::Debug, U: ::core::fmt::Debug> ::core::fmt::Debug for
     EnumGeneric<T, U> {
+    #[inline]
     fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
         match self {
             EnumGeneric::One(__self_0) =>
diff --git a/tests/ui/generic-const-items/const-trait-impl.rs b/tests/ui/generic-const-items/const-trait-impl.rs
index d30f7af170d..43cdf818c46 100644
--- a/tests/ui/generic-const-items/const-trait-impl.rs
+++ b/tests/ui/generic-const-items/const-trait-impl.rs
@@ -7,8 +7,8 @@
 #![allow(incomplete_features)]
 #![crate_type = "lib"]
 
-// FIXME(generic_const_items): Interpret `~const` as always-const.
-const CREATE<T: ~const Create>: T = T::create();
+// FIXME(generic_const_items, effects): Introduce `const` bounds to make this work.
+const CREATE<T: Create>: T = T::create();
 
 pub const K0: i32 = CREATE::<i32>;
 pub const K1: i32 = CREATE; // arg inferred
diff --git a/tests/ui/generic-const-items/const-trait-impl.stderr b/tests/ui/generic-const-items/const-trait-impl.stderr
index 34360c581d5..64aa8adf8a7 100644
--- a/tests/ui/generic-const-items/const-trait-impl.stderr
+++ b/tests/ui/generic-const-items/const-trait-impl.stderr
@@ -1,8 +1,8 @@
 error[E0015]: cannot call non-const fn `<T as Create>::create` in constants
-  --> $DIR/const-trait-impl.rs:11:37
+  --> $DIR/const-trait-impl.rs:11:30
    |
-LL | const CREATE<T: ~const Create>: T = T::create();
-   |                                     ^^^^^^^^^^^
+LL | const CREATE<T: Create>: T = T::create();
+   |                              ^^^^^^^^^^^
    |
    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
 
diff --git a/tests/ui/nll/closure-requirements/escape-argument-callee.stderr b/tests/ui/nll/closure-requirements/escape-argument-callee.stderr
index b3cb7813e19..a8f6559e425 100644
--- a/tests/ui/nll/closure-requirements/escape-argument-callee.stderr
+++ b/tests/ui/nll/closure-requirements/escape-argument-callee.stderr
@@ -6,7 +6,7 @@ LL |         let mut closure = expect_sig(|p, y| *p = y);
    |
    = note: defining type: test::{closure#0} with closure args [
                i16,
-               for<Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) mut &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) i32)),
+               for<Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) mut &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32, &ReBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) i32)),
                (),
            ]
 
diff --git a/tests/ui/nll/closure-requirements/escape-argument.stderr b/tests/ui/nll/closure-requirements/escape-argument.stderr
index 4f0156728ac..40f04bb6da6 100644
--- a/tests/ui/nll/closure-requirements/escape-argument.stderr
+++ b/tests/ui/nll/closure-requirements/escape-argument.stderr
@@ -6,7 +6,7 @@ LL |         let mut closure = expect_sig(|p, y| *p = y);
    |
    = note: defining type: test::{closure#0} with closure args [
                i16,
-               for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) mut &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32)),
+               for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) mut &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32, &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32)),
                (),
            ]
 
diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr
index ccf56bf6f37..ef2cb4067d7 100644
--- a/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr
@@ -6,7 +6,7 @@ LL |         |_outlives1, _outlives2, _outlives3, x, y| {
    |
    = note: defining type: supply::{closure#0} with closure args [
                i16,
-               for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&'?2 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?3 u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
+               for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&'?2 &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?3 u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
                (),
            ]
    = note: late-bound region is '?4
diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-ref.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-ref.stderr
index a16433c9d37..db48a4ce70c 100644
--- a/tests/ui/nll/closure-requirements/propagate-approximated-ref.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-ref.stderr
@@ -6,7 +6,7 @@ LL |     establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y
    |
    = note: defining type: supply::{closure#0} with closure args [
                i16,
-               for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&'?1 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) &'?2 u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>)),
+               for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) &'?2 u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>)),
                (),
            ]
    = note: late-bound region is '?3
diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
index 9e0f16c0fc7..5ce3dae5a33 100644
--- a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
@@ -6,7 +6,7 @@ LL |     foo(cell, |cell_a, cell_x| {
    |
    = note: defining type: case1::{closure#0} with closure args [
                i32,
-               for<Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>)),
+               for<Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>)),
                (),
            ]
 
@@ -36,7 +36,7 @@ LL |     foo(cell, |cell_a, cell_x| {
    |
    = note: defining type: case2::{closure#0} with closure args [
                i32,
-               for<Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>)),
+               for<Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>)),
                (),
            ]
    = note: number of external vids: 2
diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr
index e4989e32155..ffd526d90af 100644
--- a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr
@@ -6,7 +6,7 @@ LL |     establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
    |
    = note: defining type: supply::{closure#0} with closure args [
                i16,
-               for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&'?1 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) u32>)),
+               for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) u32>)),
                (),
            ]
    = note: late-bound region is '?2
diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr
index be35e62d070..726d0dc2a4c 100644
--- a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr
@@ -6,7 +6,7 @@ LL |     establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y
    |
    = note: defining type: supply::{closure#0} with closure args [
                i16,
-               for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&'?1 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&'?2 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>)),
+               for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&'?2 &ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>)),
                (),
            ]
    = note: late-bound region is '?3
diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-val.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-val.stderr
index 8880dd816a1..5a65c768448 100644
--- a/tests/ui/nll/closure-requirements/propagate-approximated-val.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-val.stderr
@@ -6,7 +6,7 @@ LL |     establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {
    |
    = note: defining type: test::{closure#0} with closure args [
                i16,
-               for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?2 u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
+               for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?2 u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
                (),
            ]
    = note: late-bound region is '?3
diff --git a/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr b/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr
index 47774b63f81..0dd53f81ae1 100644
--- a/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr
@@ -6,7 +6,7 @@ LL |         |_outlives1, _outlives2, x, y| {
    |
    = note: defining type: supply::{closure#0} with closure args [
                i16,
-               for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?2 u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
+               for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?2 u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
                (),
            ]
    = note: late-bound region is '?3
diff --git a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr
index 3404bb12827..f7a0ee9b18d 100644
--- a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr
@@ -6,7 +6,7 @@ LL |     establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
    |
    = note: defining type: supply::{closure#0} with closure args [
                i16,
-               for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?1 u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
+               for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?1 u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
                (),
            ]
    = note: late-bound region is '?2
diff --git a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr
index e40648912e3..fa9fa9e8f3c 100644
--- a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr
@@ -6,7 +6,7 @@ LL |     establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y
    |
    = note: defining type: supply::{closure#0} with closure args [
                i16,
-               for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?1 u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) &'?2 u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>)),
+               for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?1 u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) &'?2 u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>)),
                (),
            ]
    = note: late-bound region is '?3
diff --git a/tests/ui/nll/closure-requirements/return-wrong-bound-region.stderr b/tests/ui/nll/closure-requirements/return-wrong-bound-region.stderr
index 18fb7195d02..35e4a16c8da 100644
--- a/tests/ui/nll/closure-requirements/return-wrong-bound-region.stderr
+++ b/tests/ui/nll/closure-requirements/return-wrong-bound-region.stderr
@@ -6,7 +6,7 @@ LL |     expect_sig(|a, b| b); // ought to return `a`
    |
    = note: defining type: test::{closure#0} with closure args [
                i16,
-               for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) i32, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32)) -> &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) i32,
+               for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) i32, &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32)) -> &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) i32,
                (),
            ]
 
diff --git a/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr b/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
index 59e29e9a420..0048eef6779 100644
--- a/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
+++ b/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
@@ -6,7 +6,7 @@ LL |     twice(cell, value, |a, b| invoke(a, b));
    |
    = note: defining type: generic::<T>::{closure#0} with closure args [
                i16,
-               for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'?1 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) ()>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) T)),
+               for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) ()>>, &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) T)),
                (),
            ]
    = note: number of external vids: 2
@@ -28,7 +28,7 @@ LL |     twice(cell, value, |a, b| invoke(a, b));
    |
    = note: defining type: generic_fail::<T>::{closure#0} with closure args [
                i16,
-               for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'?1 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) ()>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) T)),
+               for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) ()>>, &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) T)),
                (),
            ]
    = note: late-bound region is '?2
diff --git a/tests/ui/parser/brace-in-let-chain.rs b/tests/ui/parser/brace-in-let-chain.rs
new file mode 100644
index 00000000000..1f34c73a2c3
--- /dev/null
+++ b/tests/ui/parser/brace-in-let-chain.rs
@@ -0,0 +1,58 @@
+// issue #117766
+
+#![feature(let_chains)]
+fn main() {
+    if let () = ()
+        && let () = () { //~ERROR: found a `{` in the middle of a let-chain
+        && let () = ()
+    {
+    }
+}
+
+fn quux() {
+    while let () = ()
+        && let () = () { //~ERROR: found a `{` in the middle of a let-chain
+        && let () = ()
+    {
+    }
+}
+
+fn foobar() {
+    while false {}
+    {
+        && let () = ()
+}
+
+fn fubar() {
+    while false {
+        {
+            && let () = ()
+    }
+}
+
+fn qux() {
+    let foo = false;
+    match foo {
+        _ if foo => {
+            && let () = ()
+        _ => {}
+    }
+}
+
+fn foo() {
+    {
+    && let () = ()
+}
+
+fn bar() {
+    if false {}
+    {
+        && let () = ()
+}
+
+fn baz() {
+    if false {
+        {
+            && let () = ()
+    }
+} //~ERROR: this file contains an unclosed delimiter
diff --git a/tests/ui/parser/brace-in-let-chain.stderr b/tests/ui/parser/brace-in-let-chain.stderr
new file mode 100644
index 00000000000..7182d86d001
--- /dev/null
+++ b/tests/ui/parser/brace-in-let-chain.stderr
@@ -0,0 +1,65 @@
+error: this file contains an unclosed delimiter
+  --> $DIR/brace-in-let-chain.rs:58:54
+   |
+LL | fn main() {
+   |           - unclosed delimiter
+...
+LL | fn quux() {
+   |           - unclosed delimiter
+...
+LL | fn foobar() {
+   |             - unclosed delimiter
+...
+LL | fn fubar() {
+   |            - unclosed delimiter
+...
+LL | fn qux() {
+   |          - unclosed delimiter
+...
+LL | fn foo() {
+   |          - unclosed delimiter
+...
+LL | fn bar() {
+   |          - unclosed delimiter
+...
+LL | fn baz() {
+   |          - unclosed delimiter
+LL |     if false {
+LL |         {
+   |         - this delimiter might not be properly closed...
+LL |             && let () = ()
+LL |     }
+   |     - ...as it matches this but it has different indentation
+LL | }
+   |                                                      ^
+
+error: found a `{` in the middle of a let-chain
+  --> $DIR/brace-in-let-chain.rs:14:24
+   |
+LL |         && let () = () {
+   |                        ^
+LL |         && let () = ()
+   |         ------ you might have meant to continue the let-chain here
+   |
+help: consider removing this brace to parse the `let` as part of the same chain
+   |
+LL -         && let () = () {
+LL +         && let () = ()
+   |
+
+error: found a `{` in the middle of a let-chain
+  --> $DIR/brace-in-let-chain.rs:6:24
+   |
+LL |         && let () = () {
+   |                        ^
+LL |         && let () = ()
+   |         ------ you might have meant to continue the let-chain here
+   |
+help: consider removing this brace to parse the `let` as part of the same chain
+   |
+LL -         && let () = () {
+LL +         && let () = ()
+   |
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/parser/semi-in-let-chain.rs b/tests/ui/parser/semi-in-let-chain.rs
new file mode 100644
index 00000000000..9c21af0372d
--- /dev/null
+++ b/tests/ui/parser/semi-in-let-chain.rs
@@ -0,0 +1,27 @@
+// Issue #117720
+
+#![feature(let_chains)]
+
+fn main() {
+    if let () = ()
+        && let () = (); //~ERROR
+        && let () = ()
+    {
+    }
+}
+
+fn foo() {
+    if let () = ()
+        && () == (); //~ERROR
+        && 1 < 0
+    {
+    }
+}
+
+fn bar() {
+    if let () = ()
+        && () == (); //~ERROR
+        && let () = ()
+    {
+    }
+}
diff --git a/tests/ui/parser/semi-in-let-chain.stderr b/tests/ui/parser/semi-in-let-chain.stderr
new file mode 100644
index 00000000000..c1a8f92965e
--- /dev/null
+++ b/tests/ui/parser/semi-in-let-chain.stderr
@@ -0,0 +1,50 @@
+error: expected `{`, found `;`
+  --> $DIR/semi-in-let-chain.rs:7:23
+   |
+LL |         && let () = ();
+   |                       ^ expected `{`
+   |
+note: you likely meant to continue parsing the let-chain starting here
+  --> $DIR/semi-in-let-chain.rs:8:9
+   |
+LL |         && let () = ()
+   |         ^^^^^^
+help: consider removing this semicolon to parse the `let` as part of the same chain
+   |
+LL -         && let () = ();
+LL +         && let () = ()
+   |
+
+error: expected `{`, found `;`
+  --> $DIR/semi-in-let-chain.rs:15:20
+   |
+LL |         && () == ();
+   |                    ^ expected `{`
+   |
+note: the `if` expression is missing a block after this condition
+  --> $DIR/semi-in-let-chain.rs:14:8
+   |
+LL |       if let () = ()
+   |  ________^
+LL | |         && () == ();
+   | |___________________^
+
+error: expected `{`, found `;`
+  --> $DIR/semi-in-let-chain.rs:23:20
+   |
+LL |         && () == ();
+   |                    ^ expected `{`
+   |
+note: you likely meant to continue parsing the let-chain starting here
+  --> $DIR/semi-in-let-chain.rs:24:9
+   |
+LL |         && let () = ()
+   |         ^^^^^^
+help: consider removing this semicolon to parse the `let` as part of the same chain
+   |
+LL -         && () == ();
+LL +         && () == ()
+   |
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr
index 6d436018bf4..e6b663c47d7 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr
@@ -1,3 +1,11 @@
+error: `~const` is not allowed here
+  --> $DIR/assoc-type-const-bound-usage.rs:7:17
+   |
+LL |     type Assoc: ~const Foo;
+   |                 ^^^^^^^^^^
+   |
+   = note: this item cannot have `~const` trait bounds
+
 error[E0308]: mismatched types
   --> $DIR/assoc-type-const-bound-usage.rs:12:5
    |
@@ -7,6 +15,6 @@ LL |     <T as Foo>::Assoc::foo();
    = note: expected constant `host`
               found constant `true`
 
-error: aborting due to previous error
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr
index 0cffae1da8d..7df16ca5a3b 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr
@@ -1,8 +1,16 @@
+error: `~const` is not allowed here
+  --> $DIR/assoc-type.rs:17:15
+   |
+LL |     type Bar: ~const std::ops::Add;
+   |               ^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: this item cannot have `~const` trait bounds
+
 error: ~const can only be applied to `#[const_trait]` traits
   --> $DIR/assoc-type.rs:17:22
    |
 LL |     type Bar: ~const std::ops::Add;
    |                      ^^^^^^^^^^^^^
 
-error: aborting due to previous error
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const-bound-on-not-const-associated-fn.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-bound-on-not-const-associated-fn.rs
index 1e22ddcea8d..0025449c492 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const-bound-on-not-const-associated-fn.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-bound-on-not-const-associated-fn.rs
@@ -1,4 +1,4 @@
-#![feature(const_trait_impl, effects)]
+#![feature(const_trait_impl)]
 
 #[const_trait]
 trait MyTrait {
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const-bound-on-not-const-associated-fn.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-bound-on-not-const-associated-fn.stderr
index 9210f642706..9210f642706 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const-bound-on-not-const-associated-fn.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-bound-on-not-const-associated-fn.stderr
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise.stderr
index 23e36887025..be75e852e0a 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise.stderr
@@ -1,19 +1,10 @@
-error[E0493]: destructor of `T` cannot be evaluated at compile-time
-  --> $DIR/const-drop.rs:19:32
+error: `~const` is not allowed here
+  --> $DIR/const-drop.rs:67:38
    |
-LL | const fn a<T: ~const Destruct>(_: T) {}
-   |                                ^      - value is dropped here
-   |                                |
-   |                                the destructor for this type cannot be evaluated in constant functions
-
-error[E0493]: destructor of `S<'_>` cannot be evaluated at compile-time
-  --> $DIR/const-drop.rs:24:13
+LL |     pub struct ConstDropWithBound<T: ~const SomeTrait>(pub core::marker::PhantomData<T>);
+   |                                      ^^^^^^^^^^^^^^^^
    |
-LL |     let _ = S(&mut c);
-   |             ^^^^^^^^^- value is dropped here
-   |             |
-   |             the destructor for this type cannot be evaluated in constant functions
+   = note: this item cannot have `~const` trait bounds
 
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0493`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs
index 0a9cf638a2d..9da84cdb052 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs
@@ -63,6 +63,7 @@ mod t {
         fn foo() {}
     }
 
+    // FIXME(effects): This should be a `const` bound instead of a `~const` one.
     pub struct ConstDropWithBound<T: ~const SomeTrait>(pub core::marker::PhantomData<T>);
 
     impl<T: ~const SomeTrait> const Drop for ConstDropWithBound<T> {
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock.stderr
index 23e36887025..be75e852e0a 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock.stderr
@@ -1,19 +1,10 @@
-error[E0493]: destructor of `T` cannot be evaluated at compile-time
-  --> $DIR/const-drop.rs:19:32
+error: `~const` is not allowed here
+  --> $DIR/const-drop.rs:67:38
    |
-LL | const fn a<T: ~const Destruct>(_: T) {}
-   |                                ^      - value is dropped here
-   |                                |
-   |                                the destructor for this type cannot be evaluated in constant functions
-
-error[E0493]: destructor of `S<'_>` cannot be evaluated at compile-time
-  --> $DIR/const-drop.rs:24:13
+LL |     pub struct ConstDropWithBound<T: ~const SomeTrait>(pub core::marker::PhantomData<T>);
+   |                                      ^^^^^^^^^^^^^^^^
    |
-LL |     let _ = S(&mut c);
-   |             ^^^^^^^^^- value is dropped here
-   |             |
-   |             the destructor for this type cannot be evaluated in constant functions
+   = note: this item cannot have `~const` trait bounds
 
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0493`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-90052.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-90052.rs
deleted file mode 100644
index 21ddf4ab4e5..00000000000
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-90052.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-#![feature(const_trait_impl)]
-
-#[const_trait]
-trait Bar {}
-
-fn foo<T>() where T: ~const Bar {}
-//~^ ERROR `~const` is not allowed
-
-fn main() {}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-90052.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-90052.stderr
deleted file mode 100644
index b2a9365378b..00000000000
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-90052.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error: `~const` is not allowed here
-  --> $DIR/issue-90052.rs:6:22
-   |
-LL | fn foo<T>() where T: ~const Bar {}
-   |                      ^^^^^^^^^^
-   |
-note: this function is not `const`, so it cannot have `~const` trait bounds
-  --> $DIR/issue-90052.rs:6:4
-   |
-LL | fn foo<T>() where T: ~const Bar {}
-   |    ^^^
-
-error: aborting due to previous error
-
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs
index 3db59631ef8..234b0dd0063 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs
@@ -18,11 +18,7 @@ trait Bar {
     fn bar();
 }
 
-// bgr360: I was only able to exercise the code path that raises the
-// "missing ~const qualifier" error by making this base impl non-const, even
-// though that doesn't really make sense to do. As seen below, if the base impl
-// is made const, rustc fails earlier with an overlapping impl failure.
-impl<T> Bar for T
+impl<T> const Bar for T
 where
     T: ~const Foo,
 {
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr
index b60399c57dc..204f0f9f89f 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr
@@ -1,3 +1,15 @@
+error: `~const` is not allowed here
+  --> $DIR/super-traits-fail-2.rs:11:12
+   |
+LL | trait Bar: ~const Foo {}
+   |            ^^^^^^^^^^
+   |
+note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
+  --> $DIR/super-traits-fail-2.rs:11:1
+   |
+LL | trait Bar: ~const Foo {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
+
 error: ~const can only be applied to `#[const_trait]` traits
   --> $DIR/super-traits-fail-2.rs:11:19
    |
@@ -12,5 +24,5 @@ LL | trait Bar: ~const Foo {}
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr
index 5d34156a519..06330958b8e 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr
@@ -1,11 +1,14 @@
-error[E0015]: cannot call non-const fn `<T as Foo>::a` in constant functions
-  --> $DIR/super-traits-fail-2.rs:16:7
+error: `~const` is not allowed here
+  --> $DIR/super-traits-fail-2.rs:11:12
    |
-LL |     x.a();
-   |       ^^^
+LL | trait Bar: ~const Foo {}
+   |            ^^^^^^^^^^
    |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
+note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
+  --> $DIR/super-traits-fail-2.rs:11:1
+   |
+LL | trait Bar: ~const Foo {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr
index eb12a236d8c..77b13a351e2 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr
@@ -1,3 +1,15 @@
+error: `~const` is not allowed here
+  --> $DIR/super-traits-fail-3.rs:13:12
+   |
+LL | trait Bar: ~const Foo {}
+   |            ^^^^^^^^^^
+   |
+note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
+  --> $DIR/super-traits-fail-3.rs:13:1
+   |
+LL | trait Bar: ~const Foo {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
+
 error: ~const can only be applied to `#[const_trait]` traits
   --> $DIR/super-traits-fail-3.rs:13:19
    |
@@ -13,10 +25,10 @@ LL | trait Bar: ~const Foo {}
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: ~const can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:17:24
+  --> $DIR/super-traits-fail-3.rs:18:24
    |
 LL | const fn foo<T: ~const Bar>(x: &T) {
    |                        ^^^
 
-error: aborting due to 3 previous errors
+error: aborting due to 4 previous errors
 
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs
index 16c592830d7..5994057b2db 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs
@@ -13,6 +13,7 @@ trait Foo {
 trait Bar: ~const Foo {}
 //[ny,nn]~^ ERROR: ~const can only be applied to `#[const_trait]`
 //[ny,nn]~| ERROR: ~const can only be applied to `#[const_trait]`
+//[yn,nn]~^^^ ERROR: `~const` is not allowed here
 
 const fn foo<T: ~const Bar>(x: &T) {
     //[yn,nn]~^ ERROR: ~const can only be applied to `#[const_trait]`
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr
index 58225b94591..2e41eb9b4c4 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr
@@ -1,8 +1,20 @@
+error: `~const` is not allowed here
+  --> $DIR/super-traits-fail-3.rs:13:12
+   |
+LL | trait Bar: ~const Foo {}
+   |            ^^^^^^^^^^
+   |
+note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
+  --> $DIR/super-traits-fail-3.rs:13:1
+   |
+LL | trait Bar: ~const Foo {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
+
 error: ~const can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:17:24
+  --> $DIR/super-traits-fail-3.rs:18:24
    |
 LL | const fn foo<T: ~const Bar>(x: &T) {
    |                        ^^^
 
-error: aborting due to previous error
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yy.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yy.stderr
index 6bc643e6871..d81d9aa94da 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yy.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yy.stderr
@@ -1,5 +1,5 @@
 error[E0015]: cannot call non-const fn `<T as Foo>::a` in constant functions
-  --> $DIR/super-traits-fail-3.rs:19:7
+  --> $DIR/super-traits-fail-3.rs:20:7
    |
 LL |     x.a();
    |       ^^^
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.rs
index 95f7aaba0fc..bbe1194f7a3 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.rs
@@ -1,7 +1,55 @@
 #![feature(const_trait_impl)]
-#![feature(associated_type_bounds)]
 
-struct TildeQuestion<T: ~const ?Sized>(std::marker::PhantomData<T>);
-//~^ ERROR `~const` and `?` are mutually exclusive
+#[const_trait]
+trait Trait {}
+
+// Regression test for issue #90052.
+fn non_const_function<T: ~const Trait>() {} //~ ERROR `~const` is not allowed
+
+struct Struct<T: ~const Trait> { field: T } //~ ERROR `~const` is not allowed here
+struct TupleStruct<T: ~const Trait>(T); //~ ERROR `~const` is not allowed here
+struct UnitStruct<T: ~const Trait>; //~ ERROR `~const` is not allowed here
+
+enum Enum<T: ~const Trait> { Variant(T) } //~ ERROR `~const` is not allowed here
+
+union Union<T: ~const Trait> { field: T } //~ ERROR `~const` is not allowed here
+
+type Type<T: ~const Trait> = T; //~ ERROR `~const` is not allowed here
+
+const CONSTANT<T: ~const Trait>: () = (); //~ ERROR `~const` is not allowed here
+//~^ ERROR generic const items are experimental
+
+trait NonConstTrait {
+    type Type<T: ~const Trait>: ~const Trait;
+    //~^ ERROR `~const` is not allowed
+    //~| ERROR `~const` is not allowed
+    fn non_const_function<T: ~const Trait>(); //~ ERROR `~const` is not allowed
+    const CONSTANT<T: ~const Trait>: (); //~ ERROR `~const` is not allowed
+    //~^ ERROR generic const items are experimental
+}
+
+impl NonConstTrait for () {
+    type Type<T: ~const Trait> = (); //~ ERROR `~const` is not allowed
+    fn non_const_function<T: ~const Trait>() {} //~ ERROR `~const` is not allowed
+    const CONSTANT<T: ~const Trait>: () = (); //~ ERROR `~const` is not allowed
+    //~^ ERROR generic const items are experimental
+}
+
+struct Implementor;
+
+impl Implementor {
+    type Type<T: ~const Trait> = (); //~ ERROR `~const` is not allowed
+    //~^ ERROR inherent associated types are unstable
+    fn non_const_function<T: ~const Trait>() {} //~ ERROR `~const` is not allowed
+    const CONSTANT<T: ~const Trait>: () = (); //~ ERROR `~const` is not allowed
+    //~^ ERROR generic const items are experimental
+}
+
+// non-const traits
+trait Child0: ~const Trait {} //~ ERROR `~const` is not allowed
+trait Child1 where Self: ~const Trait {} //~ ERROR `~const` is not allowed
+
+// non-const impl
+impl<T: ~const Trait> Trait for T {} //~ ERROR `~const` is not allowed
 
 fn main() {}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr
index d20f146df3f..c14f9a99035 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr
@@ -1,8 +1,244 @@
-error: `~const` and `?` are mutually exclusive
-  --> $DIR/tilde-const-invalid-places.rs:4:25
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:7:26
    |
-LL | struct TildeQuestion<T: ~const ?Sized>(std::marker::PhantomData<T>);
-   |                         ^^^^^^^^^^^^^
+LL | fn non_const_function<T: ~const Trait>() {}
+   |                          ^^^^^^^^^^^^
+   |
+note: this function is not `const`, so it cannot have `~const` trait bounds
+  --> $DIR/tilde-const-invalid-places.rs:7:4
+   |
+LL | fn non_const_function<T: ~const Trait>() {}
+   |    ^^^^^^^^^^^^^^^^^^
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:9:18
+   |
+LL | struct Struct<T: ~const Trait> { field: T }
+   |                  ^^^^^^^^^^^^
+   |
+   = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:10:23
+   |
+LL | struct TupleStruct<T: ~const Trait>(T);
+   |                       ^^^^^^^^^^^^
+   |
+   = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:11:22
+   |
+LL | struct UnitStruct<T: ~const Trait>;
+   |                      ^^^^^^^^^^^^
+   |
+   = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:13:14
+   |
+LL | enum Enum<T: ~const Trait> { Variant(T) }
+   |              ^^^^^^^^^^^^
+   |
+   = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:15:16
+   |
+LL | union Union<T: ~const Trait> { field: T }
+   |                ^^^^^^^^^^^^
+   |
+   = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:17:14
+   |
+LL | type Type<T: ~const Trait> = T;
+   |              ^^^^^^^^^^^^
+   |
+   = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:19:19
+   |
+LL | const CONSTANT<T: ~const Trait>: () = ();
+   |                   ^^^^^^^^^^^^
+   |
+   = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:23:18
+   |
+LL |     type Type<T: ~const Trait>: ~const Trait;
+   |                  ^^^^^^^^^^^^
+   |
+   = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:23:33
+   |
+LL |     type Type<T: ~const Trait>: ~const Trait;
+   |                                 ^^^^^^^^^^^^
+   |
+   = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:26:30
+   |
+LL |     fn non_const_function<T: ~const Trait>();
+   |                              ^^^^^^^^^^^^
+   |
+note: this function is not `const`, so it cannot have `~const` trait bounds
+  --> $DIR/tilde-const-invalid-places.rs:26:8
+   |
+LL |     fn non_const_function<T: ~const Trait>();
+   |        ^^^^^^^^^^^^^^^^^^
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:27:23
+   |
+LL |     const CONSTANT<T: ~const Trait>: ();
+   |                       ^^^^^^^^^^^^
+   |
+   = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:32:18
+   |
+LL |     type Type<T: ~const Trait> = ();
+   |                  ^^^^^^^^^^^^
+   |
+   = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:33:30
+   |
+LL |     fn non_const_function<T: ~const Trait>() {}
+   |                              ^^^^^^^^^^^^
+   |
+note: this function is not `const`, so it cannot have `~const` trait bounds
+  --> $DIR/tilde-const-invalid-places.rs:33:8
+   |
+LL |     fn non_const_function<T: ~const Trait>() {}
+   |        ^^^^^^^^^^^^^^^^^^
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:34:23
+   |
+LL |     const CONSTANT<T: ~const Trait>: () = ();
+   |                       ^^^^^^^^^^^^
+   |
+   = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:41:18
+   |
+LL |     type Type<T: ~const Trait> = ();
+   |                  ^^^^^^^^^^^^
+   |
+   = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:43:30
+   |
+LL |     fn non_const_function<T: ~const Trait>() {}
+   |                              ^^^^^^^^^^^^
+   |
+note: this function is not `const`, so it cannot have `~const` trait bounds
+  --> $DIR/tilde-const-invalid-places.rs:43:8
+   |
+LL |     fn non_const_function<T: ~const Trait>() {}
+   |        ^^^^^^^^^^^^^^^^^^
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:44:23
+   |
+LL |     const CONSTANT<T: ~const Trait>: () = ();
+   |                       ^^^^^^^^^^^^
+   |
+   = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:49:15
+   |
+LL | trait Child0: ~const Trait {}
+   |               ^^^^^^^^^^^^
+   |
+note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
+  --> $DIR/tilde-const-invalid-places.rs:49:1
+   |
+LL | trait Child0: ~const Trait {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:50:26
+   |
+LL | trait Child1 where Self: ~const Trait {}
+   |                          ^^^^^^^^^^^^
+   |
+note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
+  --> $DIR/tilde-const-invalid-places.rs:50:1
+   |
+LL | trait Child1 where Self: ~const Trait {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: `~const` is not allowed here
+  --> $DIR/tilde-const-invalid-places.rs:53:9
+   |
+LL | impl<T: ~const Trait> Trait for T {}
+   |         ^^^^^^^^^^^^
+   |
+note: this impl is not `const`, so it cannot have `~const` trait bounds
+  --> $DIR/tilde-const-invalid-places.rs:53:1
+   |
+LL | impl<T: ~const Trait> Trait for T {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0658]: generic const items are experimental
+  --> $DIR/tilde-const-invalid-places.rs:19:15
+   |
+LL | const CONSTANT<T: ~const Trait>: () = ();
+   |               ^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #113521 <https://github.com/rust-lang/rust/issues/113521> for more information
+   = help: add `#![feature(generic_const_items)]` to the crate attributes to enable
+
+error[E0658]: generic const items are experimental
+  --> $DIR/tilde-const-invalid-places.rs:27:19
+   |
+LL |     const CONSTANT<T: ~const Trait>: ();
+   |                   ^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #113521 <https://github.com/rust-lang/rust/issues/113521> for more information
+   = help: add `#![feature(generic_const_items)]` to the crate attributes to enable
+
+error[E0658]: generic const items are experimental
+  --> $DIR/tilde-const-invalid-places.rs:34:19
+   |
+LL |     const CONSTANT<T: ~const Trait>: () = ();
+   |                   ^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #113521 <https://github.com/rust-lang/rust/issues/113521> for more information
+   = help: add `#![feature(generic_const_items)]` to the crate attributes to enable
+
+error[E0658]: generic const items are experimental
+  --> $DIR/tilde-const-invalid-places.rs:44:19
+   |
+LL |     const CONSTANT<T: ~const Trait>: () = ();
+   |                   ^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #113521 <https://github.com/rust-lang/rust/issues/113521> for more information
+   = help: add `#![feature(generic_const_items)]` to the crate attributes to enable
+
+error[E0658]: inherent associated types are unstable
+  --> $DIR/tilde-const-invalid-places.rs:41:5
+   |
+LL |     type Type<T: ~const Trait> = ();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #8995 <https://github.com/rust-lang/rust/issues/8995> for more information
+   = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable
 
-error: aborting due to previous error
+error: aborting due to 26 previous errors
 
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-maybe-trait.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-maybe-trait.rs
new file mode 100644
index 00000000000..ed911d965d6
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-maybe-trait.rs
@@ -0,0 +1,6 @@
+#![feature(const_trait_impl)]
+
+const fn tilde_question<T: ~const ?Sized>() {}
+//~^ ERROR `~const` and `?` are mutually exclusive
+
+fn main() {}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-maybe-trait.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-maybe-trait.stderr
new file mode 100644
index 00000000000..ce74ff8dde7
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-maybe-trait.stderr
@@ -0,0 +1,8 @@
+error: `~const` and `?` are mutually exclusive
+  --> $DIR/tilde-const-maybe-trait.rs:3:28
+   |
+LL | const fn tilde_question<T: ~const ?Sized>() {}
+   |                            ^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/tests/ui/structs/method-chain-expression-failure.rs b/tests/ui/structs/method-chain-expression-failure.rs
new file mode 100644
index 00000000000..43ebc5bac8c
--- /dev/null
+++ b/tests/ui/structs/method-chain-expression-failure.rs
@@ -0,0 +1,31 @@
+struct A;
+struct B;
+struct C;
+struct D;
+struct E;
+
+impl A {
+    fn b(&self) -> B { B }
+    fn foo(&self) {}
+}
+
+impl B {
+    fn c(&self) -> C { C }
+}
+
+impl C {
+    fn d(&self) -> D { D }
+    fn foo(&self) {}
+}
+
+impl D {
+    fn e(&self) -> E { E }
+}
+
+impl E {
+    fn f(&self) {}
+}
+fn main() {
+    A.b().c().d().e().foo();
+//~^ ERROR no method named `foo` found for struct `E` in the current scope
+}
diff --git a/tests/ui/structs/method-chain-expression-failure.stderr b/tests/ui/structs/method-chain-expression-failure.stderr
new file mode 100644
index 00000000000..ba635ab1fe6
--- /dev/null
+++ b/tests/ui/structs/method-chain-expression-failure.stderr
@@ -0,0 +1,15 @@
+error[E0599]: no method named `foo` found for struct `E` in the current scope
+  --> $DIR/method-chain-expression-failure.rs:29:23
+   |
+LL | struct E;
+   | -------- method `foo` not found for this struct
+...
+LL |     A.b().c().d().e().foo();
+   |     -     ---         ^^^ method not found in `E`
+   |     |     |
+   |     |     method `foo` is available on `&C`
+   |     method `foo` is available on `&A`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/suggestions/chain-method-call-mutation-in-place.stderr b/tests/ui/suggestions/chain-method-call-mutation-in-place.stderr
index 128160f10ad..2dd6fb6a3bf 100644
--- a/tests/ui/suggestions/chain-method-call-mutation-in-place.stderr
+++ b/tests/ui/suggestions/chain-method-call-mutation-in-place.stderr
@@ -18,7 +18,10 @@ error[E0599]: no method named `sort` found for unit type `()` in the current sco
   --> $DIR/chain-method-call-mutation-in-place.rs:3:72
    |
 LL |     vec![1, 2, 3].into_iter().collect::<Vec<i32>>().sort_by_key(|i| i).sort();
-   |                                                                        ^^^^ method not found in `()`
+   |     -------------             ---------------------                    ^^^^ method not found in `()`
+   |     |                         |
+   |     |                         method `sort` is available on `&mut [i32]`
+   |     method `sort` is available on `Vec<i32>`
    |
 note: method `sort_by_key` modifies its receiver in-place, it is not meant to be used in method chains.
   --> $DIR/chain-method-call-mutation-in-place.rs:3:53
diff --git a/tests/ui/suggestions/import-trait-for-method-call.rs b/tests/ui/suggestions/import-trait-for-method-call.rs
index 4dbadbdf982..feb2c7e84f1 100644
--- a/tests/ui/suggestions/import-trait-for-method-call.rs
+++ b/tests/ui/suggestions/import-trait-for-method-call.rs
@@ -1,7 +1,7 @@
 use std::hash::BuildHasher;
 
 fn next_u64() -> u64 {
-    let bh = std::collections::hash_map::RandomState::new();
+    let bh = std::hash::RandomState::new();
     let h = bh.build_hasher();
     h.finish() //~ ERROR no method named `finish` found for struct `DefaultHasher`
 }
diff --git a/tests/ui/suggestions/issue-117669.rs b/tests/ui/suggestions/issue-117669.rs
new file mode 100644
index 00000000000..09b4f2bd47c
--- /dev/null
+++ b/tests/ui/suggestions/issue-117669.rs
@@ -0,0 +1,4 @@
+fn main() {
+    let abs: i32 = 3i32.checked_abs();
+    //~^ ERROR mismatched types
+}
diff --git a/tests/ui/suggestions/issue-117669.stderr b/tests/ui/suggestions/issue-117669.stderr
new file mode 100644
index 00000000000..f09675fcc5c
--- /dev/null
+++ b/tests/ui/suggestions/issue-117669.stderr
@@ -0,0 +1,18 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-117669.rs:2:20
+   |
+LL |     let abs: i32 = 3i32.checked_abs();
+   |              ---   ^^^^^^^^^^^^^^^^^^ expected `i32`, found `Option<i32>`
+   |              |
+   |              expected due to this
+   |
+   = note: expected type `i32`
+              found enum `Option<i32>`
+help: consider using `Option::expect` to unwrap the `Option<i32>` value, panicking if the value is an `Option::None`
+   |
+LL |     let abs: i32 = 3i32.checked_abs().expect("REASON");
+   |                                      +++++++++++++++++
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs
index f6cbbf04d82..6a2ee761e19 100644
--- a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs
+++ b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs
@@ -1,6 +1,5 @@
 // edition: 2021
 // build-fail
-//~^^ ERROR cycle detected when computing layout of
 
 #![feature(impl_trait_in_assoc_type)]
 
@@ -21,6 +20,7 @@ impl Recur for () {
 
     fn recur(self) -> Self::Recur {
         async move { recur(self).await; }
+        //~^ ERROR cycle detected when computing layout of
     }
 }
 
diff --git a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr
index 2063becdb08..80b6aaaf919 100644
--- a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr
+++ b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr
@@ -1,14 +1,22 @@
-error[E0391]: cycle detected when computing layout of `{async block@$DIR/indirect-recursion-issue-112047.rs:23:9: 23:42}`
+error[E0391]: cycle detected when computing layout of `{async block@$DIR/indirect-recursion-issue-112047.rs:22:9: 22:42}`
+  --> $DIR/indirect-recursion-issue-112047.rs:22:22
    |
-   = note: ...which requires computing layout of `core::mem::maybe_uninit::MaybeUninit<{async fn body@$DIR/indirect-recursion-issue-112047.rs:15:31: 17:2}>`...
-   = note: ...which requires computing layout of `core::mem::manually_drop::ManuallyDrop<{async fn body@$DIR/indirect-recursion-issue-112047.rs:15:31: 17:2}>`...
-   = note: ...which requires computing layout of `{async fn body@$DIR/indirect-recursion-issue-112047.rs:15:31: 17:2}`...
+LL |         async move { recur(self).await; }
+   |                      ^^^^^^^^^^^^^^^^^
+   |
+   = note: ...which requires computing layout of `core::mem::maybe_uninit::MaybeUninit<{async fn body@$DIR/indirect-recursion-issue-112047.rs:14:31: 16:2}>`...
+   = note: ...which requires computing layout of `core::mem::manually_drop::ManuallyDrop<{async fn body@$DIR/indirect-recursion-issue-112047.rs:14:31: 16:2}>`...
+note: ...which requires computing layout of `{async fn body@$DIR/indirect-recursion-issue-112047.rs:14:31: 16:2}`...
+  --> $DIR/indirect-recursion-issue-112047.rs:15:5
+   |
+LL |     t.recur().await;
+   |     ^^^^^^^^^^^^^^^
    = note: ...which requires computing layout of `core::mem::maybe_uninit::MaybeUninit<<() as Recur>::Recur>`...
-   = note: ...which requires computing layout of `core::mem::maybe_uninit::MaybeUninit<{async block@$DIR/indirect-recursion-issue-112047.rs:23:9: 23:42}>`...
-   = note: ...which requires computing layout of `core::mem::manually_drop::ManuallyDrop<{async block@$DIR/indirect-recursion-issue-112047.rs:23:9: 23:42}>`...
-   = note: ...which again requires computing layout of `{async block@$DIR/indirect-recursion-issue-112047.rs:23:9: 23:42}`, completing the cycle
-note: cycle used when elaborating drops for `<impl at $DIR/indirect-recursion-issue-112047.rs:19:1: 19:18>::recur`
-  --> $DIR/indirect-recursion-issue-112047.rs:22:5
+   = note: ...which requires computing layout of `core::mem::maybe_uninit::MaybeUninit<{async block@$DIR/indirect-recursion-issue-112047.rs:22:9: 22:42}>`...
+   = note: ...which requires computing layout of `core::mem::manually_drop::ManuallyDrop<{async block@$DIR/indirect-recursion-issue-112047.rs:22:9: 22:42}>`...
+   = note: ...which again requires computing layout of `{async block@$DIR/indirect-recursion-issue-112047.rs:22:9: 22:42}`, completing the cycle
+note: cycle used when elaborating drops for `<impl at $DIR/indirect-recursion-issue-112047.rs:18:1: 18:18>::recur`
+  --> $DIR/indirect-recursion-issue-112047.rs:21:5
    |
 LL |     fn recur(self) -> Self::Recur {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/where-clauses/higher-ranked-fn-type.verbose.stderr b/tests/ui/where-clauses/higher-ranked-fn-type.verbose.stderr
index 54afeaa7eda..782e7dc5e00 100644
--- a/tests/ui/where-clauses/higher-ranked-fn-type.verbose.stderr
+++ b/tests/ui/where-clauses/higher-ranked-fn-type.verbose.stderr
@@ -1,8 +1,8 @@
-error[E0277]: the trait bound `for<Region(BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b))> fn(&ReLateBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b) }) ()): Foo` is not satisfied
+error[E0277]: the trait bound `for<Region(BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b))> fn(&ReBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b) }) ()): Foo` is not satisfied
   --> $DIR/higher-ranked-fn-type.rs:20:5
    |
 LL |     called()
-   |     ^^^^^^ the trait `for<Region(BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b))> Foo` is not implemented for `fn(&ReLateBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b) }) ())`
+   |     ^^^^^^ the trait `for<Region(BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b))> Foo` is not implemented for `fn(&ReBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b) }) ())`
    |
 help: this trait has no implementations, consider adding one
   --> $DIR/higher-ranked-fn-type.rs:6:1