From b910e977a3279460fb13e464fa4b5d563645c8cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= <berykubik@gmail.com>
Date: Mon, 4 Nov 2024 18:55:21 +0100
Subject: [PATCH 01/38] CI: increase timeout from 4h to 6h

Our CI got a bit slower since the last time we lowered the timeout, and if e.g. Docker build cache is broken, the timeout can be triggered.
---
 .github/workflows/ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2fca71716c18c..6fe257933423c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -65,7 +65,7 @@ jobs:
     defaults:
       run:
         shell: ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}
-    timeout-minutes: 240
+    timeout-minutes: 360
     env:
       CI_JOB_NAME: ${{ matrix.image }}
       CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

From 584ec95972485f4c271760517799f4fba85a10f2 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Thu, 14 Nov 2024 09:15:49 -0800
Subject: [PATCH 02/38] btree: add `{Entry,VacantEntry}::insert_entry`

This matches the recently-stabilized methods on `HashMap` entries. I've
reused tracking issue #65225 for now, but we may want to split it.
---
 .../alloc/src/collections/btree/map/entry.rs  | 105 +++++++++++++-----
 library/alloc/src/collections/btree/node.rs   |   2 +-
 2 files changed, 76 insertions(+), 31 deletions(-)

diff --git a/library/alloc/src/collections/btree/map/entry.rs b/library/alloc/src/collections/btree/map/entry.rs
index 75bb86916a887..0da6af54bc22b 100644
--- a/library/alloc/src/collections/btree/map/entry.rs
+++ b/library/alloc/src/collections/btree/map/entry.rs
@@ -269,6 +269,31 @@ impl<'a, K: Ord, V, A: Allocator + Clone> Entry<'a, K, V, A> {
             Vacant(entry) => Vacant(entry),
         }
     }
+
+    /// Sets the value of the entry, and returns an `OccupiedEntry`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// #![feature(btree_entry_insert)]
+    /// use std::collections::BTreeMap;
+    ///
+    /// let mut map: BTreeMap<&str, String> = BTreeMap::new();
+    /// let entry = map.entry("poneyland").insert_entry("hoho".to_string());
+    ///
+    /// assert_eq!(entry.key(), &"poneyland");
+    /// ```
+    #[inline]
+    #[unstable(feature = "btree_entry_insert", issue = "65225")]
+    pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V, A> {
+        match self {
+            Occupied(mut entry) => {
+                entry.insert(value);
+                entry
+            }
+            Vacant(entry) => entry.insert_entry(value),
+        }
+    }
 }
 
 impl<'a, K: Ord, V: Default, A: Allocator + Clone> Entry<'a, K, V, A> {
@@ -348,41 +373,61 @@ impl<'a, K: Ord, V, A: Allocator + Clone> VacantEntry<'a, K, V, A> {
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     #[rustc_confusables("push", "put")]
-    pub fn insert(mut self, value: V) -> &'a mut V {
-        let out_ptr = match self.handle {
+    pub fn insert(self, value: V) -> &'a mut V {
+        self.insert_entry(value).into_mut()
+    }
+
+    /// Sets the value of the entry with the `VacantEntry`'s key,
+    /// and returns an `OccupiedEntry`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// #![feature(btree_entry_insert)]
+    /// use std::collections::BTreeMap;
+    /// use std::collections::btree_map::Entry;
+    ///
+    /// let mut map: BTreeMap<&str, u32> = BTreeMap::new();
+    ///
+    /// if let Entry::Vacant(o) = map.entry("poneyland") {
+    ///     let entry = o.insert_entry(37);
+    ///     assert_eq!(entry.get(), &37);
+    /// }
+    /// assert_eq!(map["poneyland"], 37);
+    /// ```
+    #[unstable(feature = "btree_entry_insert", issue = "65225")]
+    pub fn insert_entry(mut self, value: V) -> OccupiedEntry<'a, K, V, A> {
+        let handle = match self.handle {
             None => {
                 // SAFETY: There is no tree yet so no reference to it exists.
-                let map = unsafe { self.dormant_map.awaken() };
-                let mut root = NodeRef::new_leaf(self.alloc.clone());
-                let val_ptr = root.borrow_mut().push(self.key, value);
-                map.root = Some(root.forget_type());
-                map.length = 1;
-                val_ptr
-            }
-            Some(handle) => {
-                let new_handle =
-                    handle.insert_recursing(self.key, value, self.alloc.clone(), |ins| {
-                        drop(ins.left);
-                        // SAFETY: Pushing a new root node doesn't invalidate
-                        // handles to existing nodes.
-                        let map = unsafe { self.dormant_map.reborrow() };
-                        let root = map.root.as_mut().unwrap(); // same as ins.left
-                        root.push_internal_level(self.alloc).push(ins.kv.0, ins.kv.1, ins.right)
-                    });
-
-                // Get the pointer to the value
-                let val_ptr = new_handle.into_val_mut();
-
-                // SAFETY: We have consumed self.handle.
-                let map = unsafe { self.dormant_map.awaken() };
-                map.length += 1;
-                val_ptr
+                let map = unsafe { self.dormant_map.reborrow() };
+                let root = map.root.insert(NodeRef::new_leaf(self.alloc.clone()).forget_type());
+                // SAFETY: We *just* created the root as a leaf, and we're
+                // stacking the new handle on the original borrow lifetime.
+                unsafe {
+                    let mut leaf = root.borrow_mut().cast_to_leaf_unchecked();
+                    leaf.push_with_handle(self.key, value)
+                }
             }
+            Some(handle) => handle.insert_recursing(self.key, value, self.alloc.clone(), |ins| {
+                drop(ins.left);
+                // SAFETY: Pushing a new root node doesn't invalidate
+                // handles to existing nodes.
+                let map = unsafe { self.dormant_map.reborrow() };
+                let root = map.root.as_mut().unwrap(); // same as ins.left
+                root.push_internal_level(self.alloc.clone()).push(ins.kv.0, ins.kv.1, ins.right)
+            }),
         };
 
-        // Now that we have finished growing the tree using borrowed references,
-        // dereference the pointer to a part of it, that we picked up along the way.
-        unsafe { &mut *out_ptr }
+        // SAFETY: modifying the length doesn't invalidate handles to existing nodes.
+        unsafe { self.dormant_map.reborrow().length += 1 };
+
+        OccupiedEntry {
+            handle: handle.forget_node_type(),
+            dormant_map: self.dormant_map,
+            alloc: self.alloc,
+            _marker: PhantomData,
+        }
     }
 }
 
diff --git a/library/alloc/src/collections/btree/node.rs b/library/alloc/src/collections/btree/node.rs
index 2a853ef421629..cec9ca04e9d19 100644
--- a/library/alloc/src/collections/btree/node.rs
+++ b/library/alloc/src/collections/btree/node.rs
@@ -739,7 +739,7 @@ impl<BorrowType, K, V> NodeRef<BorrowType, K, V, marker::LeafOrInternal> {
 
 impl<'a, K, V> NodeRef<marker::Mut<'a>, K, V, marker::LeafOrInternal> {
     /// Unsafely asserts to the compiler the static information that this node is a `Leaf`.
-    unsafe fn cast_to_leaf_unchecked(self) -> NodeRef<marker::Mut<'a>, K, V, marker::Leaf> {
+    pub unsafe fn cast_to_leaf_unchecked(self) -> NodeRef<marker::Mut<'a>, K, V, marker::Leaf> {
         debug_assert!(self.height == 0);
         NodeRef { height: self.height, node: self.node, _marker: PhantomData }
     }

From e5f1555000158b796a1e245b7c75b5a969506e53 Mon Sep 17 00:00:00 2001
From: David Tolnay <dtolnay@gmail.com>
Date: Sun, 17 Nov 2024 12:25:19 -0800
Subject: [PATCH 03/38] Inline ExprPrecedence::order into Expr::precedence

---
 compiler/rustc_ast/src/ast.rs                 | 112 ++++++++++-------
 compiler/rustc_ast/src/util/parser.rs         | 115 ------------------
 .../rustc_ast_pretty/src/pprust/state/expr.rs |   4 +-
 .../src/pprust/state/fixup.rs                 |   2 +-
 compiler/rustc_hir/src/hir.rs                 |  81 ++++++------
 compiler/rustc_hir_pretty/src/lib.rs          |   4 +-
 compiler/rustc_hir_typeck/src/callee.rs       |   2 +-
 compiler/rustc_hir_typeck/src/cast.rs         |   2 +-
 .../src/fn_ctxt/suggestions.rs                |  10 +-
 compiler/rustc_parse/src/parser/pat.rs        |  17 +--
 .../clippy/clippy_lints/src/dereference.rs    |  10 +-
 .../src/loops/single_element_loop.rs          |   2 +-
 .../clippy_lints/src/matches/manual_utils.rs  |   2 +-
 .../clippy/clippy_lints/src/neg_multiply.rs   |   2 +-
 .../clippy_lints/src/redundant_slicing.rs     |   2 +-
 .../transmutes_expressible_as_ptr_casts.rs    |   4 +-
 16 files changed, 146 insertions(+), 225 deletions(-)

diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs
index 5f71fb97d768c..013d08f1de02c 100644
--- a/compiler/rustc_ast/src/ast.rs
+++ b/compiler/rustc_ast/src/ast.rs
@@ -39,7 +39,9 @@ pub use crate::format::*;
 use crate::ptr::P;
 use crate::token::{self, CommentKind, Delimiter};
 use crate::tokenstream::{DelimSpan, LazyAttrTokenStream, TokenStream};
-pub use crate::util::parser::ExprPrecedence;
+use crate::util::parser::{
+    AssocOp, PREC_CLOSURE, PREC_JUMP, PREC_PREFIX, PREC_RANGE, PREC_UNAMBIGUOUS,
+};
 
 /// A "Label" is an identifier of some point in sources,
 /// e.g. in the following code:
@@ -1319,53 +1321,71 @@ impl Expr {
         Some(P(Ty { kind, id: self.id, span: self.span, tokens: None }))
     }
 
-    pub fn precedence(&self) -> ExprPrecedence {
+    pub fn precedence(&self) -> i8 {
         match self.kind {
-            ExprKind::Array(_) => ExprPrecedence::Array,
-            ExprKind::ConstBlock(_) => ExprPrecedence::ConstBlock,
-            ExprKind::Call(..) => ExprPrecedence::Call,
-            ExprKind::MethodCall(..) => ExprPrecedence::MethodCall,
-            ExprKind::Tup(_) => ExprPrecedence::Tup,
-            ExprKind::Binary(op, ..) => ExprPrecedence::Binary(op.node),
-            ExprKind::Unary(..) => ExprPrecedence::Unary,
-            ExprKind::Lit(_) | ExprKind::IncludedBytes(..) => ExprPrecedence::Lit,
-            ExprKind::Cast(..) => ExprPrecedence::Cast,
-            ExprKind::Let(..) => ExprPrecedence::Let,
-            ExprKind::If(..) => ExprPrecedence::If,
-            ExprKind::While(..) => ExprPrecedence::While,
-            ExprKind::ForLoop { .. } => ExprPrecedence::ForLoop,
-            ExprKind::Loop(..) => ExprPrecedence::Loop,
-            ExprKind::Match(_, _, MatchKind::Prefix) => ExprPrecedence::Match,
-            ExprKind::Match(_, _, MatchKind::Postfix) => ExprPrecedence::PostfixMatch,
-            ExprKind::Closure(..) => ExprPrecedence::Closure,
-            ExprKind::Block(..) => ExprPrecedence::Block,
-            ExprKind::TryBlock(..) => ExprPrecedence::TryBlock,
-            ExprKind::Gen(..) => ExprPrecedence::Gen,
-            ExprKind::Await(..) => ExprPrecedence::Await,
-            ExprKind::Assign(..) => ExprPrecedence::Assign,
-            ExprKind::AssignOp(..) => ExprPrecedence::AssignOp,
-            ExprKind::Field(..) => ExprPrecedence::Field,
-            ExprKind::Index(..) => ExprPrecedence::Index,
-            ExprKind::Range(..) => ExprPrecedence::Range,
-            ExprKind::Underscore => ExprPrecedence::Path,
-            ExprKind::Path(..) => ExprPrecedence::Path,
-            ExprKind::AddrOf(..) => ExprPrecedence::AddrOf,
-            ExprKind::Break(..) => ExprPrecedence::Break,
-            ExprKind::Continue(..) => ExprPrecedence::Continue,
-            ExprKind::Ret(..) => ExprPrecedence::Ret,
-            ExprKind::Struct(..) => ExprPrecedence::Struct,
-            ExprKind::Repeat(..) => ExprPrecedence::Repeat,
-            ExprKind::Paren(..) => ExprPrecedence::Paren,
-            ExprKind::Try(..) => ExprPrecedence::Try,
-            ExprKind::Yield(..) => ExprPrecedence::Yield,
-            ExprKind::Yeet(..) => ExprPrecedence::Yeet,
-            ExprKind::Become(..) => ExprPrecedence::Become,
-            ExprKind::InlineAsm(..)
-            | ExprKind::Type(..)
-            | ExprKind::OffsetOf(..)
+            ExprKind::Closure(..) => PREC_CLOSURE,
+
+            ExprKind::Break(..)
+            | ExprKind::Continue(..)
+            | ExprKind::Ret(..)
+            | ExprKind::Yield(..)
+            | ExprKind::Yeet(..)
+            | ExprKind::Become(..) => PREC_JUMP,
+
+            // `Range` claims to have higher precedence than `Assign`, but `x .. x = x` fails to
+            // parse, instead of parsing as `(x .. x) = x`. Giving `Range` a lower precedence
+            // ensures that `pprust` will add parentheses in the right places to get the desired
+            // parse.
+            ExprKind::Range(..) => PREC_RANGE,
+
+            // Binop-like expr kinds, handled by `AssocOp`.
+            ExprKind::Binary(op, ..) => AssocOp::from_ast_binop(op.node).precedence() as i8,
+            ExprKind::Cast(..) => AssocOp::As.precedence() as i8,
+
+            ExprKind::Assign(..) |
+            ExprKind::AssignOp(..) => AssocOp::Assign.precedence() as i8,
+
+            // Unary, prefix
+            ExprKind::AddrOf(..)
+            // Here `let pats = expr` has `let pats =` as a "unary" prefix of `expr`.
+            // However, this is not exactly right. When `let _ = a` is the LHS of a binop we
+            // need parens sometimes. E.g. we can print `(let _ = a) && b` as `let _ = a && b`
+            // but we need to print `(let _ = a) < b` as-is with parens.
+            | ExprKind::Let(..)
+            | ExprKind::Unary(..) => PREC_PREFIX,
+
+            // Never need parens
+            ExprKind::Array(_)
+            | ExprKind::Await(..)
+            | ExprKind::Block(..)
+            | ExprKind::Call(..)
+            | ExprKind::ConstBlock(_)
+            | ExprKind::Field(..)
+            | ExprKind::ForLoop { .. }
             | ExprKind::FormatArgs(..)
-            | ExprKind::MacCall(..) => ExprPrecedence::Mac,
-            ExprKind::Err(_) | ExprKind::Dummy => ExprPrecedence::Err,
+            | ExprKind::Gen(..)
+            | ExprKind::If(..)
+            | ExprKind::IncludedBytes(..)
+            | ExprKind::Index(..)
+            | ExprKind::InlineAsm(..)
+            | ExprKind::Lit(_)
+            | ExprKind::Loop(..)
+            | ExprKind::MacCall(..)
+            | ExprKind::Match(..)
+            | ExprKind::MethodCall(..)
+            | ExprKind::OffsetOf(..)
+            | ExprKind::Paren(..)
+            | ExprKind::Path(..)
+            | ExprKind::Repeat(..)
+            | ExprKind::Struct(..)
+            | ExprKind::Try(..)
+            | ExprKind::TryBlock(..)
+            | ExprKind::Tup(_)
+            | ExprKind::Type(..)
+            | ExprKind::Underscore
+            | ExprKind::While(..)
+            | ExprKind::Err(_)
+            | ExprKind::Dummy => PREC_UNAMBIGUOUS,
         }
     }
 
diff --git a/compiler/rustc_ast/src/util/parser.rs b/compiler/rustc_ast/src/util/parser.rs
index d8dad4550c0c5..ed9265d51598a 100644
--- a/compiler/rustc_ast/src/util/parser.rs
+++ b/compiler/rustc_ast/src/util/parser.rs
@@ -237,121 +237,6 @@ pub const PREC_PREFIX: i8 = 50;
 pub const PREC_UNAMBIGUOUS: i8 = 60;
 pub const PREC_FORCE_PAREN: i8 = 100;
 
-#[derive(Debug, Clone, Copy)]
-pub enum ExprPrecedence {
-    Closure,
-    Break,
-    Continue,
-    Ret,
-    Yield,
-    Yeet,
-    Become,
-
-    Range,
-
-    Binary(BinOpKind),
-
-    Cast,
-
-    Assign,
-    AssignOp,
-
-    AddrOf,
-    Let,
-    Unary,
-
-    Call,
-    MethodCall,
-    Field,
-    Index,
-    Try,
-    Mac,
-
-    Array,
-    Repeat,
-    Tup,
-    Lit,
-    Path,
-    Paren,
-    If,
-    While,
-    ForLoop,
-    Loop,
-    Match,
-    PostfixMatch,
-    ConstBlock,
-    Block,
-    TryBlock,
-    Struct,
-    Gen,
-    Await,
-    Err,
-}
-
-impl ExprPrecedence {
-    pub fn order(self) -> i8 {
-        match self {
-            ExprPrecedence::Closure => PREC_CLOSURE,
-
-            ExprPrecedence::Break
-            | ExprPrecedence::Continue
-            | ExprPrecedence::Ret
-            | ExprPrecedence::Yield
-            | ExprPrecedence::Yeet
-            | ExprPrecedence::Become => PREC_JUMP,
-
-            // `Range` claims to have higher precedence than `Assign`, but `x .. x = x` fails to
-            // parse, instead of parsing as `(x .. x) = x`. Giving `Range` a lower precedence
-            // ensures that `pprust` will add parentheses in the right places to get the desired
-            // parse.
-            ExprPrecedence::Range => PREC_RANGE,
-
-            // Binop-like expr kinds, handled by `AssocOp`.
-            ExprPrecedence::Binary(op) => AssocOp::from_ast_binop(op).precedence() as i8,
-            ExprPrecedence::Cast => AssocOp::As.precedence() as i8,
-
-            ExprPrecedence::Assign |
-            ExprPrecedence::AssignOp => AssocOp::Assign.precedence() as i8,
-
-            // Unary, prefix
-            ExprPrecedence::AddrOf
-            // Here `let pats = expr` has `let pats =` as a "unary" prefix of `expr`.
-            // However, this is not exactly right. When `let _ = a` is the LHS of a binop we
-            // need parens sometimes. E.g. we can print `(let _ = a) && b` as `let _ = a && b`
-            // but we need to print `(let _ = a) < b` as-is with parens.
-            | ExprPrecedence::Let
-            | ExprPrecedence::Unary => PREC_PREFIX,
-
-            // Never need parens
-            ExprPrecedence::Array
-            | ExprPrecedence::Await
-            | ExprPrecedence::Block
-            | ExprPrecedence::Call
-            | ExprPrecedence::ConstBlock
-            | ExprPrecedence::Field
-            | ExprPrecedence::ForLoop
-            | ExprPrecedence::Gen
-            | ExprPrecedence::If
-            | ExprPrecedence::Index
-            | ExprPrecedence::Lit
-            | ExprPrecedence::Loop
-            | ExprPrecedence::Mac
-            | ExprPrecedence::Match
-            | ExprPrecedence::MethodCall
-            | ExprPrecedence::Paren
-            | ExprPrecedence::Path
-            | ExprPrecedence::PostfixMatch
-            | ExprPrecedence::Repeat
-            | ExprPrecedence::Struct
-            | ExprPrecedence::Try
-            | ExprPrecedence::TryBlock
-            | ExprPrecedence::Tup
-            | ExprPrecedence::While
-            | ExprPrecedence::Err => PREC_UNAMBIGUOUS,
-        }
-    }
-}
-
 /// In `let p = e`, operators with precedence `<=` this one requires parentheses in `e`.
 pub fn prec_let_scrutinee_needs_par() -> usize {
     AssocOp::LAnd.precedence()
diff --git a/compiler/rustc_ast_pretty/src/pprust/state/expr.rs b/compiler/rustc_ast_pretty/src/pprust/state/expr.rs
index 893bfaf8f712e..04ec135c4289d 100644
--- a/compiler/rustc_ast_pretty/src/pprust/state/expr.rs
+++ b/compiler/rustc_ast_pretty/src/pprust/state/expr.rs
@@ -59,7 +59,7 @@ impl<'a> State<'a> {
     }
 
     fn print_expr_maybe_paren(&mut self, expr: &ast::Expr, prec: i8, fixup: FixupContext) {
-        self.print_expr_cond_paren(expr, expr.precedence().order() < prec, fixup);
+        self.print_expr_cond_paren(expr, expr.precedence() < prec, fixup);
     }
 
     /// Prints an expr using syntax that's acceptable in a condition position, such as the `cond` in
@@ -615,7 +615,7 @@ impl<'a> State<'a> {
                         expr,
                         // Parenthesize if required by precedence, or in the
                         // case of `break 'inner: loop { break 'inner 1 } + 1`
-                        expr.precedence().order() < parser::PREC_JUMP
+                        expr.precedence() < parser::PREC_JUMP
                             || (opt_label.is_none() && classify::leading_labeled_expr(expr)),
                         fixup.subsequent_subexpression(),
                     );
diff --git a/compiler/rustc_ast_pretty/src/pprust/state/fixup.rs b/compiler/rustc_ast_pretty/src/pprust/state/fixup.rs
index 50fd12a4e8b68..6f5382ce61d3b 100644
--- a/compiler/rustc_ast_pretty/src/pprust/state/fixup.rs
+++ b/compiler/rustc_ast_pretty/src/pprust/state/fixup.rs
@@ -191,6 +191,6 @@ impl FixupContext {
     ///     "let chain".
     pub(crate) fn needs_par_as_let_scrutinee(self, expr: &Expr) -> bool {
         self.parenthesize_exterior_struct_lit && parser::contains_exterior_struct_lit(expr)
-            || parser::needs_par_as_let_scrutinee(expr.precedence().order())
+            || parser::needs_par_as_let_scrutinee(expr.precedence())
     }
 }
diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs
index 554097bf11515..2ece9a10e3a04 100644
--- a/compiler/rustc_hir/src/hir.rs
+++ b/compiler/rustc_hir/src/hir.rs
@@ -1,7 +1,7 @@
 use std::fmt;
 
 use rustc_abi::ExternAbi;
-use rustc_ast::util::parser::ExprPrecedence;
+use rustc_ast::util::parser::{AssocOp, PREC_CLOSURE, PREC_JUMP, PREC_PREFIX, PREC_UNAMBIGUOUS};
 use rustc_ast::{
     self as ast, Attribute, FloatTy, InlineAsmOptions, InlineAsmTemplatePiece, IntTy, Label,
     LitKind, TraitObjectSyntax, UintTy,
@@ -1719,41 +1719,54 @@ pub struct Expr<'hir> {
 }
 
 impl Expr<'_> {
-    pub fn precedence(&self) -> ExprPrecedence {
+    pub fn precedence(&self) -> i8 {
         match self.kind {
-            ExprKind::ConstBlock(_) => ExprPrecedence::ConstBlock,
-            ExprKind::Array(_) => ExprPrecedence::Array,
-            ExprKind::Call(..) => ExprPrecedence::Call,
-            ExprKind::MethodCall(..) => ExprPrecedence::MethodCall,
-            ExprKind::Tup(_) => ExprPrecedence::Tup,
-            ExprKind::Binary(op, ..) => ExprPrecedence::Binary(op.node),
-            ExprKind::Unary(..) => ExprPrecedence::Unary,
-            ExprKind::Lit(_) => ExprPrecedence::Lit,
-            ExprKind::Cast(..) => ExprPrecedence::Cast,
+            ExprKind::Closure { .. } => PREC_CLOSURE,
+
+            ExprKind::Break(..)
+            | ExprKind::Continue(..)
+            | ExprKind::Ret(..)
+            | ExprKind::Yield(..)
+            | ExprKind::Become(..) => PREC_JUMP,
+
+            // Binop-like expr kinds, handled by `AssocOp`.
+            ExprKind::Binary(op, ..) => AssocOp::from_ast_binop(op.node).precedence() as i8,
+            ExprKind::Cast(..) => AssocOp::As.precedence() as i8,
+
+            ExprKind::Assign(..) |
+            ExprKind::AssignOp(..) => AssocOp::Assign.precedence() as i8,
+
+            // Unary, prefix
+            ExprKind::AddrOf(..)
+            // Here `let pats = expr` has `let pats =` as a "unary" prefix of `expr`.
+            // However, this is not exactly right. When `let _ = a` is the LHS of a binop we
+            // need parens sometimes. E.g. we can print `(let _ = a) && b` as `let _ = a && b`
+            // but we need to print `(let _ = a) < b` as-is with parens.
+            | ExprKind::Let(..)
+            | ExprKind::Unary(..) => PREC_PREFIX,
+
+            // Never need parens
+            ExprKind::Array(_)
+            | ExprKind::Block(..)
+            | ExprKind::Call(..)
+            | ExprKind::ConstBlock(_)
+            | ExprKind::Field(..)
+            | ExprKind::If(..)
+            | ExprKind::Index(..)
+            | ExprKind::InlineAsm(..)
+            | ExprKind::Lit(_)
+            | ExprKind::Loop(..)
+            | ExprKind::Match(..)
+            | ExprKind::MethodCall(..)
+            | ExprKind::OffsetOf(..)
+            | ExprKind::Path(..)
+            | ExprKind::Repeat(..)
+            | ExprKind::Struct(..)
+            | ExprKind::Tup(_)
+            | ExprKind::Type(..)
+            | ExprKind::Err(_) => PREC_UNAMBIGUOUS,
+
             ExprKind::DropTemps(ref expr, ..) => expr.precedence(),
-            ExprKind::If(..) => ExprPrecedence::If,
-            ExprKind::Let(..) => ExprPrecedence::Let,
-            ExprKind::Loop(..) => ExprPrecedence::Loop,
-            ExprKind::Match(..) => ExprPrecedence::Match,
-            ExprKind::Closure { .. } => ExprPrecedence::Closure,
-            ExprKind::Block(..) => ExprPrecedence::Block,
-            ExprKind::Assign(..) => ExprPrecedence::Assign,
-            ExprKind::AssignOp(..) => ExprPrecedence::AssignOp,
-            ExprKind::Field(..) => ExprPrecedence::Field,
-            ExprKind::Index(..) => ExprPrecedence::Index,
-            ExprKind::Path(..) => ExprPrecedence::Path,
-            ExprKind::AddrOf(..) => ExprPrecedence::AddrOf,
-            ExprKind::Break(..) => ExprPrecedence::Break,
-            ExprKind::Continue(..) => ExprPrecedence::Continue,
-            ExprKind::Ret(..) => ExprPrecedence::Ret,
-            ExprKind::Become(..) => ExprPrecedence::Become,
-            ExprKind::Struct(..) => ExprPrecedence::Struct,
-            ExprKind::Repeat(..) => ExprPrecedence::Repeat,
-            ExprKind::Yield(..) => ExprPrecedence::Yield,
-            ExprKind::Type(..) | ExprKind::InlineAsm(..) | ExprKind::OffsetOf(..) => {
-                ExprPrecedence::Mac
-            }
-            ExprKind::Err(_) => ExprPrecedence::Err,
         }
     }
 
diff --git a/compiler/rustc_hir_pretty/src/lib.rs b/compiler/rustc_hir_pretty/src/lib.rs
index 0a3aa8fec9005..f4c20e34eda34 100644
--- a/compiler/rustc_hir_pretty/src/lib.rs
+++ b/compiler/rustc_hir_pretty/src/lib.rs
@@ -1015,7 +1015,7 @@ impl<'a> State<'a> {
     }
 
     fn print_expr_maybe_paren(&mut self, expr: &hir::Expr<'_>, prec: i8) {
-        self.print_expr_cond_paren(expr, expr.precedence().order() < prec)
+        self.print_expr_cond_paren(expr, expr.precedence() < prec)
     }
 
     /// Prints an expr using syntax that's acceptable in a condition position, such as the `cond` in
@@ -1049,7 +1049,7 @@ impl<'a> State<'a> {
         }
         self.space();
         self.word_space("=");
-        let npals = || parser::needs_par_as_let_scrutinee(init.precedence().order());
+        let npals = || parser::needs_par_as_let_scrutinee(init.precedence());
         self.print_expr_cond_paren(init, Self::cond_needs_par(init) || npals())
     }
 
diff --git a/compiler/rustc_hir_typeck/src/callee.rs b/compiler/rustc_hir_typeck/src/callee.rs
index e6e0f62b54d2f..a92482e6a0e39 100644
--- a/compiler/rustc_hir_typeck/src/callee.rs
+++ b/compiler/rustc_hir_typeck/src/callee.rs
@@ -606,7 +606,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
             };
 
             if let Ok(rest_snippet) = rest_snippet {
-                let sugg = if callee_expr.precedence().order() >= PREC_UNAMBIGUOUS {
+                let sugg = if callee_expr.precedence() >= PREC_UNAMBIGUOUS {
                     vec![
                         (up_to_rcvr_span, "".to_string()),
                         (rest_span, format!(".{}({rest_snippet}", segment.ident)),
diff --git a/compiler/rustc_hir_typeck/src/cast.rs b/compiler/rustc_hir_typeck/src/cast.rs
index 483a8d1d9a9dc..0c3f21d540dcd 100644
--- a/compiler/rustc_hir_typeck/src/cast.rs
+++ b/compiler/rustc_hir_typeck/src/cast.rs
@@ -1107,7 +1107,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
     }
 
     fn lossy_provenance_ptr2int_lint(&self, fcx: &FnCtxt<'a, 'tcx>, t_c: ty::cast::IntTy) {
-        let expr_prec = self.expr.precedence().order();
+        let expr_prec = self.expr.precedence();
         let needs_parens = expr_prec < rustc_ast::util::parser::PREC_UNAMBIGUOUS;
 
         let needs_cast = !matches!(t_c, ty::cast::IntTy::U(ty::UintTy::Usize));
diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs
index 919e83724d70a..f7355d11811c2 100644
--- a/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs
+++ b/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs
@@ -2,7 +2,7 @@ use core::cmp::min;
 use core::iter;
 
 use hir::def_id::LocalDefId;
-use rustc_ast::util::parser::{ExprPrecedence, PREC_UNAMBIGUOUS};
+use rustc_ast::util::parser::PREC_UNAMBIGUOUS;
 use rustc_data_structures::packed::Pu128;
 use rustc_errors::{Applicability, Diag, MultiSpan};
 use rustc_hir as hir;
@@ -398,7 +398,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                     // so we remove the user's `clone` call.
                     {
                         vec![(receiver_method.ident.span, conversion_method.name.to_string())]
-                    } else if expr.precedence().order() < ExprPrecedence::MethodCall.order() {
+                    } else if expr.precedence() < PREC_UNAMBIGUOUS {
                         vec![
                             (expr.span.shrink_to_lo(), "(".to_string()),
                             (expr.span.shrink_to_hi(), format!(").{}()", conversion_method.name)),
@@ -1376,7 +1376,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
         {
             let span = expr.span.find_oldest_ancestor_in_same_ctxt();
 
-            let mut sugg = if expr.precedence().order() >= PREC_UNAMBIGUOUS {
+            let mut sugg = if expr.precedence() >= PREC_UNAMBIGUOUS {
                 vec![(span.shrink_to_hi(), ".into()".to_owned())]
             } else {
                 vec![
@@ -2985,7 +2985,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
             "change the type of the numeric literal from `{checked_ty}` to `{expected_ty}`",
         );
 
-        let close_paren = if expr.precedence().order() < PREC_UNAMBIGUOUS {
+        let close_paren = if expr.precedence() < PREC_UNAMBIGUOUS {
             sugg.push((expr.span.shrink_to_lo(), "(".to_string()));
             ")"
         } else {
@@ -3010,7 +3010,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                 let len = src.trim_end_matches(&checked_ty.to_string()).len();
                 expr.span.with_lo(expr.span.lo() + BytePos(len as u32))
             },
-            if expr.precedence().order() < PREC_UNAMBIGUOUS {
+            if expr.precedence() < PREC_UNAMBIGUOUS {
                 // Readd `)`
                 format!("{expected_ty})")
             } else {
diff --git a/compiler/rustc_parse/src/parser/pat.rs b/compiler/rustc_parse/src/parser/pat.rs
index 3546e5b0f0495..007ea1c1f8fb2 100644
--- a/compiler/rustc_parse/src/parser/pat.rs
+++ b/compiler/rustc_parse/src/parser/pat.rs
@@ -1,11 +1,12 @@
 use rustc_ast::mut_visit::{self, MutVisitor};
 use rustc_ast::ptr::P;
 use rustc_ast::token::{self, BinOpToken, Delimiter, IdentIsRaw, Token};
+use rustc_ast::util::parser::AssocOp;
 use rustc_ast::visit::{self, Visitor};
 use rustc_ast::{
-    self as ast, Arm, AttrVec, BinOpKind, BindingMode, ByRef, Expr, ExprKind, ExprPrecedence,
-    LocalKind, MacCall, Mutability, Pat, PatField, PatFieldsRest, PatKind, Path, QSelf, RangeEnd,
-    RangeSyntax, Stmt, StmtKind,
+    self as ast, Arm, AttrVec, BinOpKind, BindingMode, ByRef, Expr, ExprKind, LocalKind, MacCall,
+    Mutability, Pat, PatField, PatFieldsRest, PatKind, Path, QSelf, RangeEnd, RangeSyntax, Stmt,
+    StmtKind,
 };
 use rustc_ast_pretty::pprust;
 use rustc_errors::{Applicability, Diag, DiagArgValue, PResult, StashKey};
@@ -458,7 +459,7 @@ impl<'a> Parser<'a> {
                 .create_err(UnexpectedExpressionInPattern {
                     span,
                     is_bound,
-                    expr_precedence: expr.precedence().order(),
+                    expr_precedence: expr.precedence(),
                 })
                 .stash(span, StashKey::ExprInPat)
                 .unwrap(),
@@ -545,7 +546,8 @@ impl<'a> Parser<'a> {
                             let expr = match &err.args["expr_precedence"] {
                                 DiagArgValue::Number(expr_precedence) => {
                                     if *expr_precedence
-                                        <= ExprPrecedence::Binary(BinOpKind::Eq).order() as i32
+                                        <= AssocOp::from_ast_binop(BinOpKind::Eq).precedence()
+                                            as i32
                                     {
                                         format!("({expr})")
                                     } else {
@@ -568,8 +570,9 @@ impl<'a> Parser<'a> {
                                 }
                                 Some(guard) => {
                                     // Are parentheses required around the old guard?
-                                    let wrap_guard = guard.precedence().order()
-                                        <= ExprPrecedence::Binary(BinOpKind::And).order();
+                                    let wrap_guard = guard.precedence()
+                                        <= AssocOp::from_ast_binop(BinOpKind::And).precedence()
+                                            as i8;
 
                                     err.subdiagnostic(
                                         UnexpectedExpressionInPatternSugg::UpdateGuard {
diff --git a/src/tools/clippy/clippy_lints/src/dereference.rs b/src/tools/clippy/clippy_lints/src/dereference.rs
index b167d7f22087b..834606094ae0f 100644
--- a/src/tools/clippy/clippy_lints/src/dereference.rs
+++ b/src/tools/clippy/clippy_lints/src/dereference.rs
@@ -959,7 +959,7 @@ fn report<'tcx>(
             // expr_str (the suggestion) is never shown if is_final_ufcs is true, since it's
             // `expr.kind == ExprKind::Call`. Therefore, this is, afaik, always unnecessary.
             /*
-            expr_str = if !expr_is_macro_call && is_final_ufcs && expr.precedence().order() < PREC_PREFIX {
+            expr_str = if !expr_is_macro_call && is_final_ufcs && expr.precedence() < PREC_PREFIX {
                 Cow::Owned(format!("({expr_str})"))
             } else {
                 expr_str
@@ -999,7 +999,7 @@ fn report<'tcx>(
                         Node::Expr(e) => match e.kind {
                             ExprKind::Call(callee, _) if callee.hir_id != data.first_expr.hir_id => (0, false),
                             ExprKind::Call(..) => (PREC_UNAMBIGUOUS, matches!(expr.kind, ExprKind::Field(..))),
-                            _ => (e.precedence().order(), false),
+                            _ => (e.precedence(), false),
                         },
                         _ => (0, false),
                     };
@@ -1012,7 +1012,7 @@ fn report<'tcx>(
                     );
 
                     let sugg = if !snip_is_macro
-                        && (calls_field || expr.precedence().order() < precedence)
+                        && (calls_field || expr.precedence() < precedence)
                         && !has_enclosing_paren(&snip)
                         && !is_in_tuple
                     {
@@ -1067,7 +1067,7 @@ fn report<'tcx>(
                     let (snip, snip_is_macro) =
                         snippet_with_context(cx, expr.span, data.first_expr.span.ctxt(), "..", &mut app);
                     let sugg =
-                        if !snip_is_macro && expr.precedence().order() < precedence && !has_enclosing_paren(&snip) {
+                        if !snip_is_macro && expr.precedence() < precedence && !has_enclosing_paren(&snip) {
                             format!("{prefix}({snip})")
                         } else {
                             format!("{prefix}{snip}")
@@ -1154,7 +1154,7 @@ impl<'tcx> Dereferencing<'tcx> {
                         },
                         Some(parent) if !parent.span.from_expansion() => {
                             // Double reference might be needed at this point.
-                            if parent.precedence().order() == PREC_UNAMBIGUOUS {
+                            if parent.precedence() == PREC_UNAMBIGUOUS {
                                 // Parentheses would be needed here, don't lint.
                                 *outer_pat = None;
                             } else {
diff --git a/src/tools/clippy/clippy_lints/src/loops/single_element_loop.rs b/src/tools/clippy/clippy_lints/src/loops/single_element_loop.rs
index 70f76ced09a43..35dc8e9aa4e24 100644
--- a/src/tools/clippy/clippy_lints/src/loops/single_element_loop.rs
+++ b/src/tools/clippy/clippy_lints/src/loops/single_element_loop.rs
@@ -84,7 +84,7 @@ pub(super) fn check<'tcx>(
         if !prefix.is_empty()
             && (
                 // Precedence of internal expression is less than or equal to precedence of `&expr`.
-                arg_expression.precedence().order() <= PREC_PREFIX || is_range_literal(arg_expression)
+                arg_expression.precedence() <= PREC_PREFIX || is_range_literal(arg_expression)
             )
         {
             arg_snip = format!("({arg_snip})").into();
diff --git a/src/tools/clippy/clippy_lints/src/matches/manual_utils.rs b/src/tools/clippy/clippy_lints/src/matches/manual_utils.rs
index d38560998a5a7..9c6df4d8ac0d9 100644
--- a/src/tools/clippy/clippy_lints/src/matches/manual_utils.rs
+++ b/src/tools/clippy/clippy_lints/src/matches/manual_utils.rs
@@ -117,7 +117,7 @@ where
     // it's being passed by value.
     let scrutinee = peel_hir_expr_refs(scrutinee).0;
     let (scrutinee_str, _) = snippet_with_context(cx, scrutinee.span, expr_ctxt, "..", &mut app);
-    let scrutinee_str = if scrutinee.span.eq_ctxt(expr.span) && scrutinee.precedence().order() < PREC_UNAMBIGUOUS {
+    let scrutinee_str = if scrutinee.span.eq_ctxt(expr.span) && scrutinee.precedence() < PREC_UNAMBIGUOUS {
         format!("({scrutinee_str})")
     } else {
         scrutinee_str.into()
diff --git a/src/tools/clippy/clippy_lints/src/neg_multiply.rs b/src/tools/clippy/clippy_lints/src/neg_multiply.rs
index f84d9fadb85c5..a0ba2aaf55236 100644
--- a/src/tools/clippy/clippy_lints/src/neg_multiply.rs
+++ b/src/tools/clippy/clippy_lints/src/neg_multiply.rs
@@ -58,7 +58,7 @@ fn check_mul(cx: &LateContext<'_>, span: Span, lit: &Expr<'_>, exp: &Expr<'_>) {
     {
         let mut applicability = Applicability::MachineApplicable;
         let (snip, from_macro) = snippet_with_context(cx, exp.span, span.ctxt(), "..", &mut applicability);
-        let suggestion = if !from_macro && exp.precedence().order() < PREC_PREFIX && !has_enclosing_paren(&snip) {
+        let suggestion = if !from_macro && exp.precedence() < PREC_PREFIX && !has_enclosing_paren(&snip) {
             format!("-({snip})")
         } else {
             format!("-{snip}")
diff --git a/src/tools/clippy/clippy_lints/src/redundant_slicing.rs b/src/tools/clippy/clippy_lints/src/redundant_slicing.rs
index dc66fb28fa8c2..159404e130d6e 100644
--- a/src/tools/clippy/clippy_lints/src/redundant_slicing.rs
+++ b/src/tools/clippy/clippy_lints/src/redundant_slicing.rs
@@ -85,7 +85,7 @@ impl<'tcx> LateLintPass<'tcx> for RedundantSlicing {
             let (expr_ty, expr_ref_count) = peel_middle_ty_refs(cx.typeck_results().expr_ty(expr));
             let (indexed_ty, indexed_ref_count) = peel_middle_ty_refs(cx.typeck_results().expr_ty(indexed));
             let parent_expr = get_parent_expr(cx, expr);
-            let needs_parens_for_prefix = parent_expr.is_some_and(|parent| parent.precedence().order() > PREC_PREFIX);
+            let needs_parens_for_prefix = parent_expr.is_some_and(|parent| parent.precedence() > PREC_PREFIX);
 
             if expr_ty == indexed_ty {
                 if expr_ref_count > indexed_ref_count {
diff --git a/src/tools/clippy/clippy_lints/src/transmute/transmutes_expressible_as_ptr_casts.rs b/src/tools/clippy/clippy_lints/src/transmute/transmutes_expressible_as_ptr_casts.rs
index fca332dba401a..cad15b1e9826d 100644
--- a/src/tools/clippy/clippy_lints/src/transmute/transmutes_expressible_as_ptr_casts.rs
+++ b/src/tools/clippy/clippy_lints/src/transmute/transmutes_expressible_as_ptr_casts.rs
@@ -1,7 +1,7 @@
 use super::TRANSMUTES_EXPRESSIBLE_AS_PTR_CASTS;
 use clippy_utils::diagnostics::span_lint_and_sugg;
 use clippy_utils::sugg::Sugg;
-use rustc_ast::ExprPrecedence;
+use rustc_ast::util::parser::AssocOp;
 use rustc_errors::Applicability;
 use rustc_hir::{Expr, Node};
 use rustc_hir_typeck::cast::check_cast;
@@ -44,7 +44,7 @@ pub(super) fn check<'tcx>(
     };
 
     if let Node::Expr(parent) = cx.tcx.parent_hir_node(e.hir_id)
-        && parent.precedence().order() > ExprPrecedence::Cast.order()
+        && parent.precedence() > AssocOp::As.precedence() as i8
     {
         sugg = format!("({sugg})");
     }

From 91486607e3f89180f33c4b613a955eb293400571 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9my=20Rakic?= <remy.rakic+github@gmail.com>
Date: Thu, 21 Nov 2024 16:54:18 +0000
Subject: [PATCH 04/38] add convoluted test for issue 132920

---
 .../minibevy.rs                               |  2 +
 .../minirapier.rs                             |  1 +
 .../repro.rs                                  | 14 ++++++
 .../rmake.rs                                  | 45 +++++++++++++++++++
 4 files changed, 62 insertions(+)
 create mode 100644 tests/run-make/diagnostics-traits-from-duplicate-crates/minibevy.rs
 create mode 100644 tests/run-make/diagnostics-traits-from-duplicate-crates/minirapier.rs
 create mode 100644 tests/run-make/diagnostics-traits-from-duplicate-crates/repro.rs
 create mode 100644 tests/run-make/diagnostics-traits-from-duplicate-crates/rmake.rs

diff --git a/tests/run-make/diagnostics-traits-from-duplicate-crates/minibevy.rs b/tests/run-make/diagnostics-traits-from-duplicate-crates/minibevy.rs
new file mode 100644
index 0000000000000..1bc8473e08e32
--- /dev/null
+++ b/tests/run-make/diagnostics-traits-from-duplicate-crates/minibevy.rs
@@ -0,0 +1,2 @@
+pub trait Resource {}
+pub struct Ray2d;
diff --git a/tests/run-make/diagnostics-traits-from-duplicate-crates/minirapier.rs b/tests/run-make/diagnostics-traits-from-duplicate-crates/minirapier.rs
new file mode 100644
index 0000000000000..2b84332aa517c
--- /dev/null
+++ b/tests/run-make/diagnostics-traits-from-duplicate-crates/minirapier.rs
@@ -0,0 +1 @@
+pub type Ray = minibevy::Ray2d;
diff --git a/tests/run-make/diagnostics-traits-from-duplicate-crates/repro.rs b/tests/run-make/diagnostics-traits-from-duplicate-crates/repro.rs
new file mode 100644
index 0000000000000..90a6dfc2e15f8
--- /dev/null
+++ b/tests/run-make/diagnostics-traits-from-duplicate-crates/repro.rs
@@ -0,0 +1,14 @@
+extern crate minibevy;
+extern crate minirapier;
+
+use minibevy::Resource;
+use minirapier::Ray;
+
+fn insert_resource<R: Resource>(_resource: R) {}
+
+struct Res;
+impl Resource for Res {}
+
+fn main() {
+    insert_resource(Res.into());
+}
diff --git a/tests/run-make/diagnostics-traits-from-duplicate-crates/rmake.rs b/tests/run-make/diagnostics-traits-from-duplicate-crates/rmake.rs
new file mode 100644
index 0000000000000..32c4cf3389647
--- /dev/null
+++ b/tests/run-make/diagnostics-traits-from-duplicate-crates/rmake.rs
@@ -0,0 +1,45 @@
+// Non-regression test for issue #132920 where multiple versions of the same crate are present in
+// the dependency graph, and an unexpected error in a dependent crate caused an ICE in the
+// unsatisfied bounds diagnostics for traits present in multiple crate versions.
+//
+// Setup:
+// - two versions of the same crate: minibevy_a and minibevy_b
+// - minirapier: depends on minibevy_a
+// - repro: depends on minirapier and minibevy_b
+
+use run_make_support::rustc;
+
+fn main() {
+    // Prepare dependencies, mimicking a check build with cargo.
+    rustc()
+        .input("minibevy.rs")
+        .crate_name("minibevy")
+        .crate_type("lib")
+        .emit("metadata")
+        .metadata("a")
+        .extra_filename("-a")
+        .run();
+    rustc()
+        .input("minibevy.rs")
+        .crate_name("minibevy")
+        .crate_type("lib")
+        .emit("metadata")
+        .metadata("b")
+        .extra_filename("-b")
+        .run();
+    rustc()
+        .input("minirapier.rs")
+        .crate_name("minirapier")
+        .crate_type("lib")
+        .emit("metadata")
+        .extern_("minibevy", "libminibevy-a.rmeta")
+        .run();
+
+    // Building the main crate used to ICE here when printing the `type annotations needed` error.
+    rustc()
+        .input("repro.rs")
+        .extern_("minibevy", "libminibevy-b.rmeta")
+        .extern_("minirapier", "libminirapier.rmeta")
+        .run_fail()
+        .assert_stderr_not_contains("error: the compiler unexpectedly panicked. this is a bug");
+}

From 764e3e264f69d8af9fa42d86ea36702584dcb36b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9my=20Rakic?= <remy.rakic+github@gmail.com>
Date: Thu, 21 Nov 2024 16:59:40 +0000
Subject: [PATCH 05/38] Revert "Remove less relevant info from diagnostic"

This reverts commit 8a568d9f15453cbfe5d6f45fa5f5bb32e58b93ed.
---
 .../traits/fulfillment_errors.rs              | 18 --------
 tests/run-make/crate-loading/rmake.rs         | 46 +++++++++++--------
 2 files changed, 26 insertions(+), 38 deletions(-)

diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs
index 4e7d7b79ff4de..a80f42d38f6d9 100644
--- a/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs
+++ b/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs
@@ -1804,24 +1804,6 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
                 StringPart::highlighted("cargo tree".to_string()),
                 StringPart::normal("` to explore your dependency tree".to_string()),
             ]);
-
-            // FIXME: this is a giant hack for the benefit of this specific diagnostic. Because
-            // we're so nested in method calls before the error gets emitted, bubbling a single bit
-            // flag informing the top level caller to stop adding extra detail to the diagnostic,
-            // would actually be harder to follow. So we do something naughty here: we consume the
-            // diagnostic, emit it and leave in its place a "delayed bug" that will continue being
-            // modified but won't actually be printed to end users. This *is not ideal*, but allows
-            // us to reduce the verbosity of an error that is already quite verbose and increase its
-            // specificity. Below we modify the main message as well, in a way that *could* break if
-            // the implementation of Diagnostics change significantly, but that would be caught with
-            // a make test failure when this diagnostic is tested.
-            err.primary_message(format!(
-                "{} because the trait comes from a different crate version",
-                err.messages[0].0.as_str().unwrap(),
-            ));
-            let diag = err.clone();
-            err.downgrade_to_delayed_bug();
-            self.tcx.dcx().emit_diagnostic(diag);
             return true;
         }
 
diff --git a/tests/run-make/crate-loading/rmake.rs b/tests/run-make/crate-loading/rmake.rs
index 2d5913c4bcb09..544bf9ab957a4 100644
--- a/tests/run-make/crate-loading/rmake.rs
+++ b/tests/run-make/crate-loading/rmake.rs
@@ -18,31 +18,37 @@ fn main() {
         .extern_("dependency", rust_lib_name("dependency"))
         .extern_("dep_2_reexport", rust_lib_name("foo"))
         .run_fail()
-        .assert_stderr_contains(r#"error[E0277]: the trait bound `dep_2_reexport::Type: Trait` is not satisfied because the trait comes from a different crate version
- --> multiple-dep-versions.rs:7:18
-  |
-7 |     do_something(Type);
-  |                  ^^^^ the trait `Trait` is not implemented for `dep_2_reexport::Type`
-  |
+        .assert_stderr_contains(r#"error[E0277]: the trait bound `dep_2_reexport::Type: Trait` is not satisfied
+  --> multiple-dep-versions.rs:7:18
+   |
+7  |     do_something(Type);
+   |     ------------ ^^^^ the trait `Trait` is not implemented for `dep_2_reexport::Type`
+   |     |
+   |     required by a bound introduced by this call
+   |
 note: there are multiple different versions of crate `dependency` in the dependency graph"#)
         .assert_stderr_contains(r#"
-3 | pub struct Type(pub i32);
-  | --------------- this type implements the required trait
-4 | pub trait Trait {
-  | ^^^^^^^^^^^^^^^ this is the required trait
+3  | pub struct Type(pub i32);
+   | --------------- this type implements the required trait
+4  | pub trait Trait {
+   | ^^^^^^^^^^^^^^^ this is the required trait
 "#)
         .assert_stderr_contains(r#"
-1 | extern crate dep_2_reexport;
-  | ---------------------------- one version of crate `dependency` is used here, as a dependency of crate `foo`
-2 | extern crate dependency;
-  | ------------------------ one version of crate `dependency` is used here, as a direct dependency of the current crate"#)
+1  | extern crate dep_2_reexport;
+   | ---------------------------- one version of crate `dependency` is used here, as a dependency of crate `foo`
+2  | extern crate dependency;
+   | ------------------------ one version of crate `dependency` is used here, as a direct dependency of the current crate"#)
         .assert_stderr_contains(r#"
-3 | pub struct Type;
-  | --------------- this type doesn't implement the required trait
-4 | pub trait Trait {
-  | --------------- this is the found trait
-  = note: two types coming from two different versions of the same crate are different types even if they look the same
-  = help: you can use `cargo tree` to explore your dependency tree"#)
+3  | pub struct Type;
+   | --------------- this type doesn't implement the required trait
+4  | pub trait Trait {
+   | --------------- this is the found trait
+   = note: two types coming from two different versions of the same crate are different types even if they look the same
+   = help: you can use `cargo tree` to explore your dependency tree"#)
+        .assert_stderr_contains(r#"note: required by a bound in `do_something`"#)
+        .assert_stderr_contains(r#"
+12 | pub fn do_something<X: Trait>(_: X) {}
+   |                        ^^^^^ required by this bound in `do_something`"#)
         .assert_stderr_contains(r#"error[E0599]: no method named `foo` found for struct `dep_2_reexport::Type` in the current scope
  --> multiple-dep-versions.rs:8:10
   |

From ae9ac0e383b8054ccded79ce26e48a14b485cb3c Mon Sep 17 00:00:00 2001
From: Nicholas Nethercote <n.nethercote@gmail.com>
Date: Fri, 22 Nov 2024 14:39:29 +1100
Subject: [PATCH 06/38] Remove the `DefinitelyInitializedPlaces` analysis.

Its only use is in the `tests/ui/mir-dataflow/def_inits-1.rs` where it
is tested via `rustc_peek_definite_init`.

Also, it's probably buggy. It's supposed to be the inverse of
`MaybeUninitializedPlaces`, and it mostly is, except that
`apply_terminator_effect` is a little different, and
`apply_switch_int_edge_effects` is missing. Unlike
`MaybeUninitializedPlaces`, which is used extensively in borrow
checking, any bugs in `DefinitelyInitializedPlaces` are easy to overlook
because it is only used in one small test.

This commit removes the analysis. It also removes
`rustc_peek_definite_init`, `Dual` and `MeetSemiLattice`, all of which
are no longer needed.
---
 .../rustc_mir_dataflow/src/framework/fmt.rs   |  13 --
 .../src/framework/lattice.rs                  | 108 +------------
 .../rustc_mir_dataflow/src/framework/mod.rs   |  10 --
 .../src/impls/initialized.rs                  | 146 ++----------------
 compiler/rustc_mir_dataflow/src/impls/mod.rs  |   3 +-
 compiler/rustc_mir_dataflow/src/rustc_peek.rs |  11 +-
 compiler/rustc_span/src/symbol.rs             |   1 -
 tests/ui/mir-dataflow/def-inits-1.rs          |  51 ------
 tests/ui/mir-dataflow/def-inits-1.stderr      |  28 ----
 9 files changed, 13 insertions(+), 358 deletions(-)
 delete mode 100644 tests/ui/mir-dataflow/def-inits-1.rs
 delete mode 100644 tests/ui/mir-dataflow/def-inits-1.stderr

diff --git a/compiler/rustc_mir_dataflow/src/framework/fmt.rs b/compiler/rustc_mir_dataflow/src/framework/fmt.rs
index ed540cd148c45..c177d98106f3e 100644
--- a/compiler/rustc_mir_dataflow/src/framework/fmt.rs
+++ b/compiler/rustc_mir_dataflow/src/framework/fmt.rs
@@ -230,16 +230,3 @@ where
         write!(f, "{}", ctxt.move_data().move_paths[*self])
     }
 }
-
-impl<T, C> DebugWithContext<C> for crate::lattice::Dual<T>
-where
-    T: DebugWithContext<C>,
-{
-    fn fmt_with(&self, ctxt: &C, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        (self.0).fmt_with(ctxt, f)
-    }
-
-    fn fmt_diff_with(&self, old: &Self, ctxt: &C, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        (self.0).fmt_diff_with(&old.0, ctxt, f)
-    }
-}
diff --git a/compiler/rustc_mir_dataflow/src/framework/lattice.rs b/compiler/rustc_mir_dataflow/src/framework/lattice.rs
index 4d03ee53b7c00..6d2a7a099a09e 100644
--- a/compiler/rustc_mir_dataflow/src/framework/lattice.rs
+++ b/compiler/rustc_mir_dataflow/src/framework/lattice.rs
@@ -25,8 +25,8 @@
 //!
 //! ## `PartialOrd`
 //!
-//! Given that they represent partially ordered sets, you may be surprised that [`JoinSemiLattice`]
-//! and [`MeetSemiLattice`] do not have [`PartialOrd`] as a supertrait. This
+//! Given that it represents a partially ordered set, you may be surprised that [`JoinSemiLattice`]
+//! does not have [`PartialOrd`] as a supertrait. This
 //! is because most standard library types use lexicographic ordering instead of set inclusion for
 //! their `PartialOrd` impl. Since we do not actually need to compare lattice elements to run a
 //! dataflow analysis, there's no need for a newtype wrapper with a custom `PartialOrd` impl. The
@@ -58,23 +58,6 @@ pub trait JoinSemiLattice: Eq {
     fn join(&mut self, other: &Self) -> bool;
 }
 
-/// A [partially ordered set][poset] that has a [greatest lower bound][glb] for any pair of
-/// elements in the set.
-///
-/// Dataflow analyses only require that their domains implement [`JoinSemiLattice`], not
-/// `MeetSemiLattice`. However, types that will be used as dataflow domains should implement both
-/// so that they can be used with [`Dual`].
-///
-/// [glb]: https://en.wikipedia.org/wiki/Infimum_and_supremum
-/// [poset]: https://en.wikipedia.org/wiki/Partially_ordered_set
-pub trait MeetSemiLattice: Eq {
-    /// Computes the greatest lower bound of two elements, storing the result in `self` and
-    /// returning `true` if `self` has changed.
-    ///
-    /// The lattice meet operator is abbreviated as `∧`.
-    fn meet(&mut self, other: &Self) -> bool;
-}
-
 /// A set that has a "bottom" element, which is less than or equal to any other element.
 pub trait HasBottom {
     const BOTTOM: Self;
@@ -105,17 +88,6 @@ impl JoinSemiLattice for bool {
     }
 }
 
-impl MeetSemiLattice for bool {
-    fn meet(&mut self, other: &Self) -> bool {
-        if let (true, false) = (*self, *other) {
-            *self = false;
-            return true;
-        }
-
-        false
-    }
-}
-
 impl HasBottom for bool {
     const BOTTOM: Self = false;
 
@@ -145,18 +117,6 @@ impl<I: Idx, T: JoinSemiLattice> JoinSemiLattice for IndexVec<I, T> {
     }
 }
 
-impl<I: Idx, T: MeetSemiLattice> MeetSemiLattice for IndexVec<I, T> {
-    fn meet(&mut self, other: &Self) -> bool {
-        assert_eq!(self.len(), other.len());
-
-        let mut changed = false;
-        for (a, b) in iter::zip(self, other) {
-            changed |= a.meet(b);
-        }
-        changed
-    }
-}
-
 /// A `BitSet` represents the lattice formed by the powerset of all possible values of
 /// the index type `T` ordered by inclusion. Equivalently, it is a tuple of "two-point" lattices,
 /// one for each possible value of `T`.
@@ -166,60 +126,12 @@ impl<T: Idx> JoinSemiLattice for BitSet<T> {
     }
 }
 
-impl<T: Idx> MeetSemiLattice for BitSet<T> {
-    fn meet(&mut self, other: &Self) -> bool {
-        self.intersect(other)
-    }
-}
-
 impl<T: Idx> JoinSemiLattice for ChunkedBitSet<T> {
     fn join(&mut self, other: &Self) -> bool {
         self.union(other)
     }
 }
 
-impl<T: Idx> MeetSemiLattice for ChunkedBitSet<T> {
-    fn meet(&mut self, other: &Self) -> bool {
-        self.intersect(other)
-    }
-}
-
-/// The counterpart of a given semilattice `T` using the [inverse order].
-///
-/// The dual of a join-semilattice is a meet-semilattice and vice versa. For example, the dual of a
-/// powerset has the empty set as its top element and the full set as its bottom element and uses
-/// set *intersection* as its join operator.
-///
-/// [inverse order]: https://en.wikipedia.org/wiki/Duality_(order_theory)
-#[derive(Clone, Copy, Debug, PartialEq, Eq)]
-pub struct Dual<T>(pub T);
-
-impl<T: Idx> BitSetExt<T> for Dual<BitSet<T>> {
-    fn contains(&self, elem: T) -> bool {
-        self.0.contains(elem)
-    }
-
-    fn union(&mut self, other: &HybridBitSet<T>) {
-        self.0.union(other);
-    }
-
-    fn subtract(&mut self, other: &HybridBitSet<T>) {
-        self.0.subtract(other);
-    }
-}
-
-impl<T: MeetSemiLattice> JoinSemiLattice for Dual<T> {
-    fn join(&mut self, other: &Self) -> bool {
-        self.0.meet(&other.0)
-    }
-}
-
-impl<T: JoinSemiLattice> MeetSemiLattice for Dual<T> {
-    fn meet(&mut self, other: &Self) -> bool {
-        self.0.join(&other.0)
-    }
-}
-
 /// Extends a type `T` with top and bottom elements to make it a partially ordered set in which no
 /// value of `T` is comparable with any other.
 ///
@@ -257,22 +169,6 @@ impl<T: Clone + Eq> JoinSemiLattice for FlatSet<T> {
     }
 }
 
-impl<T: Clone + Eq> MeetSemiLattice for FlatSet<T> {
-    fn meet(&mut self, other: &Self) -> bool {
-        let result = match (&*self, other) {
-            (Self::Bottom, _) | (_, Self::Top) => return false,
-            (Self::Elem(ref a), Self::Elem(ref b)) if a == b => return false,
-
-            (Self::Top, Self::Elem(ref x)) => Self::Elem(x.clone()),
-
-            _ => Self::Bottom,
-        };
-
-        *self = result;
-        true
-    }
-}
-
 impl<T> HasBottom for FlatSet<T> {
     const BOTTOM: Self = Self::Bottom;
 
diff --git a/compiler/rustc_mir_dataflow/src/framework/mod.rs b/compiler/rustc_mir_dataflow/src/framework/mod.rs
index 244dfe26ad362..359d9280c52a9 100644
--- a/compiler/rustc_mir_dataflow/src/framework/mod.rs
+++ b/compiler/rustc_mir_dataflow/src/framework/mod.rs
@@ -378,16 +378,6 @@ impl<T, S: GenKill<T>> GenKill<T> for MaybeReachable<S> {
     }
 }
 
-impl<T: Idx> GenKill<T> for lattice::Dual<BitSet<T>> {
-    fn gen_(&mut self, elem: T) {
-        self.0.insert(elem);
-    }
-
-    fn kill(&mut self, elem: T) {
-        self.0.remove(elem);
-    }
-}
-
 // NOTE: DO NOT CHANGE VARIANT ORDER. The derived `Ord` impls rely on the current order.
 #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
 enum Effect {
diff --git a/compiler/rustc_mir_dataflow/src/impls/initialized.rs b/compiler/rustc_mir_dataflow/src/impls/initialized.rs
index 9bb50d1e056bd..2c10d4b1cd352 100644
--- a/compiler/rustc_mir_dataflow/src/impls/initialized.rs
+++ b/compiler/rustc_mir_dataflow/src/impls/initialized.rs
@@ -12,7 +12,7 @@ use crate::framework::SwitchIntEdgeEffects;
 use crate::move_paths::{HasMoveData, InitIndex, InitKind, LookupResult, MoveData, MovePathIndex};
 use crate::{
     Analysis, GenKill, MaybeReachable, drop_flag_effects, drop_flag_effects_for_function_entry,
-    drop_flag_effects_for_location, lattice, on_all_children_bits, on_lookup_result_bits,
+    drop_flag_effects_for_location, on_all_children_bits, on_lookup_result_bits,
 };
 
 /// `MaybeInitializedPlaces` tracks all places that might be
@@ -42,10 +42,10 @@ use crate::{
 /// }
 /// ```
 ///
-/// To determine whether a place *must* be initialized at a
-/// particular control-flow point, one can take the set-difference
-/// between this data and the data from `MaybeUninitializedPlaces` at the
-/// corresponding control-flow point.
+/// To determine whether a place is *definitely* initialized at a
+/// particular control-flow point, one can take the set-complement
+/// of the data from `MaybeUninitializedPlaces` at the corresponding
+/// control-flow point.
 ///
 /// Similarly, at a given `drop` statement, the set-intersection
 /// between this data and `MaybeUninitializedPlaces` yields the set of
@@ -117,10 +117,10 @@ impl<'a, 'tcx> HasMoveData<'tcx> for MaybeInitializedPlaces<'a, 'tcx> {
 /// }
 /// ```
 ///
-/// To determine whether a place *must* be uninitialized at a
-/// particular control-flow point, one can take the set-difference
-/// between this data and the data from `MaybeInitializedPlaces` at the
-/// corresponding control-flow point.
+/// To determine whether a place is *definitely* uninitialized at a
+/// particular control-flow point, one can take the set-complement
+/// of the data from `MaybeInitializedPlaces` at the corresponding
+/// control-flow point.
 ///
 /// Similarly, at a given `drop` statement, the set-intersection
 /// between this data and `MaybeInitializedPlaces` yields the set of
@@ -170,57 +170,6 @@ impl<'tcx> HasMoveData<'tcx> for MaybeUninitializedPlaces<'_, 'tcx> {
     }
 }
 
-/// `DefinitelyInitializedPlaces` tracks all places that are definitely
-/// initialized upon reaching a particular point in the control flow
-/// for a function.
-///
-/// For example, in code like the following, we have corresponding
-/// dataflow information shown in the right-hand comments.
-///
-/// ```rust
-/// struct S;
-/// fn foo(pred: bool) {                        // definite-init:
-///                                             // {          }
-///     let a = S; let mut b = S; let c; let d; // {a, b      }
-///
-///     if pred {
-///         drop(a);                            // {   b,     }
-///         b = S;                              // {   b,     }
-///
-///     } else {
-///         drop(b);                            // {a,        }
-///         d = S;                              // {a,       d}
-///
-///     }                                       // {          }
-///
-///     c = S;                                  // {       c  }
-/// }
-/// ```
-///
-/// To determine whether a place *may* be uninitialized at a
-/// particular control-flow point, one can take the set-complement
-/// of this data.
-///
-/// Similarly, at a given `drop` statement, the set-difference between
-/// this data and `MaybeInitializedPlaces` yields the set of places
-/// that would require a dynamic drop-flag at that statement.
-pub struct DefinitelyInitializedPlaces<'a, 'tcx> {
-    body: &'a Body<'tcx>,
-    move_data: &'a MoveData<'tcx>,
-}
-
-impl<'a, 'tcx> DefinitelyInitializedPlaces<'a, 'tcx> {
-    pub fn new(body: &'a Body<'tcx>, move_data: &'a MoveData<'tcx>) -> Self {
-        DefinitelyInitializedPlaces { body, move_data }
-    }
-}
-
-impl<'a, 'tcx> HasMoveData<'tcx> for DefinitelyInitializedPlaces<'a, 'tcx> {
-    fn move_data(&self) -> &MoveData<'tcx> {
-        self.move_data
-    }
-}
-
 /// `EverInitializedPlaces` tracks all places that might have ever been
 /// initialized upon reaching a particular point in the control flow
 /// for a function, without an intervening `StorageDead`.
@@ -293,19 +242,6 @@ impl<'tcx> MaybeUninitializedPlaces<'_, 'tcx> {
     }
 }
 
-impl<'a, 'tcx> DefinitelyInitializedPlaces<'a, 'tcx> {
-    fn update_bits(
-        trans: &mut <Self as Analysis<'tcx>>::Domain,
-        path: MovePathIndex,
-        state: DropFlagState,
-    ) {
-        match state {
-            DropFlagState::Absent => trans.kill(path),
-            DropFlagState::Present => trans.gen_(path),
-        }
-    }
-}
-
 impl<'tcx> Analysis<'tcx> for MaybeInitializedPlaces<'_, 'tcx> {
     /// There can be many more `MovePathIndex` than there are locals in a MIR body.
     /// We use a chunked bitset to avoid paying too high a memory footprint.
@@ -554,70 +490,6 @@ impl<'tcx> Analysis<'tcx> for MaybeUninitializedPlaces<'_, 'tcx> {
     }
 }
 
-impl<'a, 'tcx> Analysis<'tcx> for DefinitelyInitializedPlaces<'a, 'tcx> {
-    /// Use set intersection as the join operator.
-    type Domain = lattice::Dual<BitSet<MovePathIndex>>;
-
-    const NAME: &'static str = "definite_init";
-
-    fn bottom_value(&self, _: &mir::Body<'tcx>) -> Self::Domain {
-        // bottom = initialized (start_block_effect counters this at outset)
-        lattice::Dual(BitSet::new_filled(self.move_data().move_paths.len()))
-    }
-
-    // sets on_entry bits for Arg places
-    fn initialize_start_block(&self, _: &mir::Body<'tcx>, state: &mut Self::Domain) {
-        state.0.clear();
-
-        drop_flag_effects_for_function_entry(self.body, self.move_data, |path, s| {
-            assert!(s == DropFlagState::Present);
-            state.0.insert(path);
-        });
-    }
-
-    fn apply_statement_effect(
-        &mut self,
-        trans: &mut Self::Domain,
-        _statement: &mir::Statement<'tcx>,
-        location: Location,
-    ) {
-        drop_flag_effects_for_location(self.body, self.move_data, location, |path, s| {
-            Self::update_bits(trans, path, s)
-        })
-    }
-
-    fn apply_terminator_effect<'mir>(
-        &mut self,
-        trans: &mut Self::Domain,
-        terminator: &'mir mir::Terminator<'tcx>,
-        location: Location,
-    ) -> TerminatorEdges<'mir, 'tcx> {
-        drop_flag_effects_for_location(self.body, self.move_data, location, |path, s| {
-            Self::update_bits(trans, path, s)
-        });
-        terminator.edges()
-    }
-
-    fn apply_call_return_effect(
-        &mut self,
-        trans: &mut Self::Domain,
-        _block: mir::BasicBlock,
-        return_places: CallReturnPlaces<'_, 'tcx>,
-    ) {
-        return_places.for_each(|place| {
-            // when a call returns successfully, that means we need to set
-            // the bits for that dest_place to 1 (initialized).
-            on_lookup_result_bits(
-                self.move_data(),
-                self.move_data().rev_lookup.find(place.as_ref()),
-                |mpi| {
-                    trans.gen_(mpi);
-                },
-            );
-        });
-    }
-}
-
 impl<'tcx> Analysis<'tcx> for EverInitializedPlaces<'_, 'tcx> {
     /// There can be many more `InitIndex` than there are locals in a MIR body.
     /// We use a chunked bitset to avoid paying too high a memory footprint.
diff --git a/compiler/rustc_mir_dataflow/src/impls/mod.rs b/compiler/rustc_mir_dataflow/src/impls/mod.rs
index 9b5bfa9bfa00a..57ded63c9baa2 100644
--- a/compiler/rustc_mir_dataflow/src/impls/mod.rs
+++ b/compiler/rustc_mir_dataflow/src/impls/mod.rs
@@ -9,8 +9,7 @@ mod storage_liveness;
 
 pub use self::borrowed_locals::{MaybeBorrowedLocals, borrowed_locals};
 pub use self::initialized::{
-    DefinitelyInitializedPlaces, EverInitializedPlaces, MaybeInitializedPlaces,
-    MaybeUninitializedPlaces,
+    EverInitializedPlaces, MaybeInitializedPlaces, MaybeUninitializedPlaces,
 };
 pub use self::liveness::{
     MaybeLiveLocals, MaybeTransitiveLiveLocals, TransferFunction as LivenessTransferFunction,
diff --git a/compiler/rustc_mir_dataflow/src/rustc_peek.rs b/compiler/rustc_mir_dataflow/src/rustc_peek.rs
index 99d0ccde1052c..34ef8afdde322 100644
--- a/compiler/rustc_mir_dataflow/src/rustc_peek.rs
+++ b/compiler/rustc_mir_dataflow/src/rustc_peek.rs
@@ -12,9 +12,7 @@ use crate::errors::{
     PeekMustBePlaceOrRefPlace, StopAfterDataFlowEndedCompilation,
 };
 use crate::framework::BitSetExt;
-use crate::impls::{
-    DefinitelyInitializedPlaces, MaybeInitializedPlaces, MaybeLiveLocals, MaybeUninitializedPlaces,
-};
+use crate::impls::{MaybeInitializedPlaces, MaybeLiveLocals, MaybeUninitializedPlaces};
 use crate::move_paths::{HasMoveData, LookupResult, MoveData, MovePathIndex};
 use crate::{Analysis, JoinSemiLattice, ResultsCursor};
 
@@ -56,13 +54,6 @@ pub fn sanity_check<'tcx>(tcx: TyCtxt<'tcx>, body: &Body<'tcx>) {
         sanity_check_via_rustc_peek(tcx, flow_uninits.into_results_cursor(body));
     }
 
-    if has_rustc_mir_with(tcx, def_id, sym::rustc_peek_definite_init).is_some() {
-        let flow_def_inits =
-            DefinitelyInitializedPlaces::new(body, &move_data).iterate_to_fixpoint(tcx, body, None);
-
-        sanity_check_via_rustc_peek(tcx, flow_def_inits.into_results_cursor(body));
-    }
-
     if has_rustc_mir_with(tcx, def_id, sym::rustc_peek_liveness).is_some() {
         let flow_liveness = MaybeLiveLocals.iterate_to_fixpoint(tcx, body, None);
 
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index a2d9859645ff6..20dd41bb56c39 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -1725,7 +1725,6 @@ symbols! {
         rustc_partition_reused,
         rustc_pass_by_value,
         rustc_peek,
-        rustc_peek_definite_init,
         rustc_peek_liveness,
         rustc_peek_maybe_init,
         rustc_peek_maybe_uninit,
diff --git a/tests/ui/mir-dataflow/def-inits-1.rs b/tests/ui/mir-dataflow/def-inits-1.rs
deleted file mode 100644
index 30460824a1678..0000000000000
--- a/tests/ui/mir-dataflow/def-inits-1.rs
+++ /dev/null
@@ -1,51 +0,0 @@
-// General test of maybe_uninits state computed by MIR dataflow.
-
-#![feature(core_intrinsics, rustc_attrs)]
-
-use std::intrinsics::rustc_peek;
-use std::mem::{drop, replace};
-
-struct S(i32);
-
-#[rustc_mir(rustc_peek_definite_init,stop_after_dataflow)]
-fn foo(test: bool, x: &mut S, y: S, mut z: S) -> S {
-    let ret;
-    // `ret` starts off uninitialized
-    rustc_peek(&ret);  //~ ERROR rustc_peek: bit not set
-
-    // All function formal parameters start off initialized.
-
-    rustc_peek(&x);
-    rustc_peek(&y);
-    rustc_peek(&z);
-
-    ret = if test {
-        ::std::mem::replace(x, y)
-    } else {
-        z = y;
-        z
-    };
-
-    // `z` may be uninitialized here.
-    rustc_peek(&z); //~ ERROR rustc_peek: bit not set
-
-    // `y` is definitely uninitialized here.
-    rustc_peek(&y); //~ ERROR rustc_peek: bit not set
-
-    // `x` is still (definitely) initialized (replace above is a reborrow).
-    rustc_peek(&x);
-
-    ::std::mem::drop(x);
-
-    // `x` is *definitely* uninitialized here
-    rustc_peek(&x); //~ ERROR rustc_peek: bit not set
-
-    // `ret` is now definitely initialized (via `if` above).
-    rustc_peek(&ret);
-
-    ret
-}
-fn main() {
-    foo(true, &mut S(13), S(14), S(15));
-    foo(false, &mut S(13), S(14), S(15));
-}
diff --git a/tests/ui/mir-dataflow/def-inits-1.stderr b/tests/ui/mir-dataflow/def-inits-1.stderr
deleted file mode 100644
index e2bddb54d9ba8..0000000000000
--- a/tests/ui/mir-dataflow/def-inits-1.stderr
+++ /dev/null
@@ -1,28 +0,0 @@
-error: rustc_peek: bit not set
-  --> $DIR/def-inits-1.rs:14:5
-   |
-LL |     rustc_peek(&ret);
-   |     ^^^^^^^^^^^^^^^^
-
-error: rustc_peek: bit not set
-  --> $DIR/def-inits-1.rs:30:5
-   |
-LL |     rustc_peek(&z);
-   |     ^^^^^^^^^^^^^^
-
-error: rustc_peek: bit not set
-  --> $DIR/def-inits-1.rs:33:5
-   |
-LL |     rustc_peek(&y);
-   |     ^^^^^^^^^^^^^^
-
-error: rustc_peek: bit not set
-  --> $DIR/def-inits-1.rs:41:5
-   |
-LL |     rustc_peek(&x);
-   |     ^^^^^^^^^^^^^^
-
-error: stop_after_dataflow ended compilation
-
-error: aborting due to 5 previous errors
-

From c1707aaf0b8da047db0c1e1d97c7fa6c3545672d Mon Sep 17 00:00:00 2001
From: Trevor Gross <tmgross@umich.edu>
Date: Thu, 21 Nov 2024 03:46:59 -0500
Subject: [PATCH 07/38] Shorten the `MaybeUninit` `Debug` implementation

Currently the `Debug` implementation for `MaybeUninit` winds up being
pretty verbose. This struct:

    #[derive(Debug)]
    pub struct Foo {
        pub a: u32,
        pub b: &'static str,
        pub c: MaybeUninit<u32>,
        pub d: MaybeUninit<String>,
    }

Prints as:

    Foo {
        a: 0,
        b: "hello",
        c: core::mem::maybe_uninit::MaybeUninit<u32>,
        d: core::mem::maybe_uninit::MaybeUninit<alloc::string::String>,
    }

The goal is just to be a standin for content so the path prefix doesn't
add any useful information. Change the implementation to trim
`MaybeUninit`'s leading path, meaning the new result is now:

    Foo {
        a: 0,
        b: "hello",
        c: MaybeUninit<u32>,
        d: MaybeUninit<alloc::string::String>,
    }
---
 library/core/src/mem/maybe_uninit.rs | 6 +++++-
 library/core/tests/fmt/mod.rs        | 7 +++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/library/core/src/mem/maybe_uninit.rs b/library/core/src/mem/maybe_uninit.rs
index 58315cb74f0a1..27273e4eedf3a 100644
--- a/library/core/src/mem/maybe_uninit.rs
+++ b/library/core/src/mem/maybe_uninit.rs
@@ -255,7 +255,11 @@ impl<T: Copy> Clone for MaybeUninit<T> {
 #[stable(feature = "maybe_uninit_debug", since = "1.41.0")]
 impl<T> fmt::Debug for MaybeUninit<T> {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        f.pad(type_name::<Self>())
+        // NB: there is no `.pad_fmt` so we can't use a simpler `format_args!("MaybeUninit<{..}>").
+        // This needs to be adjusted if `MaybeUninit` moves modules.
+        let full_name = type_name::<Self>();
+        let short_name = full_name.split_once("mem::maybe_uninit::").unwrap().1;
+        f.pad(short_name)
     }
 }
 
diff --git a/library/core/tests/fmt/mod.rs b/library/core/tests/fmt/mod.rs
index 704d246139947..f7512abae3820 100644
--- a/library/core/tests/fmt/mod.rs
+++ b/library/core/tests/fmt/mod.rs
@@ -43,3 +43,10 @@ fn pad_integral_resets() {
 
     assert_eq!(format!("{Bar:<03}"), "1  0051  ");
 }
+
+#[test]
+fn test_maybe_uninit_short() {
+    // Ensure that the trimmed `MaybeUninit` Debug implementation doesn't break
+    let x = core::mem::MaybeUninit::new(0u32);
+    assert_eq!(format!("{x:?}"), "MaybeUninit<u32>");
+}

From b5fc3a10d37460f4df4e90be7d76b52acadd677c Mon Sep 17 00:00:00 2001
From: Michael Goulet <michael@errs.io>
Date: Sat, 23 Nov 2024 02:21:18 +0000
Subject: [PATCH 08/38] No need to re-sort existential preds

---
 compiler/rustc_middle/src/ty/relate.rs | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/compiler/rustc_middle/src/ty/relate.rs b/compiler/rustc_middle/src/ty/relate.rs
index 504a3c8a6d832..713060dc8d887 100644
--- a/compiler/rustc_middle/src/ty/relate.rs
+++ b/compiler/rustc_middle/src/ty/relate.rs
@@ -3,7 +3,6 @@ use std::iter;
 pub use rustc_type_ir::relate::*;
 
 use crate::ty::error::{ExpectedFound, TypeError};
-use crate::ty::predicate::ExistentialPredicateStableCmpExt as _;
 use crate::ty::{self as ty, Ty, TyCtxt};
 
 pub type RelateResult<'tcx, T> = rustc_type_ir::relate::RelateResult<TyCtxt<'tcx>, T>;
@@ -86,10 +85,7 @@ impl<'tcx> Relate<TyCtxt<'tcx>> for &'tcx ty::List<ty::PolyExistentialPredicate<
         // in `a`.
         let mut a_v: Vec<_> = a.into_iter().collect();
         let mut b_v: Vec<_> = b.into_iter().collect();
-        // `skip_binder` here is okay because `stable_cmp` doesn't look at binders
-        a_v.sort_by(|a, b| a.skip_binder().stable_cmp(tcx, &b.skip_binder()));
         a_v.dedup();
-        b_v.sort_by(|a, b| a.skip_binder().stable_cmp(tcx, &b.skip_binder()));
         b_v.dedup();
         if a_v.len() != b_v.len() {
             return Err(TypeError::ExistentialMismatch(ExpectedFound::new(true, a, b)));

From 898ccdb75426f5fb5c58e8057a83d015640613b8 Mon Sep 17 00:00:00 2001
From: Michael Goulet <michael@errs.io>
Date: Sat, 23 Nov 2024 18:07:22 +0000
Subject: [PATCH 09/38] Dont create object type when more than one principal is
 present

---
 .../src/hir_ty_lowering/dyn_compatibility.rs  | 13 ++-
 tests/ui/associated-types/issue-22560.rs      |  5 +-
 tests/ui/associated-types/issue-22560.stderr  | 54 +-----------
 .../missing-associated-types.rs               |  4 -
 .../missing-associated-types.stderr           | 83 ++-----------------
 tests/ui/traits/bad-sized.rs                  |  3 -
 tests/ui/traits/bad-sized.stderr              | 35 +-------
 tests/ui/traits/issue-32963.rs                |  1 -
 tests/ui/traits/issue-32963.stderr            | 17 +---
 9 files changed, 21 insertions(+), 194 deletions(-)

diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/dyn_compatibility.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/dyn_compatibility.rs
index 5e27ace4cbe4a..0ca30dc601ddd 100644
--- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/dyn_compatibility.rs
+++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/dyn_compatibility.rs
@@ -92,11 +92,16 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
 
         let (mut auto_traits, regular_traits): (Vec<_>, Vec<_>) =
             expanded_traits.partition(|i| tcx.trait_is_auto(i.trait_ref().def_id()));
+
+        // We don't support >1 principal
         if regular_traits.len() > 1 {
-            let _ = self.report_trait_object_addition_traits_error(&regular_traits);
-        } else if regular_traits.is_empty() && auto_traits.is_empty() {
-            let reported = self.report_trait_object_with_no_traits_error(span, &trait_bounds);
-            return Ty::new_error(tcx, reported);
+            let guar = self.report_trait_object_addition_traits_error(&regular_traits);
+            return Ty::new_error(tcx, guar);
+        }
+        // We  don't support empty trait objects.
+        if regular_traits.is_empty() && auto_traits.is_empty() {
+            let guar = self.report_trait_object_with_no_traits_error(span, &trait_bounds);
+            return Ty::new_error(tcx, guar);
         }
 
         // Check that there are no gross dyn-compatibility violations;
diff --git a/tests/ui/associated-types/issue-22560.rs b/tests/ui/associated-types/issue-22560.rs
index 44be8817b08c7..465aea515eef5 100644
--- a/tests/ui/associated-types/issue-22560.rs
+++ b/tests/ui/associated-types/issue-22560.rs
@@ -7,9 +7,6 @@ trait Sub<Rhs=Self> {
 }
 
 type Test = dyn Add + Sub;
-//~^ ERROR E0393
-//~| ERROR E0191
-//~| ERROR E0393
-//~| ERROR E0225
+//~^ ERROR E0225
 
 fn main() { }
diff --git a/tests/ui/associated-types/issue-22560.stderr b/tests/ui/associated-types/issue-22560.stderr
index 834040490f940..d0b6adc520c7e 100644
--- a/tests/ui/associated-types/issue-22560.stderr
+++ b/tests/ui/associated-types/issue-22560.stderr
@@ -9,56 +9,6 @@ LL | type Test = dyn Add + Sub;
    = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add + Sub {}`
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
-error[E0191]: the value of the associated types `Output` in `Add`, `Output` in `Sub` must be specified
-  --> $DIR/issue-22560.rs:9:17
-   |
-LL |     type Output;
-   |     ----------- `Output` defined here
-...
-LL |     type Output;
-   |     ----------- `Output` defined here
-...
-LL | type Test = dyn Add + Sub;
-   |                 ^^^   ^^^ associated type `Output` must be specified
-   |                 |
-   |                 associated type `Output` must be specified
-   |
-help: specify the associated types
-   |
-LL | type Test = dyn Add<Output = Type> + Sub<Output = Type>;
-   |                 ~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~
-
-error[E0393]: the type parameter `Rhs` must be explicitly specified
-  --> $DIR/issue-22560.rs:9:17
-   |
-LL | trait Add<Rhs=Self> {
-   | ------------------- type parameter `Rhs` must be specified for this
-...
-LL | type Test = dyn Add + Sub;
-   |                 ^^^
-   |
-   = note: because of the default `Self` reference, type parameters must be specified on object types
-help: set the type parameter to the desired type
-   |
-LL | type Test = dyn Add<Rhs> + Sub;
-   |                    +++++
-
-error[E0393]: the type parameter `Rhs` must be explicitly specified
-  --> $DIR/issue-22560.rs:9:23
-   |
-LL | trait Sub<Rhs=Self> {
-   | ------------------- type parameter `Rhs` must be specified for this
-...
-LL | type Test = dyn Add + Sub;
-   |                       ^^^
-   |
-   = note: because of the default `Self` reference, type parameters must be specified on object types
-help: set the type parameter to the desired type
-   |
-LL | type Test = dyn Add + Sub<Rhs>;
-   |                          +++++
-
-error: aborting due to 4 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0191, E0225, E0393.
-For more information about an error, try `rustc --explain E0191`.
+For more information about this error, try `rustc --explain E0225`.
diff --git a/tests/ui/associated-types/missing-associated-types.rs b/tests/ui/associated-types/missing-associated-types.rs
index 3c8410e39bd09..4e532715f1e27 100644
--- a/tests/ui/associated-types/missing-associated-types.rs
+++ b/tests/ui/associated-types/missing-associated-types.rs
@@ -11,16 +11,12 @@ trait Fine<Rhs>: Div<Rhs, Output = Rhs> {}
 
 type Foo<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs>;
 //~^ ERROR only auto traits can be used as additional traits in a trait object
-//~| ERROR the value of the associated types
 type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
 //~^ ERROR only auto traits can be used as additional traits in a trait object
-//~| ERROR the value of the associated types
 type Baz<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Y<Rhs>;
 //~^ ERROR only auto traits can be used as additional traits in a trait object
-//~| ERROR the value of the associated types
 type Bat<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Fine<Rhs>;
 //~^ ERROR only auto traits can be used as additional traits in a trait object
-//~| ERROR the value of the associated types
 type Bal<Rhs> = dyn X<Rhs>;
 //~^ ERROR the value of the associated types
 
diff --git a/tests/ui/associated-types/missing-associated-types.stderr b/tests/ui/associated-types/missing-associated-types.stderr
index 0636667ea1fd5..ce4b57e8af813 100644
--- a/tests/ui/associated-types/missing-associated-types.stderr
+++ b/tests/ui/associated-types/missing-associated-types.stderr
@@ -9,26 +9,8 @@ LL | type Foo<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs>;
    = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs> {}`
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
-error[E0191]: the value of the associated types `A` in `Y`, `Output` in `Add`, `Output` in `Mul`, `Output` in `Sub` must be specified
-  --> $DIR/missing-associated-types.rs:12:21
-   |
-LL |     type A;
-   |     ------ `A` defined here
-...
-LL | type Foo<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs>;
-   |                     ^^^^^^^^   ^^^^^^^^   ^^^^^^   ^^^^^^ associated type `A` must be specified
-   |                     |          |          |
-   |                     |          |          associated type `Output` must be specified
-   |                     |          associated type `Output` must be specified
-   |                     associated type `Output` must be specified
-   |
-help: specify the associated types
-   |
-LL | type Foo<Rhs> = dyn Add<Rhs, Output = Type> + Sub<Rhs, Output = Type> + X<Rhs, Output = Type> + Y<Rhs, A = Type>;
-   |                     ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~
-
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/missing-associated-types.rs:15:32
+  --> $DIR/missing-associated-types.rs:14:32
    |
 LL | type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
    |                     --------   ^^^^^^^^ additional non-auto trait
@@ -38,33 +20,8 @@ LL | type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
    = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs> {}`
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
-error[E0191]: the value of the associated types `A` and `B` in `Z`, `Output` and `Output` in `Div`, `Output` in `Add`, `Output` in `Mul`, `Output` in `Sub` must be specified
-  --> $DIR/missing-associated-types.rs:15:21
-   |
-LL |     type A;
-   |     ------ `A` defined here
-LL |     type B;
-   |     ------ `B` defined here
-...
-LL | type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
-   |                     ^^^^^^^^   ^^^^^^^^   ^^^^^^   ^^^^^^ associated types `A`, `B`, `Output` must be specified
-   |                     |          |          |
-   |                     |          |          associated types `Output` (from trait `Div`), `Output` (from trait `Mul`) must be specified
-   |                     |          associated type `Output` must be specified
-   |                     associated type `Output` must be specified
-   |
-help: consider introducing a new type parameter, adding `where` constraints using the fully-qualified path to the associated types
-  --> $DIR/missing-associated-types.rs:15:43
-   |
-LL | type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
-   |                                           ^^^^^^
-help: specify the associated types
-   |
-LL | type Bar<Rhs> = dyn Add<Rhs, Output = Type> + Sub<Rhs, Output = Type> + X<Rhs> + Z<Rhs, A = Type, B = Type, Output = Type>;
-   |                     ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/missing-associated-types.rs:18:32
+  --> $DIR/missing-associated-types.rs:16:32
    |
 LL | type Baz<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Y<Rhs>;
    |                     --------   ^^^^^^^^ additional non-auto trait
@@ -74,25 +31,8 @@ LL | type Baz<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Y<Rhs>;
    = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + Y<Rhs> {}`
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
-error[E0191]: the value of the associated types `A` in `Y`, `Output` in `Add`, `Output` in `Sub` must be specified
-  --> $DIR/missing-associated-types.rs:18:21
-   |
-LL |     type A;
-   |     ------ `A` defined here
-...
-LL | type Baz<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Y<Rhs>;
-   |                     ^^^^^^^^   ^^^^^^^^   ^^^^^^ associated type `A` must be specified
-   |                     |          |
-   |                     |          associated type `Output` must be specified
-   |                     associated type `Output` must be specified
-   |
-help: specify the associated types
-   |
-LL | type Baz<Rhs> = dyn Add<Rhs, Output = Type> + Sub<Rhs, Output = Type> + Y<Rhs, A = Type>;
-   |                     ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~
-
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/missing-associated-types.rs:21:32
+  --> $DIR/missing-associated-types.rs:18:32
    |
 LL | type Bat<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Fine<Rhs>;
    |                     --------   ^^^^^^^^ additional non-auto trait
@@ -102,28 +42,15 @@ LL | type Bat<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Fine<Rhs>;
    = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + Fine<Rhs> {}`
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
-error[E0191]: the value of the associated types `Output` in `Add`, `Output` in `Sub` must be specified
-  --> $DIR/missing-associated-types.rs:21:21
-   |
-LL | type Bat<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Fine<Rhs>;
-   |                     ^^^^^^^^   ^^^^^^^^ associated type `Output` must be specified
-   |                     |
-   |                     associated type `Output` must be specified
-   |
-help: specify the associated types
-   |
-LL | type Bat<Rhs> = dyn Add<Rhs, Output = Type> + Sub<Rhs, Output = Type> + Fine<Rhs>;
-   |                     ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~
-
 error[E0191]: the value of the associated types `Output` in `Div`, `Output` in `Mul` must be specified
-  --> $DIR/missing-associated-types.rs:24:21
+  --> $DIR/missing-associated-types.rs:20:21
    |
 LL | type Bal<Rhs> = dyn X<Rhs>;
    |                     ^^^^^^ associated types `Output` (from trait `Div`), `Output` (from trait `Mul`) must be specified
    |
    = help: consider introducing a new type parameter, adding `where` constraints using the fully-qualified path to the associated types
 
-error: aborting due to 9 previous errors
+error: aborting due to 5 previous errors
 
 Some errors have detailed explanations: E0191, E0225.
 For more information about an error, try `rustc --explain E0191`.
diff --git a/tests/ui/traits/bad-sized.rs b/tests/ui/traits/bad-sized.rs
index a15219679788d..7e4f37e4ae26c 100644
--- a/tests/ui/traits/bad-sized.rs
+++ b/tests/ui/traits/bad-sized.rs
@@ -3,7 +3,4 @@ trait Trait {}
 pub fn main() {
     let x: Vec<dyn Trait + Sized> = Vec::new();
     //~^ ERROR only auto traits can be used as additional traits in a trait object
-    //~| ERROR the size for values of type
-    //~| ERROR the size for values of type
-    //~| ERROR the size for values of type
 }
diff --git a/tests/ui/traits/bad-sized.stderr b/tests/ui/traits/bad-sized.stderr
index 4c1835dfed085..0e82867ef03b0 100644
--- a/tests/ui/traits/bad-sized.stderr
+++ b/tests/ui/traits/bad-sized.stderr
@@ -9,37 +9,6 @@ LL |     let x: Vec<dyn Trait + Sized> = Vec::new();
    = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Trait + Sized {}`
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
-error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
-  --> $DIR/bad-sized.rs:4:12
-   |
-LL |     let x: Vec<dyn Trait + Sized> = Vec::new();
-   |            ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `dyn Trait`
-note: required by an implicit `Sized` bound in `Vec`
-  --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
-
-error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
-  --> $DIR/bad-sized.rs:4:37
-   |
-LL |     let x: Vec<dyn Trait + Sized> = Vec::new();
-   |                                     ^^^^^^^^^^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `dyn Trait`
-note: required by a bound in `Vec::<T>::new`
-  --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
-
-error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
-  --> $DIR/bad-sized.rs:4:37
-   |
-LL |     let x: Vec<dyn Trait + Sized> = Vec::new();
-   |                                     ^^^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `dyn Trait`
-note: required by an implicit `Sized` bound in `Vec`
-  --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
-
-error: aborting due to 4 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0225, E0277.
-For more information about an error, try `rustc --explain E0225`.
+For more information about this error, try `rustc --explain E0225`.
diff --git a/tests/ui/traits/issue-32963.rs b/tests/ui/traits/issue-32963.rs
index 56a68f3a2312c..4c4cd91d72e3e 100644
--- a/tests/ui/traits/issue-32963.rs
+++ b/tests/ui/traits/issue-32963.rs
@@ -7,5 +7,4 @@ fn size_of_copy<T: Copy+?Sized>() -> usize { mem::size_of::<T>() }
 fn main() {
     size_of_copy::<dyn Misc + Copy>();
     //~^ ERROR only auto traits can be used as additional traits in a trait object
-    //~| ERROR the trait bound `dyn Misc: Copy` is not satisfied
 }
diff --git a/tests/ui/traits/issue-32963.stderr b/tests/ui/traits/issue-32963.stderr
index bad45e54d6428..1c70d0aaa0ac5 100644
--- a/tests/ui/traits/issue-32963.stderr
+++ b/tests/ui/traits/issue-32963.stderr
@@ -9,19 +9,6 @@ LL |     size_of_copy::<dyn Misc + Copy>();
    = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Misc + Copy {}`
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
-error[E0277]: the trait bound `dyn Misc: Copy` is not satisfied
-  --> $DIR/issue-32963.rs:8:20
-   |
-LL |     size_of_copy::<dyn Misc + Copy>();
-   |                    ^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `dyn Misc`
-   |
-note: required by a bound in `size_of_copy`
-  --> $DIR/issue-32963.rs:5:20
-   |
-LL | fn size_of_copy<T: Copy+?Sized>() -> usize { mem::size_of::<T>() }
-   |                    ^^^^ required by this bound in `size_of_copy`
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0225, E0277.
-For more information about an error, try `rustc --explain E0225`.
+For more information about this error, try `rustc --explain E0225`.

From cfa8fcbf581c8c311e079b04517cbe979d9beb7b Mon Sep 17 00:00:00 2001
From: Michael Goulet <michael@errs.io>
Date: Sat, 23 Nov 2024 18:32:10 +0000
Subject: [PATCH 10/38] Dont create trait object if it has errors in it

---
 .../src/hir_ty_lowering/dyn_compatibility.rs  |   7 +-
 tests/crashes/130521.rs                       |   2 +-
 tests/rustdoc-ui/unable-fulfill-trait.rs      |   1 -
 tests/rustdoc-ui/unable-fulfill-trait.stderr  |  13 +-
 .../const-generics/not_wf_param_in_rpitit.rs  |   3 -
 .../not_wf_param_in_rpitit.stderr             |  76 +----------
 tests/ui/issues/issue-23024.rs                |   1 -
 tests/ui/issues/issue-23024.stderr            |  10 +-
 tests/ui/issues/issue-34373.rs                |   1 -
 tests/ui/issues/issue-34373.stderr            |  30 +---
 ...use-type-argument-instead-of-assoc-type.rs |   3 +-
 ...type-argument-instead-of-assoc-type.stderr |  17 +--
 ...ce-hir-wf-check-anon-const-issue-122199.rs |   8 --
 ...ir-wf-check-anon-const-issue-122199.stderr | 129 +++---------------
 14 files changed, 40 insertions(+), 261 deletions(-)

diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/dyn_compatibility.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/dyn_compatibility.rs
index 0ca30dc601ddd..f6e227377b9b8 100644
--- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/dyn_compatibility.rs
+++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/dyn_compatibility.rs
@@ -8,7 +8,8 @@ use rustc_lint_defs::builtin::UNUSED_ASSOCIATED_TYPE_BOUNDS;
 use rustc_middle::span_bug;
 use rustc_middle::ty::fold::BottomUpFolder;
 use rustc_middle::ty::{
-    self, DynKind, ExistentialPredicateStableCmpExt as _, Ty, TyCtxt, TypeFoldable, Upcast,
+    self, DynKind, ExistentialPredicateStableCmpExt as _, Ty, TyCtxt, TypeFoldable,
+    TypeVisitableExt, Upcast,
 };
 use rustc_span::{ErrorGuaranteed, Span};
 use rustc_trait_selection::error_reporting::traits::report_dyn_incompatibility;
@@ -103,6 +104,10 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
             let guar = self.report_trait_object_with_no_traits_error(span, &trait_bounds);
             return Ty::new_error(tcx, guar);
         }
+        // Don't create a dyn trait if we have errors in the principal.
+        if let Err(guar) = trait_bounds.error_reported() {
+            return Ty::new_error(tcx, guar);
+        }
 
         // Check that there are no gross dyn-compatibility violations;
         // most importantly, that the supertraits don't contain `Self`,
diff --git a/tests/crashes/130521.rs b/tests/crashes/130521.rs
index ccc2b444b822a..ebcfacf96238c 100644
--- a/tests/crashes/130521.rs
+++ b/tests/crashes/130521.rs
@@ -1,7 +1,7 @@
 //@ known-bug: #130521
 
 #![feature(dyn_compatible_for_dispatch)]
-struct Vtable(dyn Cap);
+struct Vtable(dyn Cap<'static>);
 
 trait Cap<'a> {}
 
diff --git a/tests/rustdoc-ui/unable-fulfill-trait.rs b/tests/rustdoc-ui/unable-fulfill-trait.rs
index 4edc7ab76c198..49dce32072b61 100644
--- a/tests/rustdoc-ui/unable-fulfill-trait.rs
+++ b/tests/rustdoc-ui/unable-fulfill-trait.rs
@@ -3,7 +3,6 @@
 pub struct Foo<'a, 'b, T> {
     field1: dyn Bar<'a, 'b>,
     //~^ ERROR
-    //~| ERROR
 }
 
 pub trait Bar<'x, 's, U>
diff --git a/tests/rustdoc-ui/unable-fulfill-trait.stderr b/tests/rustdoc-ui/unable-fulfill-trait.stderr
index 12e53546cdacc..2786a005cd183 100644
--- a/tests/rustdoc-ui/unable-fulfill-trait.stderr
+++ b/tests/rustdoc-ui/unable-fulfill-trait.stderr
@@ -5,7 +5,7 @@ LL |     field1: dyn Bar<'a, 'b>,
    |                 ^^^ expected 1 generic argument
    |
 note: trait defined here, with 1 generic parameter: `U`
-  --> $DIR/unable-fulfill-trait.rs:9:11
+  --> $DIR/unable-fulfill-trait.rs:8:11
    |
 LL | pub trait Bar<'x, 's, U>
    |           ^^^         -
@@ -14,13 +14,6 @@ help: add missing generic argument
 LL |     field1: dyn Bar<'a, 'b, U>,
    |                           +++
 
-error[E0227]: ambiguous lifetime bound, explicit lifetime bound required
-  --> $DIR/unable-fulfill-trait.rs:4:13
-   |
-LL |     field1: dyn Bar<'a, 'b>,
-   |             ^^^^^^^^^^^^^^^
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0107, E0227.
-For more information about an error, try `rustc --explain E0107`.
+For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/const-generics/not_wf_param_in_rpitit.rs b/tests/ui/const-generics/not_wf_param_in_rpitit.rs
index b454562ad497a..cb1e90923e75d 100644
--- a/tests/ui/const-generics/not_wf_param_in_rpitit.rs
+++ b/tests/ui/const-generics/not_wf_param_in_rpitit.rs
@@ -3,9 +3,6 @@
 trait Trait<const N: dyn Trait = bar> {
     //~^ ERROR: cannot find value `bar` in this scope
     //~| ERROR: cycle detected when computing type of `Trait::N`
-    //~| ERROR: the trait `Trait` cannot be made into an object
-    //~| ERROR: the trait `Trait` cannot be made into an object
-    //~| ERROR: the trait `Trait` cannot be made into an object
     async fn a() {}
 }
 
diff --git a/tests/ui/const-generics/not_wf_param_in_rpitit.stderr b/tests/ui/const-generics/not_wf_param_in_rpitit.stderr
index 2500409e82858..42ae012fa5570 100644
--- a/tests/ui/const-generics/not_wf_param_in_rpitit.stderr
+++ b/tests/ui/const-generics/not_wf_param_in_rpitit.stderr
@@ -18,77 +18,7 @@ LL | trait Trait<const N: dyn Trait = bar> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
 
-error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/not_wf_param_in_rpitit.rs:3:22
-   |
-LL | trait Trait<const N: dyn Trait = bar> {
-   |                      ^^^^^^^^^ `Trait` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/not_wf_param_in_rpitit.rs:9:14
-   |
-LL | trait Trait<const N: dyn Trait = bar> {
-   |       ----- this trait cannot be made into an object...
-...
-LL |     async fn a() {}
-   |              ^ ...because associated function `a` has no `self` parameter
-help: consider turning `a` into a method by giving it a `&self` argument
-   |
-LL |     async fn a(&self) {}
-   |                +++++
-help: alternatively, consider constraining `a` so it does not apply to trait objects
-   |
-LL |     async fn a() where Self: Sized {}
-   |                  +++++++++++++++++
-
-error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/not_wf_param_in_rpitit.rs:3:13
-   |
-LL | trait Trait<const N: dyn Trait = bar> {
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^ `Trait` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/not_wf_param_in_rpitit.rs:9:14
-   |
-LL | trait Trait<const N: dyn Trait = bar> {
-   |       ----- this trait cannot be made into an object...
-...
-LL |     async fn a() {}
-   |              ^ ...because associated function `a` has no `self` parameter
-help: consider turning `a` into a method by giving it a `&self` argument
-   |
-LL |     async fn a(&self) {}
-   |                +++++
-help: alternatively, consider constraining `a` so it does not apply to trait objects
-   |
-LL |     async fn a() where Self: Sized {}
-   |                  +++++++++++++++++
-
-error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/not_wf_param_in_rpitit.rs:3:13
-   |
-LL | trait Trait<const N: dyn Trait = bar> {
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^ `Trait` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/not_wf_param_in_rpitit.rs:9:14
-   |
-LL | trait Trait<const N: dyn Trait = bar> {
-   |       ----- this trait cannot be made into an object...
-...
-LL |     async fn a() {}
-   |              ^ ...because associated function `a` has no `self` parameter
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: consider turning `a` into a method by giving it a `&self` argument
-   |
-LL |     async fn a(&self) {}
-   |                +++++
-help: alternatively, consider constraining `a` so it does not apply to trait objects
-   |
-LL |     async fn a() where Self: Sized {}
-   |                  +++++++++++++++++
-
-error: aborting due to 5 previous errors
+error: aborting due to 2 previous errors
 
-Some errors have detailed explanations: E0038, E0391, E0425.
-For more information about an error, try `rustc --explain E0038`.
+Some errors have detailed explanations: E0391, E0425.
+For more information about an error, try `rustc --explain E0391`.
diff --git a/tests/ui/issues/issue-23024.rs b/tests/ui/issues/issue-23024.rs
index 25220dc3e611c..1b072dd7b69c0 100644
--- a/tests/ui/issues/issue-23024.rs
+++ b/tests/ui/issues/issue-23024.rs
@@ -8,5 +8,4 @@ fn main()
     println!("{:?}",(vfnfer[0] as dyn Fn)(3));
     //~^ ERROR the precise format of `Fn`-family traits'
     //~| ERROR missing generics for trait `Fn`
-    //~| ERROR the value of the associated type `Output` in `FnOnce`
 }
diff --git a/tests/ui/issues/issue-23024.stderr b/tests/ui/issues/issue-23024.stderr
index 62278a51be635..51db0414f3a39 100644
--- a/tests/ui/issues/issue-23024.stderr
+++ b/tests/ui/issues/issue-23024.stderr
@@ -19,13 +19,7 @@ help: add missing generic argument
 LL |     println!("{:?}",(vfnfer[0] as dyn Fn<Args>)(3));
    |                                         ++++++
 
-error[E0191]: the value of the associated type `Output` in `FnOnce` must be specified
-  --> $DIR/issue-23024.rs:8:39
-   |
-LL |     println!("{:?}",(vfnfer[0] as dyn Fn)(3));
-   |                                       ^^ help: specify the associated type: `Fn::<Output = Type>`
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
-Some errors have detailed explanations: E0107, E0191, E0658.
+Some errors have detailed explanations: E0107, E0658.
 For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/ui/issues/issue-34373.rs b/tests/ui/issues/issue-34373.rs
index dc20c5589b33f..707aa8cf33833 100644
--- a/tests/ui/issues/issue-34373.rs
+++ b/tests/ui/issues/issue-34373.rs
@@ -6,7 +6,6 @@ trait Trait<T> {
 
 pub struct Foo<T = Box<Trait<DefaultFoo>>>;  //~ ERROR cycle detected
 //~^ ERROR `T` is never used
-//~| ERROR `Trait` cannot be made into an object
 type DefaultFoo = Foo;
 
 fn main() {
diff --git a/tests/ui/issues/issue-34373.stderr b/tests/ui/issues/issue-34373.stderr
index 4e8e7c61fee89..0636555821730 100644
--- a/tests/ui/issues/issue-34373.stderr
+++ b/tests/ui/issues/issue-34373.stderr
@@ -5,7 +5,7 @@ LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
    |                              ^^^^^^^^^^
    |
 note: ...which requires expanding type alias `DefaultFoo`...
-  --> $DIR/issue-34373.rs:10:19
+  --> $DIR/issue-34373.rs:9:19
    |
 LL | type DefaultFoo = Foo;
    |                   ^^^
@@ -17,28 +17,6 @@ LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
 
-error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/issue-34373.rs:7:24
-   |
-LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
-   |                        ^^^^^^^^^^^^^^^^^ `Trait` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/issue-34373.rs:4:8
-   |
-LL | trait Trait<T> {
-   |       ----- this trait cannot be made into an object...
-LL |     fn foo(_: T) {}
-   |        ^^^ ...because associated function `foo` has no `self` parameter
-help: consider turning `foo` into a method by giving it a `&self` argument
-   |
-LL |     fn foo(&self, _: T) {}
-   |            ++++++
-help: alternatively, consider constraining `foo` so it does not apply to trait objects
-   |
-LL |     fn foo(_: T) where Self: Sized {}
-   |                  +++++++++++++++++
-
 error[E0392]: type parameter `T` is never used
   --> $DIR/issue-34373.rs:7:16
    |
@@ -48,7 +26,7 @@ LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
    = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
    = help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
-Some errors have detailed explanations: E0038, E0391, E0392.
-For more information about an error, try `rustc --explain E0038`.
+Some errors have detailed explanations: E0391, E0392.
+For more information about an error, try `rustc --explain E0391`.
diff --git a/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.rs b/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.rs
index ed262fd39a5a9..c2387bf5411d1 100644
--- a/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.rs
+++ b/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.rs
@@ -5,8 +5,7 @@ pub trait T<X, Y> {
 }
 pub struct Foo {
     i: Box<dyn T<usize, usize, usize, usize, B=usize>>,
-    //~^ ERROR must be specified
-    //~| ERROR trait takes 2 generic arguments but 4 generic arguments were supplied
+    //~^ ERROR trait takes 2 generic arguments but 4 generic arguments were supplied
 }
 
 
diff --git a/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr b/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr
index 7c84dd4b8ff33..18cf0674f0231 100644
--- a/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr
+++ b/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr
@@ -14,19 +14,6 @@ help: replace the generic bounds with the associated types
 LL |     i: Box<dyn T<usize, usize, A = usize, C = usize, B=usize>>,
    |                                +++        +++
 
-error[E0191]: the value of the associated types `C` and `A` in `T` must be specified
-  --> $DIR/use-type-argument-instead-of-assoc-type.rs:7:16
-   |
-LL |     type A;
-   |     ------ `A` defined here
-LL |     type B;
-LL |     type C;
-   |     ------ `C` defined here
-...
-LL |     i: Box<dyn T<usize, usize, usize, usize, B=usize>>,
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated types `A`, `C` must be specified
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0107, E0191.
-For more information about an error, try `rustc --explain E0107`.
+For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs
index 53363319ba0e6..a95e10b7265dd 100644
--- a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs
+++ b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs
@@ -1,11 +1,6 @@
 trait Trait<const N: Trait = bar> {
     //~^ ERROR cannot find value `bar` in this scope
     //~| ERROR cycle detected when computing type of `Trait::N`
-    //~| ERROR the trait `Trait` cannot be made into an object
-    //~| ERROR the trait `Trait` cannot be made into an object
-    //~| ERROR the trait `Trait` cannot be made into an object
-    //~| WARN trait objects without an explicit `dyn` are deprecated [bare_trait_objects]
-    //~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
     //~| WARN trait objects without an explicit `dyn` are deprecated [bare_trait_objects]
     //~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
     fn fnc<const N: Trait = u32>(&self) -> Trait {
@@ -13,9 +8,6 @@ trait Trait<const N: Trait = bar> {
         //~| ERROR expected value, found builtin type `u32`
         //~| ERROR defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
         //~| ERROR associated item referring to unboxed trait object for its own trait
-        //~| ERROR the trait `Trait` cannot be made into an object
-        //~| WARN trait objects without an explicit `dyn` are deprecated [bare_trait_objects]
-        //~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
         //~| WARN trait objects without an explicit `dyn` are deprecated [bare_trait_objects]
         //~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
         //~| WARN trait objects without an explicit `dyn` are deprecated [bare_trait_objects]
diff --git a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr
index fefb788fac79c..339f7b2cc8207 100644
--- a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr
+++ b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr
@@ -1,5 +1,5 @@
 error[E0403]: the name `N` is already used for a generic parameter in this item's generic parameters
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:11:18
+  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:6:18
    |
 LL | trait Trait<const N: Trait = bar> {
    |                   - first use of `N`
@@ -14,13 +14,13 @@ LL | trait Trait<const N: Trait = bar> {
    |                              ^^^ not found in this scope
 
 error[E0423]: expected value, found builtin type `u32`
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:11:29
+  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:6:29
    |
 LL |     fn fnc<const N: Trait = u32>(&self) -> Trait {
    |                             ^^^ not a value
 
 error[E0425]: cannot find value `bar` in this scope
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:23:9
+  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:15:9
    |
 LL |         bar
    |         ^^^ not found in this scope
@@ -53,27 +53,8 @@ LL | trait Trait<const N: Trait = bar> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
 
-error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:11:12
-   |
-LL |     fn fnc<const N: Trait = u32>(&self) -> Trait {
-   |            ^^^^^^^^^^^^^^^^^^^^
-
 warning: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:11:21
-   |
-LL |     fn fnc<const N: Trait = u32>(&self) -> Trait {
-   |                     ^^^^^
-   |
-   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
-help: if this is a dyn-compatible trait, use `dyn`
-   |
-LL |     fn fnc<const N: dyn Trait = u32>(&self) -> Trait {
-   |                     +++
-
-warning: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:11:44
+  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:6:44
    |
 LL |     fn fnc<const N: Trait = u32>(&self) -> Trait {
    |                                            ^^^^^
@@ -85,114 +66,40 @@ help: if this is a dyn-compatible trait, use `dyn`
 LL |     fn fnc<const N: Trait = u32>(&self) -> dyn Trait {
    |                                            +++
 
-warning: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:1:22
-   |
-LL | trait Trait<const N: Trait = bar> {
-   |                      ^^^^^
-   |
-   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: if this is a dyn-compatible trait, use `dyn`
-   |
-LL | trait Trait<const N: dyn Trait = bar> {
-   |                      +++
-
-error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:1:22
-   |
-LL | trait Trait<const N: Trait = bar> {
-   |                      ^^^^^ `Trait` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:11:8
-   |
-LL | trait Trait<const N: Trait = bar> {
-   |       ----- this trait cannot be made into an object...
-...
-LL |     fn fnc<const N: Trait = u32>(&self) -> Trait {
-   |        ^^^ ...because method `fnc` has generic type parameters
-   = help: consider moving `fnc` to another trait
-
-error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:1:13
-   |
-LL | trait Trait<const N: Trait = bar> {
-   |             ^^^^^^^^^^^^^^^^^^^^ `Trait` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:11:8
-   |
-LL | trait Trait<const N: Trait = bar> {
-   |       ----- this trait cannot be made into an object...
-...
-LL |     fn fnc<const N: Trait = u32>(&self) -> Trait {
-   |        ^^^ ...because method `fnc` has generic type parameters
-   = help: consider moving `fnc` to another trait
-
-error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:11:44
+error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:6:12
    |
-LL | trait Trait<const N: Trait = bar> {
-   |       ----- in this trait
-...
 LL |     fn fnc<const N: Trait = u32>(&self) -> Trait {
-   |                                            ^^^^^
-   |
-help: you might have meant to use `Self` to refer to the implementing type
-   |
-LL |     fn fnc<const N: Trait = u32>(&self) -> Self {
-   |                                            ~~~~
+   |            ^^^^^^^^^^^^^^^^^^^^
 
 warning: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:11:21
+  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:6:21
    |
 LL |     fn fnc<const N: Trait = u32>(&self) -> Trait {
    |                     ^^^^^
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: if this is a dyn-compatible trait, use `dyn`
    |
 LL |     fn fnc<const N: dyn Trait = u32>(&self) -> Trait {
    |                     +++
 
-error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:11:21
-   |
-LL |     fn fnc<const N: Trait = u32>(&self) -> Trait {
-   |                     ^^^^^ `Trait` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:11:8
+error: associated item referring to unboxed trait object for its own trait
+  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:6:44
    |
 LL | trait Trait<const N: Trait = bar> {
-   |       ----- this trait cannot be made into an object...
+   |       ----- in this trait
 ...
 LL |     fn fnc<const N: Trait = u32>(&self) -> Trait {
-   |        ^^^ ...because method `fnc` has generic type parameters
-   = help: consider moving `fnc` to another trait
-
-error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:1:13
-   |
-LL | trait Trait<const N: Trait = bar> {
-   |             ^^^^^^^^^^^^^^^^^^^^ `Trait` cannot be made into an object
+   |                                            ^^^^^
    |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:11:8
+help: you might have meant to use `Self` to refer to the implementing type
    |
-LL | trait Trait<const N: Trait = bar> {
-   |       ----- this trait cannot be made into an object...
-...
-LL |     fn fnc<const N: Trait = u32>(&self) -> Trait {
-   |        ^^^ ...because method `fnc` has generic type parameters
-   = help: consider moving `fnc` to another trait
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+LL |     fn fnc<const N: Trait = u32>(&self) -> Self {
+   |                                            ~~~~
 
-error: aborting due to 11 previous errors; 5 warnings emitted
+error: aborting due to 7 previous errors; 3 warnings emitted
 
-Some errors have detailed explanations: E0038, E0391, E0403, E0423, E0425.
-For more information about an error, try `rustc --explain E0038`.
+Some errors have detailed explanations: E0391, E0403, E0423, E0425.
+For more information about an error, try `rustc --explain E0391`.

From 28970a2cb0885ba7922820d6fb0e14c7e166df9b Mon Sep 17 00:00:00 2001
From: Michael Goulet <michael@errs.io>
Date: Sat, 23 Nov 2024 05:02:18 +0000
Subject: [PATCH 11/38] Simplify array length mismatch error reporting

---
 compiler/rustc_middle/src/ty/consts.rs        |  4 ----
 compiler/rustc_middle/src/ty/error.rs         |  9 +++-----
 .../src/error_reporting/infer/mod.rs          | 13 ++++++++----
 compiler/rustc_type_ir/src/error.rs           |  4 ++--
 compiler/rustc_type_ir/src/inherent.rs        |  2 --
 compiler/rustc_type_ir/src/relate.rs          | 15 +++----------
 tests/crashes/126359.rs                       |  9 --------
 tests/crashes/131101.rs                       | 12 -----------
 .../match_arr_unknown_len.stderr              |  5 +----
 ...const-argument-cross-crate-mismatch.stderr |  4 ++--
 .../generic-param-mismatch.stderr             |  5 +----
 .../issue-62504.min.stderr                    |  4 +---
 .../consts/array-literal-len-mismatch.stderr  |  2 +-
 tests/ui/consts/bad-array-size-in-type-err.rs | 10 +++++++++
 .../consts/bad-array-size-in-type-err.stderr  | 21 +++++++++++++++++++
 tests/ui/consts/const-array-oob-arith.rs      |  4 ++--
 tests/ui/consts/const-array-oob-arith.stderr  |  4 ++--
 tests/ui/inference/array-len-mismatch.stderr  |  4 ++--
 18 files changed, 60 insertions(+), 71 deletions(-)
 delete mode 100644 tests/crashes/126359.rs
 delete mode 100644 tests/crashes/131101.rs
 create mode 100644 tests/ui/consts/bad-array-size-in-type-err.rs
 create mode 100644 tests/ui/consts/bad-array-size-in-type-err.stderr

diff --git a/compiler/rustc_middle/src/ty/consts.rs b/compiler/rustc_middle/src/ty/consts.rs
index c4d86c3210e87..d27205e26abbe 100644
--- a/compiler/rustc_middle/src/ty/consts.rs
+++ b/compiler/rustc_middle/src/ty/consts.rs
@@ -151,10 +151,6 @@ impl<'tcx> Const<'tcx> {
 }
 
 impl<'tcx> rustc_type_ir::inherent::Const<TyCtxt<'tcx>> for Const<'tcx> {
-    fn try_to_target_usize(self, interner: TyCtxt<'tcx>) -> Option<u64> {
-        self.try_to_target_usize(interner)
-    }
-
     fn new_infer(tcx: TyCtxt<'tcx>, infer: ty::InferConst) -> Self {
         Const::new_infer(tcx, infer)
     }
diff --git a/compiler/rustc_middle/src/ty/error.rs b/compiler/rustc_middle/src/ty/error.rs
index 43d243b0584e4..4a82af3255950 100644
--- a/compiler/rustc_middle/src/ty/error.rs
+++ b/compiler/rustc_middle/src/ty/error.rs
@@ -58,12 +58,9 @@ impl<'tcx> TypeError<'tcx> {
                 pluralize!(values.found)
             )
             .into(),
-            TypeError::FixedArraySize(values) => format!(
-                "expected an array with a fixed size of {} element{}, found one with {} element{}",
-                values.expected,
-                pluralize!(values.expected),
-                values.found,
-                pluralize!(values.found)
+            TypeError::ArraySize(values) => format!(
+                "expected an array with a size of {}, found one with a size of {}",
+                values.expected, values.found,
             )
             .into(),
             TypeError::ArgCount => "incorrect number of function parameters".into(),
diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs
index c7ad14ac0bfce..0f9d4cb1982d4 100644
--- a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs
+++ b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs
@@ -1792,12 +1792,12 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
 
     fn suggest_specify_actual_length(
         &self,
-        terr: TypeError<'_>,
-        trace: &TypeTrace<'_>,
+        terr: TypeError<'tcx>,
+        trace: &TypeTrace<'tcx>,
         span: Span,
     ) -> Option<TypeErrorAdditionalDiags> {
         let hir = self.tcx.hir();
-        let TypeError::FixedArraySize(sz) = terr else {
+        let TypeError::ArraySize(sz) = terr else {
             return None;
         };
         let tykind = match self.tcx.hir_node_by_def_id(trace.cause.body_id) {
@@ -1838,9 +1838,14 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
         if let Some(tykind) = tykind
             && let hir::TyKind::Array(_, length) = tykind
             && let hir::ArrayLen::Body(ct) = length
+            && let Some((scalar, ty)) = sz.found.try_to_scalar()
+            && ty == self.tcx.types.usize
         {
             let span = ct.span();
-            Some(TypeErrorAdditionalDiags::ConsiderSpecifyingLength { span, length: sz.found })
+            Some(TypeErrorAdditionalDiags::ConsiderSpecifyingLength {
+                span,
+                length: scalar.to_target_usize(&self.tcx).unwrap(),
+            })
         } else {
             None
         }
diff --git a/compiler/rustc_type_ir/src/error.rs b/compiler/rustc_type_ir/src/error.rs
index 59dea7695111f..55671b84dbc4f 100644
--- a/compiler/rustc_type_ir/src/error.rs
+++ b/compiler/rustc_type_ir/src/error.rs
@@ -29,7 +29,7 @@ pub enum TypeError<I: Interner> {
     Mutability,
     ArgumentMutability(usize),
     TupleSize(ExpectedFound<usize>),
-    FixedArraySize(ExpectedFound<u64>),
+    ArraySize(ExpectedFound<I::Const>),
     ArgCount,
 
     RegionsDoesNotOutlive(I::Region, I::Region),
@@ -69,7 +69,7 @@ impl<I: Interner> TypeError<I> {
         use self::TypeError::*;
         match self {
             CyclicTy(_) | CyclicConst(_) | SafetyMismatch(_) | PolarityMismatch(_) | Mismatch
-            | AbiMismatch(_) | FixedArraySize(_) | ArgumentSorts(..) | Sorts(_)
+            | AbiMismatch(_) | ArraySize(_) | ArgumentSorts(..) | Sorts(_)
             | VariadicMismatch(_) | TargetFeatureCast(_) => false,
 
             Mutability
diff --git a/compiler/rustc_type_ir/src/inherent.rs b/compiler/rustc_type_ir/src/inherent.rs
index 3793d2c5241ff..a201f2b1c11f1 100644
--- a/compiler/rustc_type_ir/src/inherent.rs
+++ b/compiler/rustc_type_ir/src/inherent.rs
@@ -257,8 +257,6 @@ pub trait Const<I: Interner<Const = Self>>:
     + Relate<I>
     + Flags
 {
-    fn try_to_target_usize(self, interner: I) -> Option<u64>;
-
     fn new_infer(interner: I, var: ty::InferConst) -> Self;
 
     fn new_var(interner: I, var: ty::ConstVid) -> Self;
diff --git a/compiler/rustc_type_ir/src/relate.rs b/compiler/rustc_type_ir/src/relate.rs
index 6b301b1606050..0b013b2017f12 100644
--- a/compiler/rustc_type_ir/src/relate.rs
+++ b/compiler/rustc_type_ir/src/relate.rs
@@ -501,19 +501,10 @@ pub fn structurally_relate_tys<I: Interner, R: TypeRelation<I>>(
             let t = relation.relate(a_t, b_t)?;
             match relation.relate(sz_a, sz_b) {
                 Ok(sz) => Ok(Ty::new_array_with_const_len(cx, t, sz)),
-                Err(err) => {
-                    // Check whether the lengths are both concrete/known values,
-                    // but are unequal, for better diagnostics.
-                    let sz_a = sz_a.try_to_target_usize(cx);
-                    let sz_b = sz_b.try_to_target_usize(cx);
-
-                    match (sz_a, sz_b) {
-                        (Some(sz_a_val), Some(sz_b_val)) if sz_a_val != sz_b_val => {
-                            Err(TypeError::FixedArraySize(ExpectedFound::new(sz_a_val, sz_b_val)))
-                        }
-                        _ => Err(err),
-                    }
+                Err(TypeError::ConstMismatch(_)) => {
+                    Err(TypeError::ArraySize(ExpectedFound::new(sz_a, sz_b)))
                 }
+                Err(e) => Err(e),
             }
         }
 
diff --git a/tests/crashes/126359.rs b/tests/crashes/126359.rs
deleted file mode 100644
index 4b28c466b55c3..0000000000000
--- a/tests/crashes/126359.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-//@ known-bug: rust-lang/rust#126359
-
-struct OppOrder<const N: u8 = 3, T = u32> {
-    arr: [T; N],
-}
-
-fn main() {
-    let _ = OppOrder::<3, u32> { arr: [0, 0, 0] };
-}
diff --git a/tests/crashes/131101.rs b/tests/crashes/131101.rs
deleted file mode 100644
index 3ec441101b7d9..0000000000000
--- a/tests/crashes/131101.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-//@ known-bug: #131101
-trait Foo<const N: u8> {
-    fn do_x(&self) -> [u8; N];
-}
-
-struct Bar;
-
-impl Foo<const 3> for Bar {
-    fn do_x(&self) -> [u8; 3] {
-        [0u8; 3]
-    }
-}
diff --git a/tests/ui/array-slice-vec/match_arr_unknown_len.stderr b/tests/ui/array-slice-vec/match_arr_unknown_len.stderr
index 3ed0d6bdf3ac9..f617ff339383d 100644
--- a/tests/ui/array-slice-vec/match_arr_unknown_len.stderr
+++ b/tests/ui/array-slice-vec/match_arr_unknown_len.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/match_arr_unknown_len.rs:3:9
    |
 LL |         [1, 2] => true,
-   |         ^^^^^^ expected `2`, found `N`
-   |
-   = note: expected array `[u32; 2]`
-              found array `[u32; N]`
+   |         ^^^^^^ expected an array with a size of 2, found one with a size of N
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/const-generics/const-argument-cross-crate-mismatch.stderr b/tests/ui/const-generics/const-argument-cross-crate-mismatch.stderr
index d5eefd3575365..f58821283e19f 100644
--- a/tests/ui/const-generics/const-argument-cross-crate-mismatch.stderr
+++ b/tests/ui/const-generics/const-argument-cross-crate-mismatch.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/const-argument-cross-crate-mismatch.rs:6:67
    |
 LL |     let _ = const_generic_lib::function(const_generic_lib::Struct([0u8, 1u8]));
-   |                                         ------------------------- ^^^^^^^^^^ expected an array with a fixed size of 3 elements, found one with 2 elements
+   |                                         ------------------------- ^^^^^^^^^^ expected an array with a size of 3, found one with a size of 2
    |                                         |
    |                                         arguments to this struct are incorrect
    |
@@ -16,7 +16,7 @@ error[E0308]: mismatched types
   --> $DIR/const-argument-cross-crate-mismatch.rs:8:65
    |
 LL |     let _: const_generic_lib::Alias = const_generic_lib::Struct([0u8, 1u8, 2u8]);
-   |                                       ------------------------- ^^^^^^^^^^^^^^^ expected an array with a fixed size of 2 elements, found one with 3 elements
+   |                                       ------------------------- ^^^^^^^^^^^^^^^ expected an array with a size of 2, found one with a size of 3
    |                                       |
    |                                       arguments to this struct are incorrect
    |
diff --git a/tests/ui/const-generics/generic-param-mismatch.stderr b/tests/ui/const-generics/generic-param-mismatch.stderr
index be6b3b90ec72a..099ce03317d33 100644
--- a/tests/ui/const-generics/generic-param-mismatch.stderr
+++ b/tests/ui/const-generics/generic-param-mismatch.stderr
@@ -4,10 +4,7 @@ error[E0308]: mismatched types
 LL | fn test<const N: usize, const M: usize>() -> [u8; M] {
    |                                              ------- expected `[u8; M]` because of return type
 LL |     [0; N]
-   |     ^^^^^^ expected `M`, found `N`
-   |
-   = note: expected array `[u8; M]`
-              found array `[u8; N]`
+   |     ^^^^^^ expected an array with a size of M, found one with a size of N
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-62504.min.stderr b/tests/ui/const-generics/generic_const_exprs/issue-62504.min.stderr
index 14c67e2528a73..8efd433fd1fe9 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-62504.min.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/issue-62504.min.stderr
@@ -10,12 +10,10 @@ error[E0308]: mismatched types
   --> $DIR/issue-62504.rs:18:21
    |
 LL |         ArrayHolder([0; Self::SIZE])
-   |         ----------- ^^^^^^^^^^^^^^^ expected `X`, found `Self::SIZE`
+   |         ----------- ^^^^^^^^^^^^^^^ expected an array with a size of X, found one with a size of Self::SIZE
    |         |
    |         arguments to this struct are incorrect
    |
-   = note: expected array `[u32; X]`
-              found array `[u32; Self::SIZE]`
 note: tuple struct defined here
   --> $DIR/issue-62504.rs:14:8
    |
diff --git a/tests/ui/consts/array-literal-len-mismatch.stderr b/tests/ui/consts/array-literal-len-mismatch.stderr
index a11506ecb6d6a..39b8a647324b3 100644
--- a/tests/ui/consts/array-literal-len-mismatch.stderr
+++ b/tests/ui/consts/array-literal-len-mismatch.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/array-literal-len-mismatch.rs:1:26
    |
 LL | const NUMBERS: [u8; 3] = [10, 20];
-   |                     -    ^^^^^^^^ expected an array with a fixed size of 3 elements, found one with 2 elements
+   |                     -    ^^^^^^^^ expected an array with a size of 3, found one with a size of 2
    |                     |
    |                     help: consider specifying the actual array length: `2`
 
diff --git a/tests/ui/consts/bad-array-size-in-type-err.rs b/tests/ui/consts/bad-array-size-in-type-err.rs
new file mode 100644
index 0000000000000..cb02ad3205db6
--- /dev/null
+++ b/tests/ui/consts/bad-array-size-in-type-err.rs
@@ -0,0 +1,10 @@
+struct BadArraySize<const N: u8> {
+    arr: [i32; N],
+    //~^ ERROR the constant `N` is not of type `usize`
+}
+
+fn main() {
+    let _ = BadArraySize::<2> { arr: [0, 0, 0] };
+    //~^ ERROR mismatched types
+    //~| ERROR the constant `2` is not of type `usize`
+}
diff --git a/tests/ui/consts/bad-array-size-in-type-err.stderr b/tests/ui/consts/bad-array-size-in-type-err.stderr
new file mode 100644
index 0000000000000..25d14d80c3ec4
--- /dev/null
+++ b/tests/ui/consts/bad-array-size-in-type-err.stderr
@@ -0,0 +1,21 @@
+error: the constant `N` is not of type `usize`
+  --> $DIR/bad-array-size-in-type-err.rs:2:10
+   |
+LL |     arr: [i32; N],
+   |          ^^^^^^^^ expected `usize`, found `u8`
+
+error[E0308]: mismatched types
+  --> $DIR/bad-array-size-in-type-err.rs:7:38
+   |
+LL |     let _ = BadArraySize::<2> { arr: [0, 0, 0] };
+   |                                      ^^^^^^^^^ expected an array with a size of 2, found one with a size of 3
+
+error: the constant `2` is not of type `usize`
+  --> $DIR/bad-array-size-in-type-err.rs:7:38
+   |
+LL |     let _ = BadArraySize::<2> { arr: [0, 0, 0] };
+   |                                      ^^^^^^^^^ expected `usize`, found `u8`
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/consts/const-array-oob-arith.rs b/tests/ui/consts/const-array-oob-arith.rs
index 9332cbbd4d7c9..0f6e76768cd15 100644
--- a/tests/ui/consts/const-array-oob-arith.rs
+++ b/tests/ui/consts/const-array-oob-arith.rs
@@ -4,10 +4,10 @@ const VAL: i32 = ARR[IDX];
 const BONG: [i32; (ARR[0] - 41) as usize] = [5];
 const BLUB: [i32; (ARR[0] - 40) as usize] = [5];
 //~^ ERROR: mismatched types
-//~| expected an array with a fixed size of 2 elements, found one with 1 element
+//~| expected an array
 const BOO: [i32; (ARR[0] - 41) as usize] = [5, 99];
 //~^ ERROR: mismatched types
-//~| expected an array with a fixed size of 1 element, found one with 2 elements
+//~| expected an array
 
 fn main() {
     let _ = VAL;
diff --git a/tests/ui/consts/const-array-oob-arith.stderr b/tests/ui/consts/const-array-oob-arith.stderr
index 029d94273fae1..d3299082aa14c 100644
--- a/tests/ui/consts/const-array-oob-arith.stderr
+++ b/tests/ui/consts/const-array-oob-arith.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/const-array-oob-arith.rs:5:45
    |
 LL | const BLUB: [i32; (ARR[0] - 40) as usize] = [5];
-   |                   ----------------------    ^^^ expected an array with a fixed size of 2 elements, found one with 1 element
+   |                   ----------------------    ^^^ expected an array with a size of 2, found one with a size of 1
    |                   |
    |                   help: consider specifying the actual array length: `1`
 
@@ -10,7 +10,7 @@ error[E0308]: mismatched types
   --> $DIR/const-array-oob-arith.rs:8:44
    |
 LL | const BOO: [i32; (ARR[0] - 41) as usize] = [5, 99];
-   |                  ----------------------    ^^^^^^^ expected an array with a fixed size of 1 element, found one with 2 elements
+   |                  ----------------------    ^^^^^^^ expected an array with a size of 1, found one with a size of 2
    |                  |
    |                  help: consider specifying the actual array length: `2`
 
diff --git a/tests/ui/inference/array-len-mismatch.stderr b/tests/ui/inference/array-len-mismatch.stderr
index 7358e47839725..7146e3803d536 100644
--- a/tests/ui/inference/array-len-mismatch.stderr
+++ b/tests/ui/inference/array-len-mismatch.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/array-len-mismatch.rs:6:26
    |
 LL |     let wrong: [u8; 3] = [10, 20];
-   |                -------   ^^^^^^^^ expected an array with a fixed size of 3 elements, found one with 2 elements
+   |                -------   ^^^^^^^^ expected an array with a size of 3, found one with a size of 2
    |                |    |
    |                |    help: consider specifying the actual array length: `2`
    |                expected due to this
@@ -11,7 +11,7 @@ error[E0308]: mismatched types
   --> $DIR/array-len-mismatch.rs:9:26
    |
 LL |     let wrong: [u8; 3] = returns_arr();
-   |                -------   ^^^^^^^^^^^^^ expected an array with a fixed size of 3 elements, found one with 2 elements
+   |                -------   ^^^^^^^^^^^^^ expected an array with a size of 3, found one with a size of 2
    |                |    |
    |                |    help: consider specifying the actual array length: `2`
    |                expected due to this

From 6484420e5de69f53c1e48eb19da78f2ebbd56093 Mon Sep 17 00:00:00 2001
From: Ralf Jung <post@ralfj.de>
Date: Sun, 24 Nov 2024 09:16:59 +0100
Subject: [PATCH 12/38] the emscripten OS no longer exists on non-wasm targets

---
 compiler/rustc_target/src/spec/tests/tests_impl.rs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/compiler/rustc_target/src/spec/tests/tests_impl.rs b/compiler/rustc_target/src/spec/tests/tests_impl.rs
index bd47d12ef9ff7..522b9f837d7cd 100644
--- a/compiler/rustc_target/src/spec/tests/tests_impl.rs
+++ b/compiler/rustc_target/src/spec/tests/tests_impl.rs
@@ -19,6 +19,9 @@ impl Target {
         if self.is_like_msvc {
             assert!(self.is_like_windows);
         }
+        if self.os == "emscripten" {
+            assert!(self.is_like_wasm);
+        }
 
         // Check that default linker flavor is compatible with some other key properties.
         assert_eq!(self.is_like_osx, matches!(self.linker_flavor, LinkerFlavor::Darwin(..)));
@@ -137,7 +140,7 @@ impl Target {
             assert!(self.dynamic_linking);
         }
         // Apparently PIC was slow on wasm at some point, see comments in wasm_base.rs
-        if self.dynamic_linking && !(self.is_like_wasm && self.os != "emscripten") {
+        if self.dynamic_linking && !self.is_like_wasm {
             assert_eq!(self.relocation_model, RelocModel::Pic);
         }
         if self.position_independent_executables {

From 5d42f64ad2f39c1f65ff3fb5b2c73b52c81f8a87 Mon Sep 17 00:00:00 2001
From: Ralf Jung <post@ralfj.de>
Date: Sun, 24 Nov 2024 09:11:11 +0100
Subject: [PATCH 13/38] target check_consistency: ensure target feature string
 makes some basic sense

---
 .../rustc_target/src/spec/tests/tests_impl.rs | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/compiler/rustc_target/src/spec/tests/tests_impl.rs b/compiler/rustc_target/src/spec/tests/tests_impl.rs
index bd47d12ef9ff7..b0d3befae8376 100644
--- a/compiler/rustc_target/src/spec/tests/tests_impl.rs
+++ b/compiler/rustc_target/src/spec/tests/tests_impl.rs
@@ -1,5 +1,7 @@
 use std::assert_matches::assert_matches;
 
+use rustc_data_structures::fx::FxHashSet;
+
 use super::super::*;
 
 // Test target self-consistency and JSON encoding/decoding roundtrip.
@@ -170,6 +172,27 @@ impl Target {
             }
             _ => {}
         }
+
+        // Check that the given target-features string makes some basic sense.
+        if !self.features.is_empty() {
+            let mut features_enabled = FxHashSet::default();
+            let mut features_disabled = FxHashSet::default();
+            for feat in self.features.split(',') {
+                if let Some(feat) = feat.strip_prefix("+") {
+                    features_enabled.insert(feat);
+                    if features_disabled.contains(feat) {
+                        panic!("target feature `{feat}` is both enabled and disabled");
+                    }
+                } else if let Some(feat) = feat.strip_prefix("-") {
+                    features_disabled.insert(feat);
+                    if features_enabled.contains(feat) {
+                        panic!("target feature `{feat}` is both enabled and disabled");
+                    }
+                } else {
+                    panic!("target feature `{feat}` is invalid, must start with `+` or `-`");
+                }
+            }
+        }
     }
 
     // Add your target to the whitelist if it has `std` library

From f3ad32b76934fcc8a5119ecf20c7ba9cc7b40ea9 Mon Sep 17 00:00:00 2001
From: "Crom (Thibaut CHARLES)" <CromFr@gmail.com>
Date: Sun, 24 Nov 2024 14:36:55 +0100
Subject: [PATCH 14/38] Added a doc test for std::path::strip_prefix

---
 library/std/src/path.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/library/std/src/path.rs b/library/std/src/path.rs
index b0291e3aa196f..7ffb11b6aedbd 100644
--- a/library/std/src/path.rs
+++ b/library/std/src/path.rs
@@ -2504,6 +2504,7 @@ impl Path {
     /// assert_eq!(path.strip_prefix("/test/haha/foo.txt/"), Ok(Path::new("")));
     ///
     /// assert!(path.strip_prefix("test").is_err());
+    /// assert!(path.strip_prefix("/te").is_err());
     /// assert!(path.strip_prefix("/haha").is_err());
     ///
     /// let prefix = PathBuf::from("/test/");

From d26e29ff3a9c3851045b6d7a03e6bd6010267624 Mon Sep 17 00:00:00 2001
From: Michael Goulet <michael@errs.io>
Date: Mon, 25 Nov 2024 03:04:07 +0000
Subject: [PATCH 15/38] Tweak parameter mismatch explanation to not say unknown

---
 .../rustc_hir_typeck/src/fn_ctxt/checks.rs    | 53 +++++++++++--------
 tests/ui/async-await/coroutine-desc.stderr    |  6 +--
 .../coerce-reborrow-multi-arg-fail.stderr     |  2 +-
 tests/ui/fn/fn-item-type.stderr               | 10 ++--
 tests/ui/fn/param-mismatch-no-names.rs        |  8 +++
 tests/ui/fn/param-mismatch-no-names.stderr    | 23 ++++++++
 ...ric-mismatch-reporting-issue-116615.stderr | 10 ++--
 7 files changed, 75 insertions(+), 37 deletions(-)
 create mode 100644 tests/ui/fn/param-mismatch-no-names.rs
 create mode 100644 tests/ui/fn/param-mismatch-no-names.stderr

diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
index 9c18dbd422d90..f8f6564cf14d9 100644
--- a/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
+++ b/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
@@ -2347,9 +2347,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
 
                 let check_for_matched_generics = || {
                     if matched_inputs.iter().any(|x| x.is_some())
-                        && params_with_generics.iter().any(|x| x.0.is_some())
+                        && params_with_generics.iter().any(|x| x.1.is_some())
                     {
-                        for (idx, (generic, _)) in params_with_generics.iter().enumerate() {
+                        for &(idx, generic, _) in &params_with_generics {
                             // Param has to have a generic and be matched to be relevant
                             if matched_inputs[idx.into()].is_none() {
                                 continue;
@@ -2362,7 +2362,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                             for unmatching_idx in idx + 1..params_with_generics.len() {
                                 if matched_inputs[unmatching_idx.into()].is_none()
                                     && let Some(unmatched_idx_param_generic) =
-                                        params_with_generics[unmatching_idx].0
+                                        params_with_generics[unmatching_idx].1
                                     && unmatched_idx_param_generic.name.ident()
                                         == generic.name.ident()
                                 {
@@ -2377,8 +2377,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
 
                 let check_for_matched_generics = check_for_matched_generics();
 
-                for (idx, (generic_param, param)) in
-                    params_with_generics.iter().enumerate().filter(|(idx, _)| {
+                for &(idx, generic_param, param) in
+                    params_with_generics.iter().filter(|&(idx, _, _)| {
                         check_for_matched_generics
                             || expected_idx.is_none_or(|expected_idx| expected_idx == *idx)
                     })
@@ -2390,8 +2390,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
 
                     let other_params_matched: Vec<(usize, &hir::Param<'_>)> = params_with_generics
                         .iter()
-                        .enumerate()
-                        .filter(|(other_idx, (other_generic_param, _))| {
+                        .filter(|(other_idx, other_generic_param, _)| {
                             if *other_idx == idx {
                                 return false;
                             }
@@ -2410,18 +2409,18 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                             }
                             other_generic_param.name.ident() == generic_param.name.ident()
                         })
-                        .map(|(other_idx, (_, other_param))| (other_idx, *other_param))
+                        .map(|&(other_idx, _, other_param)| (other_idx, other_param))
                         .collect();
 
                     if !other_params_matched.is_empty() {
                         let other_param_matched_names: Vec<String> = other_params_matched
                             .iter()
-                            .map(|(_, other_param)| {
+                            .map(|(idx, other_param)| {
                                 if let hir::PatKind::Binding(_, _, ident, _) = other_param.pat.kind
                                 {
                                     format!("`{ident}`")
                                 } else {
-                                    "{unknown}".to_string()
+                                    format!("parameter #{}", idx + 1)
                                 }
                             })
                             .collect();
@@ -2478,18 +2477,18 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                 {
                     let param_idents_matching: Vec<String> = params_with_generics
                         .iter()
-                        .filter(|(generic, _)| {
+                        .filter(|(_, generic, _)| {
                             if let Some(generic) = generic {
                                 generic.name.ident() == generic_param.name.ident()
                             } else {
                                 false
                             }
                         })
-                        .map(|(_, param)| {
+                        .map(|(idx, _, param)| {
                             if let hir::PatKind::Binding(_, _, ident, _) = param.pat.kind {
                                 format!("`{ident}`")
                             } else {
-                                "{unknown}".to_string()
+                                format!("parameter #{}", idx + 1)
                             }
                         })
                         .collect();
@@ -2498,8 +2497,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                         spans.push_span_label(
                             generic_param.span,
                             format!(
-                                "{} all reference this parameter {}",
+                                "{} {} reference this parameter `{}`",
                                 display_list_with_comma_and(&param_idents_matching),
+                                if param_idents_matching.len() == 2 { "both" } else { "all" },
                                 generic_param.name.ident().name,
                             ),
                         );
@@ -2580,7 +2580,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
 
         if let Some(params_with_generics) = self.get_hir_params_with_generics(def_id, is_method) {
             debug_assert_eq!(params_with_generics.len(), matched_inputs.len());
-            for (idx, (generic_param, _)) in params_with_generics.iter().enumerate() {
+            for &(idx, generic_param, _) in &params_with_generics {
                 if matched_inputs[idx.into()].is_none() {
                     continue;
                 }
@@ -2594,20 +2594,20 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                 };
 
                 let mut idxs_matched: Vec<usize> = vec![];
-                for (other_idx, (_, _)) in params_with_generics.iter().enumerate().filter(
-                    |(other_idx, (other_generic_param, _))| {
-                        if *other_idx == idx {
+                for &(other_idx, _, _) in
+                    params_with_generics.iter().filter(|&&(other_idx, other_generic_param, _)| {
+                        if other_idx == idx {
                             return false;
                         }
                         let Some(other_generic_param) = other_generic_param else {
                             return false;
                         };
-                        if matched_inputs[(*other_idx).into()].is_some() {
+                        if matched_inputs[other_idx.into()].is_some() {
                             return false;
                         }
                         other_generic_param.name.ident() == generic_param.name.ident()
-                    },
-                ) {
+                    })
+                {
                     idxs_matched.push(other_idx);
                 }
 
@@ -2642,7 +2642,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
         &self,
         def_id: DefId,
         is_method: bool,
-    ) -> Option<Vec<(Option<&hir::GenericParam<'_>>, &hir::Param<'_>)>> {
+    ) -> Option<Vec<(usize, Option<&hir::GenericParam<'_>>, &hir::Param<'_>)>> {
         let fn_node = self.tcx.hir().get_if_local(def_id)?;
         let fn_decl = fn_node.fn_decl()?;
 
@@ -2685,7 +2685,14 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
         }
 
         debug_assert_eq!(params.len(), generic_params.len());
-        Some(generic_params.into_iter().zip(params).collect())
+        Some(
+            generic_params
+                .into_iter()
+                .zip(params)
+                .enumerate()
+                .map(|(a, (b, c))| (a, b, c))
+                .collect(),
+        )
     }
 }
 
diff --git a/tests/ui/async-await/coroutine-desc.stderr b/tests/ui/async-await/coroutine-desc.stderr
index e1d7898478e0a..5434ff3d958f8 100644
--- a/tests/ui/async-await/coroutine-desc.stderr
+++ b/tests/ui/async-await/coroutine-desc.stderr
@@ -19,7 +19,7 @@ LL | fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
    |    ^^^ -                       -----  ----- this parameter needs to match the `async` block type of `f1`
    |        |                       |
    |        |                       `f2` needs to match the `async` block type of this parameter
-   |        `f1` and `f2` all reference this parameter F
+   |        `f1` and `f2` both reference this parameter `F`
 
 error[E0308]: mismatched types
   --> $DIR/coroutine-desc.rs:12:16
@@ -39,7 +39,7 @@ LL | fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
    |    ^^^ -                       -----  ----- this parameter needs to match the future type of `f1`
    |        |                       |
    |        |                       `f2` needs to match the future type of this parameter
-   |        `f1` and `f2` all reference this parameter F
+   |        `f1` and `f2` both reference this parameter `F`
 
 error[E0308]: mismatched types
   --> $DIR/coroutine-desc.rs:14:26
@@ -62,7 +62,7 @@ LL | fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
    |    ^^^ -                       -----  ----- this parameter needs to match the `async` closure body type of `f1`
    |        |                       |
    |        |                       `f2` needs to match the `async` closure body type of this parameter
-   |        `f1` and `f2` all reference this parameter F
+   |        `f1` and `f2` both reference this parameter `F`
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/coercion/coerce-reborrow-multi-arg-fail.stderr b/tests/ui/coercion/coerce-reborrow-multi-arg-fail.stderr
index 46723c5a297f7..5dea3f70fdb5f 100644
--- a/tests/ui/coercion/coerce-reborrow-multi-arg-fail.stderr
+++ b/tests/ui/coercion/coerce-reborrow-multi-arg-fail.stderr
@@ -16,7 +16,7 @@ LL | fn test<T>(_a: T, _b: T) {}
    |    ^^^^ -  -----  ----- this parameter needs to match the `&mut {integer}` type of `_a`
    |         |  |
    |         |  `_b` needs to match the `&mut {integer}` type of this parameter
-   |         `_a` and `_b` all reference this parameter T
+   |         `_a` and `_b` both reference this parameter `T`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/fn/fn-item-type.stderr b/tests/ui/fn/fn-item-type.stderr
index 76cdbcceac841..5cc529543d2ef 100644
--- a/tests/ui/fn/fn-item-type.stderr
+++ b/tests/ui/fn/fn-item-type.stderr
@@ -17,7 +17,7 @@ LL | fn eq<T>(x: T, y: T) {}
    |    ^^ -  ----  ---- this parameter needs to match the fn item type of `x`
    |       |  |
    |       |  `y` needs to match the fn item type of this parameter
-   |       `x` and `y` all reference this parameter T
+   |       `x` and `y` both reference this parameter `T`
    = help: consider casting both fn items to fn pointers using `as fn(isize) -> isize`
 
 error[E0308]: mismatched types
@@ -39,7 +39,7 @@ LL | fn eq<T>(x: T, y: T) {}
    |    ^^ -  ----  ---- this parameter needs to match the fn item type of `x`
    |       |  |
    |       |  `y` needs to match the fn item type of this parameter
-   |       `x` and `y` all reference this parameter T
+   |       `x` and `y` both reference this parameter `T`
    = help: consider casting both fn items to fn pointers using `as fn(isize) -> isize`
 
 error[E0308]: mismatched types
@@ -61,7 +61,7 @@ LL | fn eq<T>(x: T, y: T) {}
    |    ^^ -  ----  ---- this parameter needs to match the fn item type of `x`
    |       |  |
    |       |  `y` needs to match the fn item type of this parameter
-   |       `x` and `y` all reference this parameter T
+   |       `x` and `y` both reference this parameter `T`
    = help: consider casting both fn items to fn pointers using `as fn(isize) -> isize`
 
 error[E0308]: mismatched types
@@ -83,7 +83,7 @@ LL | fn eq<T>(x: T, y: T) {}
    |    ^^ -  ----  ---- this parameter needs to match the fn item type of `x`
    |       |  |
    |       |  `y` needs to match the fn item type of this parameter
-   |       `x` and `y` all reference this parameter T
+   |       `x` and `y` both reference this parameter `T`
    = help: consider casting both fn items to fn pointers using `as fn()`
 
 error[E0308]: mismatched types
@@ -105,7 +105,7 @@ LL | fn eq<T>(x: T, y: T) {}
    |    ^^ -  ----  ---- this parameter needs to match the fn item type of `x`
    |       |  |
    |       |  `y` needs to match the fn item type of this parameter
-   |       `x` and `y` all reference this parameter T
+   |       `x` and `y` both reference this parameter `T`
 
 error: aborting due to 5 previous errors
 
diff --git a/tests/ui/fn/param-mismatch-no-names.rs b/tests/ui/fn/param-mismatch-no-names.rs
new file mode 100644
index 0000000000000..05f3de190ea92
--- /dev/null
+++ b/tests/ui/fn/param-mismatch-no-names.rs
@@ -0,0 +1,8 @@
+fn same_type<T>(_: T, _: T) {}
+
+fn f<X, Y>(x: X, y: Y) {
+    same_type([x], Some(y));
+    //~^ ERROR mismatched types
+}
+
+fn main() {}
diff --git a/tests/ui/fn/param-mismatch-no-names.stderr b/tests/ui/fn/param-mismatch-no-names.stderr
new file mode 100644
index 0000000000000..d9d360d5ae4f5
--- /dev/null
+++ b/tests/ui/fn/param-mismatch-no-names.stderr
@@ -0,0 +1,23 @@
+error[E0308]: mismatched types
+  --> $DIR/param-mismatch-no-names.rs:4:20
+   |
+LL |     same_type([x], Some(y));
+   |     --------- ---  ^^^^^^^ expected `[X; 1]`, found `Option<Y>`
+   |     |         |
+   |     |         expected all arguments to be this `[X; 1]` type because they need to match the type of this parameter
+   |     arguments to this function are incorrect
+   |
+   = note: expected array `[X; 1]`
+               found enum `Option<Y>`
+note: function defined here
+  --> $DIR/param-mismatch-no-names.rs:1:4
+   |
+LL | fn same_type<T>(_: T, _: T) {}
+   |    ^^^^^^^^^ -  ----  ---- this parameter needs to match the `[X; 1]` type of parameter #1
+   |              |  |
+   |              |  parameter #2 needs to match the `[X; 1]` type of this parameter
+   |              parameter #1 and parameter #2 both reference this parameter `T`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mismatched_types/generic-mismatch-reporting-issue-116615.stderr b/tests/ui/mismatched_types/generic-mismatch-reporting-issue-116615.stderr
index a845dfabe93b7..0a86f884e70db 100644
--- a/tests/ui/mismatched_types/generic-mismatch-reporting-issue-116615.stderr
+++ b/tests/ui/mismatched_types/generic-mismatch-reporting-issue-116615.stderr
@@ -14,7 +14,7 @@ LL | fn foo<T>(a: T, b: T) {}
    |    ^^^ -  ----  ---- this parameter needs to match the integer type of `a`
    |        |  |
    |        |  `b` needs to match the integer type of this parameter
-   |        `a` and `b` all reference this parameter T
+   |        `a` and `b` both reference this parameter `T`
 
 error[E0308]: arguments to this function are incorrect
   --> $DIR/generic-mismatch-reporting-issue-116615.rs:8:5
@@ -38,7 +38,7 @@ LL | fn foo_multi_same<T>(a: T, b: T, c: T, d: T, e: T, f: i32) {}
    |                   |  |     |     this parameter needs to match the `&str` type of `a` and `b`
    |                   |  |     `c`, `d` and `e` need to match the `&str` type of this parameter
    |                   |  `c`, `d` and `e` need to match the `&str` type of this parameter
-   |                   `a`, `b`, `c`, `d` and `e` all reference this parameter T
+   |                   `a`, `b`, `c`, `d` and `e` all reference this parameter `T`
 
 error[E0308]: arguments to this function are incorrect
   --> $DIR/generic-mismatch-reporting-issue-116615.rs:10:5
@@ -65,8 +65,8 @@ LL | fn foo_multi_generics<S, T>(a: T, b: T, c: T, d: T, e: T, f: S, g: S) {}
    |                       |  |  |     |     `d` and `e` need to match the `&str` type of this parameter
    |                       |  |  |     `d` and `e` need to match the `&str` type of this parameter
    |                       |  |  `d` and `e` need to match the `&str` type of this parameter
-   |                       |  `a`, `b`, `c`, `d` and `e` all reference this parameter T
-   |                       `f` and `g` all reference this parameter S
+   |                       |  `a`, `b`, `c`, `d` and `e` all reference this parameter `T`
+   |                       `f` and `g` both reference this parameter `S`
 
 error[E0308]: arguments to this function are incorrect
   --> $DIR/generic-mismatch-reporting-issue-116615.rs:12:5
@@ -90,7 +90,7 @@ LL | fn foo_multi_same<T>(a: T, b: T, c: T, d: T, e: T, f: i32) {}
    |                   |  |     |     this parameter needs to match the `&str` type of `a`, `d` and `e`
    |                   |  |     this parameter needs to match the `&str` type of `a`, `d` and `e`
    |                   |  `b` and `c` need to match the `&str` type of this parameter
-   |                   `a`, `b`, `c`, `d` and `e` all reference this parameter T
+   |                   `a`, `b`, `c`, `d` and `e` all reference this parameter `T`
 
 error: aborting due to 4 previous errors
 

From 98777b4c490386ab7889718e811d28ce7423f0af Mon Sep 17 00:00:00 2001
From: Nicholas Nethercote <n.nethercote@gmail.com>
Date: Thu, 14 Nov 2024 16:55:27 +1100
Subject: [PATCH 16/38] Merge `TokenTreesReader` into `StringReader`.

There is a not-very-useful layering in the lexer, where
`TokenTreesReader` contains a `StringReader`. This commit combines them
and names the result `Lexer`, which is a more obvious name for it.

The methods of `Lexer` are now split across `mod.rs` and `tokentrees.rs`
which isn't ideal, but it doesn't seem worth moving a bunch of code to
avoid it.
---
 compiler/rustc_parse/src/lexer/mod.rs         | 21 +++++---
 compiler/rustc_parse/src/lexer/tokentrees.rs  | 51 +++++--------------
 .../rustc_parse/src/lexer/unicode_chars.rs    |  8 +--
 3 files changed, 31 insertions(+), 49 deletions(-)

diff --git a/compiler/rustc_parse/src/lexer/mod.rs b/compiler/rustc_parse/src/lexer/mod.rs
index 5023e83bd67c7..0ef5e9ed1d4a3 100644
--- a/compiler/rustc_parse/src/lexer/mod.rs
+++ b/compiler/rustc_parse/src/lexer/mod.rs
@@ -18,6 +18,7 @@ use rustc_span::symbol::Symbol;
 use rustc_span::{BytePos, Pos, Span};
 use tracing::debug;
 
+use crate::lexer::diagnostics::TokenTreeDiagInfo;
 use crate::lexer::unicode_chars::UNICODE_ARRAY;
 use crate::{errors, make_unclosed_delims_error};
 
@@ -56,7 +57,7 @@ pub(crate) fn lex_token_trees<'psess, 'src>(
     }
 
     let cursor = Cursor::new(src);
-    let string_reader = StringReader {
+    let mut lexer = Lexer {
         psess,
         start_pos,
         pos: start_pos,
@@ -65,9 +66,12 @@ pub(crate) fn lex_token_trees<'psess, 'src>(
         override_span,
         nbsp_is_whitespace: false,
         last_lifetime: None,
+        token: Token::dummy(),
+        diag_info: TokenTreeDiagInfo::default(),
     };
-    let (stream, res, unmatched_delims) =
-        tokentrees::TokenTreesReader::lex_all_token_trees(string_reader);
+    let (_open_spacing, stream, res) = lexer.lex_token_trees(/* is_delimited */ false);
+    let unmatched_delims = lexer.diag_info.unmatched_delims;
+
     match res {
         Ok(()) if unmatched_delims.is_empty() => Ok(stream),
         _ => {
@@ -92,7 +96,7 @@ pub(crate) fn lex_token_trees<'psess, 'src>(
     }
 }
 
-struct StringReader<'psess, 'src> {
+struct Lexer<'psess, 'src> {
     psess: &'psess ParseSess,
     /// Initial position, read-only.
     start_pos: BytePos,
@@ -111,9 +115,14 @@ struct StringReader<'psess, 'src> {
     /// Track the `Span` for the leading `'` of the last lifetime. Used for
     /// diagnostics to detect possible typo where `"` was meant.
     last_lifetime: Option<Span>,
+
+    /// The current token.
+    token: Token,
+
+    diag_info: TokenTreeDiagInfo,
 }
 
-impl<'psess, 'src> StringReader<'psess, 'src> {
+impl<'psess, 'src> Lexer<'psess, 'src> {
     fn dcx(&self) -> DiagCtxtHandle<'psess> {
         self.psess.dcx()
     }
@@ -124,7 +133,7 @@ impl<'psess, 'src> StringReader<'psess, 'src> {
 
     /// Returns the next token, paired with a bool indicating if the token was
     /// preceded by whitespace.
-    fn next_token(&mut self) -> (Token, bool) {
+    fn next_token_from_cursor(&mut self) -> (Token, bool) {
         let mut preceded_by_whitespace = false;
         let mut swallow_next_invalid = 0;
         // Skip trivial (whitespace & comments) tokens
diff --git a/compiler/rustc_parse/src/lexer/tokentrees.rs b/compiler/rustc_parse/src/lexer/tokentrees.rs
index 7b21ffacc841d..fab92aff74011 100644
--- a/compiler/rustc_parse/src/lexer/tokentrees.rs
+++ b/compiler/rustc_parse/src/lexer/tokentrees.rs
@@ -4,41 +4,19 @@ use rustc_ast_pretty::pprust::token_to_string;
 use rustc_errors::{Applicability, PErr};
 use rustc_span::symbol::kw;
 
-use super::diagnostics::{
-    TokenTreeDiagInfo, report_suspicious_mismatch_block, same_indentation_level,
-};
-use super::{StringReader, UnmatchedDelim};
+use super::diagnostics::{report_suspicious_mismatch_block, same_indentation_level};
+use super::{Lexer, UnmatchedDelim};
 use crate::Parser;
 
-pub(super) struct TokenTreesReader<'psess, 'src> {
-    string_reader: StringReader<'psess, 'src>,
-    /// The "next" token, which has been obtained from the `StringReader` but
-    /// not yet handled by the `TokenTreesReader`.
-    token: Token,
-    diag_info: TokenTreeDiagInfo,
-}
-
-impl<'psess, 'src> TokenTreesReader<'psess, 'src> {
-    pub(super) fn lex_all_token_trees(
-        string_reader: StringReader<'psess, 'src>,
-    ) -> (TokenStream, Result<(), Vec<PErr<'psess>>>, Vec<UnmatchedDelim>) {
-        let mut tt_reader = TokenTreesReader {
-            string_reader,
-            token: Token::dummy(),
-            diag_info: TokenTreeDiagInfo::default(),
-        };
-        let (_open_spacing, stream, res) = tt_reader.lex_token_trees(/* is_delimited */ false);
-        (stream, res, tt_reader.diag_info.unmatched_delims)
-    }
-
+impl<'psess, 'src> Lexer<'psess, 'src> {
     // Lex into a token stream. The `Spacing` in the result is that of the
     // opening delimiter.
-    fn lex_token_trees(
+    pub(super) fn lex_token_trees(
         &mut self,
         is_delimited: bool,
     ) -> (Spacing, TokenStream, Result<(), Vec<PErr<'psess>>>) {
         // Move past the opening delimiter.
-        let (_, open_spacing) = self.bump(false);
+        let open_spacing = self.bump(false).1;
 
         let mut buf = Vec::new();
         loop {
@@ -80,7 +58,7 @@ impl<'psess, 'src> TokenTreesReader<'psess, 'src> {
 
     fn eof_err(&mut self) -> PErr<'psess> {
         let msg = "this file contains an unclosed delimiter";
-        let mut err = self.string_reader.dcx().struct_span_err(self.token.span, msg);
+        let mut err = self.dcx().struct_span_err(self.token.span, msg);
 
         let unclosed_delimiter_show_limit = 5;
         let len = usize::min(unclosed_delimiter_show_limit, self.diag_info.open_braces.len());
@@ -110,7 +88,7 @@ impl<'psess, 'src> TokenTreesReader<'psess, 'src> {
             report_suspicious_mismatch_block(
                 &mut err,
                 &self.diag_info,
-                self.string_reader.psess.source_map(),
+                self.psess.source_map(),
                 *delim,
             )
         }
@@ -136,7 +114,7 @@ impl<'psess, 'src> TokenTreesReader<'psess, 'src> {
 
         // Expand to cover the entire delimited token tree.
         let delim_span = DelimSpan::from_pair(pre_span, self.token.span);
-        let sm = self.string_reader.psess.source_map();
+        let sm = self.psess.source_map();
 
         let close_spacing = match self.token.kind {
             // Correct delimiter.
@@ -228,7 +206,7 @@ impl<'psess, 'src> TokenTreesReader<'psess, 'src> {
     // Will glue adjacent single-char tokens together if `glue` is set.
     fn bump(&mut self, glue: bool) -> (Token, Spacing) {
         let (this_spacing, next_tok) = loop {
-            let (next_tok, is_next_tok_preceded_by_whitespace) = self.string_reader.next_token();
+            let (next_tok, is_next_tok_preceded_by_whitespace) = self.next_token_from_cursor();
 
             if is_next_tok_preceded_by_whitespace {
                 break (Spacing::Alone, next_tok);
@@ -256,7 +234,7 @@ impl<'psess, 'src> TokenTreesReader<'psess, 'src> {
     ) -> Vec<PErr<'psess>> {
         // If there are unclosed delims, see if there are diff markers and if so, point them
         // out instead of complaining about the unclosed delims.
-        let mut parser = Parser::new(self.string_reader.psess, tts, None);
+        let mut parser = Parser::new(self.psess, tts, None);
         let mut diff_errs = vec![];
         // Suggest removing a `{` we think appears in an `if`/`while` condition.
         // We want to suggest removing a `{` only if we think we're in an `if`/`while` condition,
@@ -314,14 +292,9 @@ impl<'psess, 'src> TokenTreesReader<'psess, 'src> {
         // An unexpected closing delimiter (i.e., there is no matching opening delimiter).
         let token_str = token_to_string(&self.token);
         let msg = format!("unexpected closing delimiter: `{token_str}`");
-        let mut err = self.string_reader.dcx().struct_span_err(self.token.span, msg);
+        let mut err = self.dcx().struct_span_err(self.token.span, msg);
 
-        report_suspicious_mismatch_block(
-            &mut err,
-            &self.diag_info,
-            self.string_reader.psess.source_map(),
-            delim,
-        );
+        report_suspicious_mismatch_block(&mut err, &self.diag_info, self.psess.source_map(), delim);
         err.span_label(self.token.span, "unexpected closing delimiter");
         err
     }
diff --git a/compiler/rustc_parse/src/lexer/unicode_chars.rs b/compiler/rustc_parse/src/lexer/unicode_chars.rs
index d78b3664b1ee8..42eef27803eb5 100644
--- a/compiler/rustc_parse/src/lexer/unicode_chars.rs
+++ b/compiler/rustc_parse/src/lexer/unicode_chars.rs
@@ -4,7 +4,7 @@
 use rustc_span::symbol::kw;
 use rustc_span::{BytePos, Pos, Span};
 
-use super::StringReader;
+use super::Lexer;
 use crate::errors::TokenSubstitution;
 use crate::token::{self, Delimiter};
 
@@ -338,7 +338,7 @@ const ASCII_ARRAY: &[(&str, &str, Option<token::TokenKind>)] = &[
 ];
 
 pub(super) fn check_for_substitution(
-    reader: &StringReader<'_, '_>,
+    lexer: &Lexer<'_, '_>,
     pos: BytePos,
     ch: char,
     count: usize,
@@ -351,11 +351,11 @@ pub(super) fn check_for_substitution(
 
     let Some((_, ascii_name, token)) = ASCII_ARRAY.iter().find(|&&(s, _, _)| s == ascii_str) else {
         let msg = format!("substitution character not found for '{ch}'");
-        reader.dcx().span_bug(span, msg);
+        lexer.dcx().span_bug(span, msg);
     };
 
     // special help suggestion for "directed" double quotes
-    let sugg = if let Some(s) = peek_delimited(&reader.src[reader.src_index(pos)..], '“', '”') {
+    let sugg = if let Some(s) = peek_delimited(&lexer.src[lexer.src_index(pos)..], '“', '”') {
         let span = Span::with_root_ctxt(
             pos,
             pos + Pos::from_usize('“'.len_utf8() + s.len() + '”'.len_utf8()),

From 593cf680aa6578d48998dac05532d76dfcad07ac Mon Sep 17 00:00:00 2001
From: Nicholas Nethercote <n.nethercote@gmail.com>
Date: Fri, 15 Nov 2024 10:01:22 +1100
Subject: [PATCH 17/38] Split `Lexer::bump`.

It has two different ways of being called.
---
 compiler/rustc_parse/src/lexer/tokentrees.rs | 34 ++++++++++++++++----
 1 file changed, 27 insertions(+), 7 deletions(-)

diff --git a/compiler/rustc_parse/src/lexer/tokentrees.rs b/compiler/rustc_parse/src/lexer/tokentrees.rs
index fab92aff74011..c6c9eb3b0b263 100644
--- a/compiler/rustc_parse/src/lexer/tokentrees.rs
+++ b/compiler/rustc_parse/src/lexer/tokentrees.rs
@@ -16,7 +16,7 @@ impl<'psess, 'src> Lexer<'psess, 'src> {
         is_delimited: bool,
     ) -> (Spacing, TokenStream, Result<(), Vec<PErr<'psess>>>) {
         // Move past the opening delimiter.
-        let open_spacing = self.bump(false).1;
+        let open_spacing = self.bump_minimal();
 
         let mut buf = Vec::new();
         loop {
@@ -49,7 +49,7 @@ impl<'psess, 'src> Lexer<'psess, 'src> {
                 }
                 _ => {
                     // Get the next normal token.
-                    let (this_tok, this_spacing) = self.bump(true);
+                    let (this_tok, this_spacing) = self.bump();
                     buf.push(TokenTree::Token(this_tok, this_spacing));
                 }
             }
@@ -138,7 +138,7 @@ impl<'psess, 'src> Lexer<'psess, 'src> {
                 }
 
                 // Move past the closing delimiter.
-                self.bump(false).1
+                self.bump_minimal()
             }
             // Incorrect delimiter.
             token::CloseDelim(close_delim) => {
@@ -181,7 +181,7 @@ impl<'psess, 'src> Lexer<'psess, 'src> {
                 //     bar(baz(
                 // }  // Incorrect delimiter but matches the earlier `{`
                 if !self.diag_info.open_braces.iter().any(|&(b, _)| b == close_delim) {
-                    self.bump(false).1
+                    self.bump_minimal()
                 } else {
                     // The choice of value here doesn't matter.
                     Spacing::Alone
@@ -203,14 +203,14 @@ impl<'psess, 'src> Lexer<'psess, 'src> {
     }
 
     // Move on to the next token, returning the current token and its spacing.
-    // Will glue adjacent single-char tokens together if `glue` is set.
-    fn bump(&mut self, glue: bool) -> (Token, Spacing) {
+    // Will glue adjacent single-char tokens together.
+    fn bump(&mut self) -> (Token, Spacing) {
         let (this_spacing, next_tok) = loop {
             let (next_tok, is_next_tok_preceded_by_whitespace) = self.next_token_from_cursor();
 
             if is_next_tok_preceded_by_whitespace {
                 break (Spacing::Alone, next_tok);
-            } else if glue && let Some(glued) = self.token.glue(&next_tok) {
+            } else if let Some(glued) = self.token.glue(&next_tok) {
                 self.token = glued;
             } else {
                 let this_spacing = if next_tok.is_punct() {
@@ -227,6 +227,26 @@ impl<'psess, 'src> Lexer<'psess, 'src> {
         (this_tok, this_spacing)
     }
 
+    // Cut-down version of `bump` used when the token kind is known in advance.
+    fn bump_minimal(&mut self) -> Spacing {
+        let (next_tok, is_next_tok_preceded_by_whitespace) = self.next_token_from_cursor();
+
+        let this_spacing = if is_next_tok_preceded_by_whitespace {
+            Spacing::Alone
+        } else {
+            if next_tok.is_punct() {
+                Spacing::Joint
+            } else if next_tok == token::Eof {
+                Spacing::Alone
+            } else {
+                Spacing::JointHidden
+            }
+        };
+
+        self.token = next_tok;
+        this_spacing
+    }
+
     fn unclosed_delim_err(
         &mut self,
         tts: TokenStream,

From ba1a1ddc3f8c8007061c6f915448b22880da61ca Mon Sep 17 00:00:00 2001
From: Nicholas Nethercote <n.nethercote@gmail.com>
Date: Fri, 15 Nov 2024 10:05:49 +1100
Subject: [PATCH 18/38] Fix some formatting.

Must be one of those cases where the function is too long and rustfmt
bails out.
---
 compiler/rustc_parse/src/lexer/mod.rs | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/compiler/rustc_parse/src/lexer/mod.rs b/compiler/rustc_parse/src/lexer/mod.rs
index 0ef5e9ed1d4a3..202a2fbee22aa 100644
--- a/compiler/rustc_parse/src/lexer/mod.rs
+++ b/compiler/rustc_parse/src/lexer/mod.rs
@@ -240,7 +240,8 @@ impl<'psess, 'src> Lexer<'psess, 'src> {
                         .push(span);
                     token::Ident(sym, IdentIsRaw::No)
                 }
-                // split up (raw) c string literals to an ident and a string literal when edition < 2021.
+                // split up (raw) c string literals to an ident and a string literal when edition <
+                // 2021.
                 rustc_lexer::TokenKind::Literal {
                     kind: kind @ (LiteralKind::CStr { .. } | LiteralKind::RawCStr { .. }),
                     suffix_start: _,
@@ -261,7 +262,9 @@ impl<'psess, 'src> Lexer<'psess, 'src> {
                     let prefix_span = self.mk_sp(start, lit_start);
                     return (Token::new(self.ident(start), prefix_span), preceded_by_whitespace);
                 }
-                rustc_lexer::TokenKind::GuardedStrPrefix => self.maybe_report_guarded_str(start, str_before),
+                rustc_lexer::TokenKind::GuardedStrPrefix => {
+                    self.maybe_report_guarded_str(start, str_before)
+                }
                 rustc_lexer::TokenKind::Literal { kind, suffix_start } => {
                     let suffix_start = start + BytePos(suffix_start);
                     let (kind, symbol) = self.cook_lexer_literal(start, suffix_start, kind);
@@ -305,13 +308,20 @@ impl<'psess, 'src> Lexer<'psess, 'src> {
                     if prefix_span.at_least_rust_2021() {
                         let span = self.mk_sp(start, self.pos);
 
-                        let lifetime_name_without_tick = Symbol::intern(&self.str_from(ident_start));
+                        let lifetime_name_without_tick =
+                            Symbol::intern(&self.str_from(ident_start));
                         if !lifetime_name_without_tick.can_be_raw() {
-                            self.dcx().emit_err(errors::CannotBeRawLifetime { span, ident: lifetime_name_without_tick });
+                            self.dcx().emit_err(
+                                errors::CannotBeRawLifetime {
+                                    span,
+                                    ident: lifetime_name_without_tick
+                                }
+                            );
                         }
 
                         // Put the `'` back onto the lifetime name.
-                        let mut lifetime_name = String::with_capacity(lifetime_name_without_tick.as_str().len() + 1);
+                        let mut lifetime_name =
+                            String::with_capacity(lifetime_name_without_tick.as_str().len() + 1);
                         lifetime_name.push('\'');
                         lifetime_name += lifetime_name_without_tick.as_str();
                         let sym = Symbol::intern(&lifetime_name);

From 11c96cfd94a9b24a11d20c94686929126991f8d9 Mon Sep 17 00:00:00 2001
From: Nicholas Nethercote <n.nethercote@gmail.com>
Date: Fri, 15 Nov 2024 11:00:46 +1100
Subject: [PATCH 19/38] Improve `strip_shebang` testing.

It's currently a bit ad hoc. This commit makes it more methodical, with
pairs of match/no-match tests for all the relevant cases.
---
 compiler/rustc_lexer/src/tests.rs | 72 +++++++++++++------------------
 1 file changed, 31 insertions(+), 41 deletions(-)

diff --git a/compiler/rustc_lexer/src/tests.rs b/compiler/rustc_lexer/src/tests.rs
index 556bbf1f5182e..db7225fc2a810 100644
--- a/compiler/rustc_lexer/src/tests.rs
+++ b/compiler/rustc_lexer/src/tests.rs
@@ -77,61 +77,51 @@ fn test_too_many_hashes() {
     check_raw_str(&s2, Err(RawStrError::TooManyDelimiters { found: u32::from(max_count) + 1 }));
 }
 
+// https://github.com/rust-lang/rust/issues/70528
 #[test]
 fn test_valid_shebang() {
-    // https://github.com/rust-lang/rust/issues/70528
-    let input = "#!/usr/bin/rustrun\nlet x = 5;";
-    assert_eq!(strip_shebang(input), Some(18));
-}
+    let input = "#!/bin/bash";
+    assert_eq!(strip_shebang(input), Some(input.len()));
 
-#[test]
-fn test_invalid_shebang_valid_rust_syntax() {
-    // https://github.com/rust-lang/rust/issues/70528
-    let input = "#!    [bad_attribute]";
+    let input = "#![attribute]";
     assert_eq!(strip_shebang(input), None);
-}
 
-#[test]
-fn test_shebang_second_line() {
-    // Because shebangs are interpreted by the kernel, they must be on the first line
-    let input = "\n#!/bin/bash";
+    let input = "#!    /bin/bash";
+    assert_eq!(strip_shebang(input), Some(input.len()));
+
+    let input = "#!    [attribute]";
     assert_eq!(strip_shebang(input), None);
-}
 
-#[test]
-fn test_shebang_space() {
-    let input = "#!    /bin/bash";
+    let input = "#! /* blah */  /bin/bash";
     assert_eq!(strip_shebang(input), Some(input.len()));
-}
 
-#[test]
-fn test_shebang_empty_shebang() {
-    let input = "#!    \n[attribute(foo)]";
+    let input = "#! /* blah */  [attribute]";
     assert_eq!(strip_shebang(input), None);
-}
 
-#[test]
-fn test_invalid_shebang_comment() {
-    let input = "#!//bin/ami/a/comment\n[";
-    assert_eq!(strip_shebang(input), None)
-}
+    let input = "#! // blah\n/bin/bash";
+    assert_eq!(strip_shebang(input), Some(10)); // strip up to the newline
 
-#[test]
-fn test_invalid_shebang_another_comment() {
-    let input = "#!/*bin/ami/a/comment*/\n[attribute";
-    assert_eq!(strip_shebang(input), None)
-}
+    let input = "#! // blah\n[attribute]";
+    assert_eq!(strip_shebang(input), None);
 
-#[test]
-fn test_shebang_valid_rust_after() {
-    let input = "#!/*bin/ami/a/comment*/\npub fn main() {}";
-    assert_eq!(strip_shebang(input), Some(23))
-}
+    let input = "#! /* blah\nblah\nblah */  /bin/bash";
+    assert_eq!(strip_shebang(input), Some(10));
 
-#[test]
-fn test_shebang_followed_by_attrib() {
-    let input = "#!/bin/rust-scripts\n#![allow_unused(true)]";
-    assert_eq!(strip_shebang(input), Some(19));
+    let input = "#! /* blah\nblah\nblah */  [attribute]";
+    assert_eq!(strip_shebang(input), None);
+
+    let input = "#!\n/bin/sh";
+    assert_eq!(strip_shebang(input), Some(2));
+
+    let input = "#!\n[attribute]";
+    assert_eq!(strip_shebang(input), None);
+
+    // Because shebangs are interpreted by the kernel, they must be on the first line
+    let input = "\n#!/bin/bash";
+    assert_eq!(strip_shebang(input), None);
+
+    let input = "\n#![attribute]";
+    assert_eq!(strip_shebang(input), None);
 }
 
 fn check_lexing(src: &str, expect: Expect) {

From 4cd2840f003a1aa29da7e688043b954b4659b2ca Mon Sep 17 00:00:00 2001
From: Nicholas Nethercote <n.nethercote@gmail.com>
Date: Fri, 15 Nov 2024 14:01:53 +1100
Subject: [PATCH 20/38] Clean up `c_or_byte_string`.

- Rename a misleading local `mk_kind` as `single_quoted`.
- Use `fn` for all three arguments, for consistency.
---
 compiler/rustc_lexer/src/lib.rs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/compiler/rustc_lexer/src/lib.rs b/compiler/rustc_lexer/src/lib.rs
index bcb103957badf..b584e7afd98fa 100644
--- a/compiler/rustc_lexer/src/lib.rs
+++ b/compiler/rustc_lexer/src/lib.rs
@@ -566,19 +566,19 @@ impl Cursor<'_> {
 
     fn c_or_byte_string(
         &mut self,
-        mk_kind: impl FnOnce(bool) -> LiteralKind,
-        mk_kind_raw: impl FnOnce(Option<u8>) -> LiteralKind,
+        mk_kind: fn(bool) -> LiteralKind,
+        mk_kind_raw: fn(Option<u8>) -> LiteralKind,
         single_quoted: Option<fn(bool) -> LiteralKind>,
     ) -> TokenKind {
         match (self.first(), self.second(), single_quoted) {
-            ('\'', _, Some(mk_kind)) => {
+            ('\'', _, Some(single_quoted)) => {
                 self.bump();
                 let terminated = self.single_quoted_string();
                 let suffix_start = self.pos_within_token();
                 if terminated {
                     self.eat_literal_suffix();
                 }
-                let kind = mk_kind(terminated);
+                let kind = single_quoted(terminated);
                 Literal { kind, suffix_start }
             }
             ('"', _, _) => {

From 16a39bb7ca7d2af14069deef36291ca1c41b4bb0 Mon Sep 17 00:00:00 2001
From: Nicholas Nethercote <n.nethercote@gmail.com>
Date: Fri, 15 Nov 2024 14:54:15 +1100
Subject: [PATCH 21/38] Streamline `lex_token_trees` error handling.

- Use iterators instead of `for` loops.
- Use `if`/`else` instead of `match`.
---
 compiler/rustc_parse/src/lexer/mod.rs | 34 +++++++++++----------------
 1 file changed, 14 insertions(+), 20 deletions(-)

diff --git a/compiler/rustc_parse/src/lexer/mod.rs b/compiler/rustc_parse/src/lexer/mod.rs
index 202a2fbee22aa..8db3b174a89fc 100644
--- a/compiler/rustc_parse/src/lexer/mod.rs
+++ b/compiler/rustc_parse/src/lexer/mod.rs
@@ -72,27 +72,21 @@ pub(crate) fn lex_token_trees<'psess, 'src>(
     let (_open_spacing, stream, res) = lexer.lex_token_trees(/* is_delimited */ false);
     let unmatched_delims = lexer.diag_info.unmatched_delims;
 
-    match res {
-        Ok(()) if unmatched_delims.is_empty() => Ok(stream),
-        _ => {
-            // Return error if there are unmatched delimiters or unclosed delimiters.
-            // We emit delimiter mismatch errors first, then emit the unclosing delimiter mismatch
-            // because the delimiter mismatch is more likely to be the root cause of error
-
-            let mut buffer = Vec::with_capacity(1);
-            for unmatched in unmatched_delims {
-                if let Some(err) = make_unclosed_delims_error(unmatched, psess) {
-                    buffer.push(err);
-                }
-            }
-            if let Err(errs) = res {
-                // Add unclosing delimiter or diff marker errors
-                for err in errs {
-                    buffer.push(err);
-                }
-            }
-            Err(buffer)
+    if res.is_ok() && unmatched_delims.is_empty() {
+        Ok(stream)
+    } else {
+        // Return error if there are unmatched delimiters or unclosed delimiters.
+        // We emit delimiter mismatch errors first, then emit the unclosing delimiter mismatch
+        // because the delimiter mismatch is more likely to be the root cause of error
+        let mut buffer: Vec<_> = unmatched_delims
+            .into_iter()
+            .filter_map(|unmatched_delim| make_unclosed_delims_error(unmatched_delim, psess))
+            .collect();
+        if let Err(errs) = res {
+            // Add unclosing delimiter or diff marker errors
+            buffer.extend(errs);
         }
+        Err(buffer)
     }
 }
 

From c9b56b9694c57dcf41a148e73384702f103b137f Mon Sep 17 00:00:00 2001
From: Ralf Jung <post@ralfj.de>
Date: Mon, 25 Nov 2024 08:00:22 +0100
Subject: [PATCH 22/38] miri: disable test_downgrade_observe test on macOS

---
 library/std/src/sync/rwlock/tests.rs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/library/std/src/sync/rwlock/tests.rs b/library/std/src/sync/rwlock/tests.rs
index 29cad4400f189..48d442921f7fc 100644
--- a/library/std/src/sync/rwlock/tests.rs
+++ b/library/std/src/sync/rwlock/tests.rs
@@ -511,12 +511,15 @@ fn test_downgrade_basic() {
 }
 
 #[test]
+// FIXME: On macOS we use a provenance-incorrect implementation and Miri catches that issue.
+// See <https://github.com/rust-lang/rust/issues/121950> for details.
+#[cfg_attr(all(miri, target_os = "macos"), ignore)]
 fn test_downgrade_observe() {
     // Taken from the test `test_rwlock_downgrade` from:
     // https://github.com/Amanieu/parking_lot/blob/master/src/rwlock.rs
 
     const W: usize = 20;
-    const N: usize = 100;
+    const N: usize = if cfg!(miri) { 40 } else { 100 };
 
     // This test spawns `W` writer threads, where each will increment a counter `N` times, ensuring
     // that the value they wrote has not changed after downgrading.

From 4a230bba746bafb0c152ee08a759990e6ed6a008 Mon Sep 17 00:00:00 2001
From: Chayim Refael Friedman <chayimfr@gmail.com>
Date: Sun, 17 Nov 2024 21:26:15 +0200
Subject: [PATCH 23/38] Support ranges in `<[T]>::get_many_mut()`

I implemented that with a separate trait and not within `SliceIndex`, because doing that via `SliceIndex` requires adding support for range types that are (almost) always overlapping e.g. `RangeFrom`, and also adding fake support code for `impl SliceIndex<str>`.

An inconvenience that I ran into was that slice indexing takes the index by value, but I only have it by reference. I could change slice indexing to take by ref, but this is pretty much the hottest code ever so I'm afraid to touch it. Instead I added a requirement for `Clone` (which all index types implement anyway) and cloned. This is an internal requirement the user won't see and the clone should always be optimized away.

I also implemented `Clone`, `PartialEq` and `Eq` for the error type, since I noticed it does not do that when writing the tests and other errors in std seem to implement them. I didn't implement `Copy` because maybe we will want to put something non-`Copy` there.
---
 library/core/src/slice/mod.rs | 198 ++++++++++++++++++++++++++++++----
 library/core/tests/slice.rs   |  70 +++++++++++-
 2 files changed, 249 insertions(+), 19 deletions(-)

diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs
index ef52cc441268a..2fca2ca05efa2 100644
--- a/library/core/src/slice/mod.rs
+++ b/library/core/src/slice/mod.rs
@@ -10,10 +10,10 @@ use crate::cmp::Ordering::{self, Equal, Greater, Less};
 use crate::intrinsics::{exact_div, select_unpredictable, unchecked_sub};
 use crate::mem::{self, SizedTypeProperties};
 use crate::num::NonZero;
-use crate::ops::{Bound, OneSidedRange, Range, RangeBounds};
+use crate::ops::{Bound, OneSidedRange, Range, RangeBounds, RangeInclusive};
 use crate::simd::{self, Simd};
 use crate::ub_checks::assert_unsafe_precondition;
-use crate::{fmt, hint, ptr, slice};
+use crate::{fmt, hint, ptr, range, slice};
 
 #[unstable(
     feature = "slice_internals",
@@ -4467,6 +4467,12 @@ impl<T> [T] {
 
     /// Returns mutable references to many indices at once, without doing any checks.
     ///
+    /// An index can be either a `usize`, a [`Range`] or a [`RangeInclusive`]. Note
+    /// that this method takes an array, so all indices must be of the same type.
+    /// If passed an array of `usize`s this method gives back an array of mutable references
+    /// to single elements, while if passed an array of ranges it gives back an array of
+    /// mutable references to slices.
+    ///
     /// For a safe alternative see [`get_many_mut`].
     ///
     /// # Safety
@@ -4487,30 +4493,49 @@ impl<T> [T] {
     ///     *b *= 100;
     /// }
     /// assert_eq!(x, &[10, 2, 400]);
+    ///
+    /// unsafe {
+    ///     let [a, b] = x.get_many_unchecked_mut([0..1, 1..3]);
+    ///     a[0] = 8;
+    ///     b[0] = 88;
+    ///     b[1] = 888;
+    /// }
+    /// assert_eq!(x, &[8, 88, 888]);
+    ///
+    /// unsafe {
+    ///     let [a, b] = x.get_many_unchecked_mut([1..=2, 0..=0]);
+    ///     a[0] = 11;
+    ///     a[1] = 111;
+    ///     b[0] = 1;
+    /// }
+    /// assert_eq!(x, &[1, 11, 111]);
     /// ```
     ///
     /// [`get_many_mut`]: slice::get_many_mut
     /// [undefined behavior]: https://doc.rust-lang.org/reference/behavior-considered-undefined.html
     #[unstable(feature = "get_many_mut", issue = "104642")]
     #[inline]
-    pub unsafe fn get_many_unchecked_mut<const N: usize>(
+    pub unsafe fn get_many_unchecked_mut<I, const N: usize>(
         &mut self,
-        indices: [usize; N],
-    ) -> [&mut T; N] {
+        indices: [I; N],
+    ) -> [&mut I::Output; N]
+    where
+        I: GetManyMutIndex + SliceIndex<Self>,
+    {
         // NB: This implementation is written as it is because any variation of
         // `indices.map(|i| self.get_unchecked_mut(i))` would make miri unhappy,
         // or generate worse code otherwise. This is also why we need to go
         // through a raw pointer here.
         let slice: *mut [T] = self;
-        let mut arr: mem::MaybeUninit<[&mut T; N]> = mem::MaybeUninit::uninit();
+        let mut arr: mem::MaybeUninit<[&mut I::Output; N]> = mem::MaybeUninit::uninit();
         let arr_ptr = arr.as_mut_ptr();
 
         // SAFETY: We expect `indices` to contain disjunct values that are
         // in bounds of `self`.
         unsafe {
             for i in 0..N {
-                let idx = *indices.get_unchecked(i);
-                *(*arr_ptr).get_unchecked_mut(i) = &mut *slice.get_unchecked_mut(idx);
+                let idx = indices.get_unchecked(i).clone();
+                arr_ptr.cast::<&mut I::Output>().add(i).write(&mut *slice.get_unchecked_mut(idx));
             }
             arr.assume_init()
         }
@@ -4518,8 +4543,18 @@ impl<T> [T] {
 
     /// Returns mutable references to many indices at once.
     ///
-    /// Returns an error if any index is out-of-bounds, or if the same index was
-    /// passed more than once.
+    /// An index can be either a `usize`, a [`Range`] or a [`RangeInclusive`]. Note
+    /// that this method takes an array, so all indices must be of the same type.
+    /// If passed an array of `usize`s this method gives back an array of mutable references
+    /// to single elements, while if passed an array of ranges it gives back an array of
+    /// mutable references to slices.
+    ///
+    /// Returns an error if any index is out-of-bounds, or if there are overlapping indices.
+    /// An empty range is not considered to overlap if it is located at the beginning or at
+    /// the end of another range, but is considered to overlap if it is located in the middle.
+    ///
+    /// This method does a O(n^2) check to check that there are no overlapping indices, so be careful
+    /// when passing many indices.
     ///
     /// # Examples
     ///
@@ -4532,13 +4567,30 @@ impl<T> [T] {
     ///     *b = 612;
     /// }
     /// assert_eq!(v, &[413, 2, 612]);
+    ///
+    /// if let Ok([a, b]) = v.get_many_mut([0..1, 1..3]) {
+    ///     a[0] = 8;
+    ///     b[0] = 88;
+    ///     b[1] = 888;
+    /// }
+    /// assert_eq!(v, &[8, 88, 888]);
+    ///
+    /// if let Ok([a, b]) = v.get_many_mut([1..=2, 0..=0]) {
+    ///     a[0] = 11;
+    ///     a[1] = 111;
+    ///     b[0] = 1;
+    /// }
+    /// assert_eq!(v, &[1, 11, 111]);
     /// ```
     #[unstable(feature = "get_many_mut", issue = "104642")]
     #[inline]
-    pub fn get_many_mut<const N: usize>(
+    pub fn get_many_mut<I, const N: usize>(
         &mut self,
-        indices: [usize; N],
-    ) -> Result<[&mut T; N], GetManyMutError<N>> {
+        indices: [I; N],
+    ) -> Result<[&mut I::Output; N], GetManyMutError<N>>
+    where
+        I: GetManyMutIndex + SliceIndex<Self>,
+    {
         if !get_many_check_valid(&indices, self.len()) {
             return Err(GetManyMutError { _private: () });
         }
@@ -4883,14 +4935,15 @@ impl<T, const N: usize> SlicePattern for [T; N] {
 ///
 /// This will do `binomial(N + 1, 2) = N * (N + 1) / 2 = 0, 1, 3, 6, 10, ..`
 /// comparison operations.
-fn get_many_check_valid<const N: usize>(indices: &[usize; N], len: usize) -> bool {
+#[inline]
+fn get_many_check_valid<I: GetManyMutIndex, const N: usize>(indices: &[I; N], len: usize) -> bool {
     // NB: The optimizer should inline the loops into a sequence
     // of instructions without additional branching.
     let mut valid = true;
-    for (i, &idx) in indices.iter().enumerate() {
-        valid &= idx < len;
-        for &idx2 in &indices[..i] {
-            valid &= idx != idx2;
+    for (i, idx) in indices.iter().enumerate() {
+        valid &= idx.is_in_bounds(len);
+        for idx2 in &indices[..i] {
+            valid &= !idx.is_overlapping(idx2);
         }
     }
     valid
@@ -4914,6 +4967,7 @@ fn get_many_check_valid<const N: usize>(indices: &[usize; N], len: usize) -> boo
 #[unstable(feature = "get_many_mut", issue = "104642")]
 // NB: The N here is there to be forward-compatible with adding more details
 // to the error type at a later point
+#[derive(Clone, PartialEq, Eq)]
 pub struct GetManyMutError<const N: usize> {
     _private: (),
 }
@@ -4931,3 +4985,111 @@ impl<const N: usize> fmt::Display for GetManyMutError<N> {
         fmt::Display::fmt("an index is out of bounds or appeared multiple times in the array", f)
     }
 }
+
+mod private_get_many_mut_index {
+    use super::{Range, RangeInclusive, range};
+
+    #[unstable(feature = "get_many_mut_helpers", issue = "none")]
+    pub trait Sealed {}
+
+    #[unstable(feature = "get_many_mut_helpers", issue = "none")]
+    impl Sealed for usize {}
+    #[unstable(feature = "get_many_mut_helpers", issue = "none")]
+    impl Sealed for Range<usize> {}
+    #[unstable(feature = "get_many_mut_helpers", issue = "none")]
+    impl Sealed for RangeInclusive<usize> {}
+    #[unstable(feature = "get_many_mut_helpers", issue = "none")]
+    impl Sealed for range::Range<usize> {}
+    #[unstable(feature = "get_many_mut_helpers", issue = "none")]
+    impl Sealed for range::RangeInclusive<usize> {}
+}
+
+/// A helper trait for `<[T]>::get_many_mut()`.
+///
+/// # Safety
+///
+/// If `is_in_bounds()` returns `true` and `is_overlapping()` returns `false`,
+/// it must be safe to index the slice with the indices.
+#[unstable(feature = "get_many_mut_helpers", issue = "none")]
+pub unsafe trait GetManyMutIndex: Clone + private_get_many_mut_index::Sealed {
+    /// Returns `true` if `self` is in bounds for `len` slice elements.
+    #[unstable(feature = "get_many_mut_helpers", issue = "none")]
+    fn is_in_bounds(&self, len: usize) -> bool;
+
+    /// Returns `true` if `self` overlaps with `other`.
+    ///
+    /// Note that we don't consider zero-length ranges to overlap at the beginning or the end,
+    /// but do consider them to overlap in the middle.
+    #[unstable(feature = "get_many_mut_helpers", issue = "none")]
+    fn is_overlapping(&self, other: &Self) -> bool;
+}
+
+#[unstable(feature = "get_many_mut_helpers", issue = "none")]
+// SAFETY: We implement `is_in_bounds()` and `is_overlapping()` correctly.
+unsafe impl GetManyMutIndex for usize {
+    #[inline]
+    fn is_in_bounds(&self, len: usize) -> bool {
+        *self < len
+    }
+
+    #[inline]
+    fn is_overlapping(&self, other: &Self) -> bool {
+        *self == *other
+    }
+}
+
+#[unstable(feature = "get_many_mut_helpers", issue = "none")]
+// SAFETY: We implement `is_in_bounds()` and `is_overlapping()` correctly.
+unsafe impl GetManyMutIndex for Range<usize> {
+    #[inline]
+    fn is_in_bounds(&self, len: usize) -> bool {
+        (self.start <= self.end) & (self.end <= len)
+    }
+
+    #[inline]
+    fn is_overlapping(&self, other: &Self) -> bool {
+        (self.start < other.end) & (other.start < self.end)
+    }
+}
+
+#[unstable(feature = "get_many_mut_helpers", issue = "none")]
+// SAFETY: We implement `is_in_bounds()` and `is_overlapping()` correctly.
+unsafe impl GetManyMutIndex for RangeInclusive<usize> {
+    #[inline]
+    fn is_in_bounds(&self, len: usize) -> bool {
+        (self.start <= self.end) & (self.end < len)
+    }
+
+    #[inline]
+    fn is_overlapping(&self, other: &Self) -> bool {
+        (self.start <= other.end) & (other.start <= self.end)
+    }
+}
+
+#[unstable(feature = "get_many_mut_helpers", issue = "none")]
+// SAFETY: We implement `is_in_bounds()` and `is_overlapping()` correctly.
+unsafe impl GetManyMutIndex for range::Range<usize> {
+    #[inline]
+    fn is_in_bounds(&self, len: usize) -> bool {
+        Range::from(*self).is_in_bounds(len)
+    }
+
+    #[inline]
+    fn is_overlapping(&self, other: &Self) -> bool {
+        Range::from(*self).is_overlapping(&Range::from(*other))
+    }
+}
+
+#[unstable(feature = "get_many_mut_helpers", issue = "none")]
+// SAFETY: We implement `is_in_bounds()` and `is_overlapping()` correctly.
+unsafe impl GetManyMutIndex for range::RangeInclusive<usize> {
+    #[inline]
+    fn is_in_bounds(&self, len: usize) -> bool {
+        RangeInclusive::from(*self).is_in_bounds(len)
+    }
+
+    #[inline]
+    fn is_overlapping(&self, other: &Self) -> bool {
+        RangeInclusive::from(*self).is_overlapping(&RangeInclusive::from(*other))
+    }
+}
diff --git a/library/core/tests/slice.rs b/library/core/tests/slice.rs
index 9ae2bcc852649..510dd4967c961 100644
--- a/library/core/tests/slice.rs
+++ b/library/core/tests/slice.rs
@@ -2,6 +2,7 @@ use core::cell::Cell;
 use core::cmp::Ordering;
 use core::mem::MaybeUninit;
 use core::num::NonZero;
+use core::ops::{Range, RangeInclusive};
 use core::slice;
 
 #[test]
@@ -2553,6 +2554,14 @@ fn test_get_many_mut_normal_2() {
     *a += 10;
     *b += 100;
     assert_eq!(v, vec![101, 2, 3, 14, 5]);
+
+    let [a, b] = v.get_many_mut([0..=1, 2..=2]).unwrap();
+    assert_eq!(a, &mut [101, 2][..]);
+    assert_eq!(b, &mut [3][..]);
+    a[0] += 10;
+    a[1] += 20;
+    b[0] += 100;
+    assert_eq!(v, vec![111, 22, 103, 14, 5]);
 }
 
 #[test]
@@ -2563,12 +2572,23 @@ fn test_get_many_mut_normal_3() {
     *b += 100;
     *c += 1000;
     assert_eq!(v, vec![11, 2, 1003, 4, 105]);
+
+    let [a, b, c] = v.get_many_mut([0..1, 4..5, 1..4]).unwrap();
+    assert_eq!(a, &mut [11][..]);
+    assert_eq!(b, &mut [105][..]);
+    assert_eq!(c, &mut [2, 1003, 4][..]);
+    a[0] += 10;
+    b[0] += 100;
+    c[0] += 1000;
+    assert_eq!(v, vec![21, 1002, 1003, 4, 205]);
 }
 
 #[test]
 fn test_get_many_mut_empty() {
     let mut v = vec![1, 2, 3, 4, 5];
-    let [] = v.get_many_mut([]).unwrap();
+    let [] = v.get_many_mut::<usize, 0>([]).unwrap();
+    let [] = v.get_many_mut::<RangeInclusive<usize>, 0>([]).unwrap();
+    let [] = v.get_many_mut::<Range<usize>, 0>([]).unwrap();
     assert_eq!(v, vec![1, 2, 3, 4, 5]);
 }
 
@@ -2606,6 +2626,54 @@ fn test_get_many_mut_duplicate() {
     assert!(v.get_many_mut([1, 3, 3, 4]).is_err());
 }
 
+#[test]
+fn test_get_many_mut_range_oob() {
+    let mut v = vec![1, 2, 3, 4, 5];
+    assert!(v.get_many_mut([0..6]).is_err());
+    assert!(v.get_many_mut([5..6]).is_err());
+    assert!(v.get_many_mut([6..6]).is_err());
+    assert!(v.get_many_mut([0..=5]).is_err());
+    assert!(v.get_many_mut([0..=6]).is_err());
+    assert!(v.get_many_mut([5..=5]).is_err());
+}
+
+#[test]
+fn test_get_many_mut_range_overlapping() {
+    let mut v = vec![1, 2, 3, 4, 5];
+    assert!(v.get_many_mut([0..1, 0..2]).is_err());
+    assert!(v.get_many_mut([0..1, 1..2, 0..1]).is_err());
+    assert!(v.get_many_mut([0..3, 1..1]).is_err());
+    assert!(v.get_many_mut([0..3, 1..2]).is_err());
+    assert!(v.get_many_mut([0..=0, 2..=2, 0..=1]).is_err());
+    assert!(v.get_many_mut([0..=4, 0..=0]).is_err());
+    assert!(v.get_many_mut([4..=4, 0..=0, 3..=4]).is_err());
+}
+
+#[test]
+fn test_get_many_mut_range_empty_at_edge() {
+    let mut v = vec![1, 2, 3, 4, 5];
+    assert_eq!(
+        v.get_many_mut([0..0, 0..5, 5..5]),
+        Ok([&mut [][..], &mut [1, 2, 3, 4, 5], &mut []]),
+    );
+    assert_eq!(
+        v.get_many_mut([0..0, 0..1, 1..1, 1..2, 2..2, 2..3, 3..3, 3..4, 4..4, 4..5, 5..5]),
+        Ok([
+            &mut [][..],
+            &mut [1],
+            &mut [],
+            &mut [2],
+            &mut [],
+            &mut [3],
+            &mut [],
+            &mut [4],
+            &mut [],
+            &mut [5],
+            &mut [],
+        ]),
+    );
+}
+
 #[test]
 fn test_slice_from_raw_parts_in_const() {
     static FANCY: i32 = 4;

From e8796c452dcb682c485c1d0e2bfe6298623f7f51 Mon Sep 17 00:00:00 2001
From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com>
Date: Mon, 25 Nov 2024 10:00:09 +0100
Subject: [PATCH 24/38] CI: split x86_64-msvc-ext job

---
 src/ci/github-actions/jobs.yml | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml
index 9a51a3f4268c5..69d2c1ae871fe 100644
--- a/src/ci/github-actions/jobs.yml
+++ b/src/ci/github-actions/jobs.yml
@@ -384,13 +384,12 @@ auto:
       SCRIPT: make ci-msvc
     <<: *job-windows-8c
 
-  - image: x86_64-msvc-ext
+  # x86_64-msvc-ext is split into multiple jobs to run tests in parallel.
+  - image: x86_64-msvc-ext1
     env:
-      SCRIPT: python x.py --stage 2 test src/tools/cargotest src/tools/cargo && src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
-      HOST_TARGET: x86_64-pc-windows-msvc
-      RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-lld --save-toolstates=/tmp/toolstate/toolstates.json
-      DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
-    <<: *job-windows-8c
+      SCRIPT: python x.py --stage 2 test src/tools/cargotest src/tools/cargo
+      RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-lld
+    <<: *job-windows
 
   # Temporary builder to workaround CI issues
   # See <https://github.com/rust-lang/rust/issues/127883>
@@ -406,6 +405,15 @@ auto:
       RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-lld
     <<: *job-windows
 
+  # Run `checktools.sh` and upload the toolstate file.
+  - image: x86_64-msvc-ext3
+    env:
+      SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
+      HOST_TARGET: x86_64-pc-windows-msvc
+      RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-lld --save-toolstates=/tmp/toolstate/toolstates.json
+      DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
+    <<: *job-windows
+
   # 32/64-bit MinGW builds.
   #
   # We are using MinGW with POSIX threads since LLVM requires

From 4301d0266d20d391e5b389e2b37bbe133e3f4e1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Le=C3=B3n=20Orell=20Valerian=20Liehr?= <me@fmease.dev>
Date: Mon, 25 Nov 2024 12:16:36 +0100
Subject: [PATCH 25/38] Remove dead code stemming from the old effects
 desugaring (II)

---
 compiler/rustc_ast_lowering/src/lib.rs | 18 +++---------------
 compiler/rustc_hir/src/hir.rs          | 11 +----------
 src/librustdoc/clean/mod.rs            |  8 --------
 3 files changed, 4 insertions(+), 33 deletions(-)

diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs
index 0b2969a49ba88..dae816663e00e 100644
--- a/compiler/rustc_ast_lowering/src/lib.rs
+++ b/compiler/rustc_ast_lowering/src/lib.rs
@@ -2117,11 +2117,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
             hir::ConstArgKind::Anon(ct)
         };
 
-        self.arena.alloc(hir::ConstArg {
-            hir_id: self.next_id(),
-            kind: ct_kind,
-            is_desugared_from_effects: false,
-        })
+        self.arena.alloc(hir::ConstArg { hir_id: self.next_id(), kind: ct_kind })
     }
 
     /// See [`hir::ConstArg`] for when to use this function vs
@@ -2163,19 +2159,11 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
                 None,
             );
 
-            return ConstArg {
-                hir_id: self.next_id(),
-                kind: hir::ConstArgKind::Path(qpath),
-                is_desugared_from_effects: false,
-            };
+            return ConstArg { hir_id: self.next_id(), kind: hir::ConstArgKind::Path(qpath) };
         }
 
         let lowered_anon = self.lower_anon_const_to_anon_const(anon);
-        ConstArg {
-            hir_id: self.next_id(),
-            kind: hir::ConstArgKind::Anon(lowered_anon),
-            is_desugared_from_effects: false,
-        }
+        ConstArg { hir_id: self.next_id(), kind: hir::ConstArgKind::Anon(lowered_anon) }
     }
 
     /// See [`hir::ConstArg`] for when to use this function vs
diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs
index 16e53a27128b8..e371f5b9da0d1 100644
--- a/compiler/rustc_hir/src/hir.rs
+++ b/compiler/rustc_hir/src/hir.rs
@@ -261,8 +261,6 @@ pub struct ConstArg<'hir> {
     #[stable_hasher(ignore)]
     pub hir_id: HirId,
     pub kind: ConstArgKind<'hir>,
-    /// Indicates whether this comes from a `~const` desugaring.
-    pub is_desugared_from_effects: bool,
 }
 
 impl<'hir> ConstArg<'hir> {
@@ -462,14 +460,7 @@ impl<'hir> GenericArgs<'hir> {
     /// This function returns the number of type and const generic params.
     /// It should only be used for diagnostics.
     pub fn num_generic_params(&self) -> usize {
-        self.args
-            .iter()
-            .filter(|arg| match arg {
-                GenericArg::Lifetime(_)
-                | GenericArg::Const(ConstArg { is_desugared_from_effects: true, .. }) => false,
-                _ => true,
-            })
-            .count()
+        self.args.iter().filter(|arg| !matches!(arg, GenericArg::Lifetime(_))).count()
     }
 
     /// The span encompassing the arguments and constraints[^1] inside the surrounding brackets.
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index 031696d445d22..38b17f8d7ffcd 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -2516,14 +2516,6 @@ fn clean_generic_args<'tcx>(
                     }
                     hir::GenericArg::Lifetime(_) => GenericArg::Lifetime(Lifetime::elided()),
                     hir::GenericArg::Type(ty) => GenericArg::Type(clean_ty(ty, cx)),
-                    // Checking for `is_desugared_from_effects` on the `AnonConst` not only accounts for the case
-                    // where the argument is `host` but for all possible cases (e.g., `true`, `false`).
-                    hir::GenericArg::Const(hir::ConstArg {
-                        is_desugared_from_effects: true,
-                        ..
-                    }) => {
-                        return None;
-                    }
                     hir::GenericArg::Const(ct) => GenericArg::Const(Box::new(clean_const(ct, cx))),
                     hir::GenericArg::Infer(_inf) => GenericArg::Infer,
                 })

From bf7d909214426f4ed769a29f1933ea60b43e8c3e Mon Sep 17 00:00:00 2001
From: onur-ozkan <work@onurozkan.dev>
Date: Mon, 25 Nov 2024 16:19:21 +0300
Subject: [PATCH 26/38] remove "onur-ozkan" from  users_on_vacation

Signed-off-by: onur-ozkan <work@onurozkan.dev>
---
 triagebot.toml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/triagebot.toml b/triagebot.toml
index 690d2c7566e3a..47b968240984d 100644
--- a/triagebot.toml
+++ b/triagebot.toml
@@ -997,7 +997,6 @@ contributing_url = "https://rustc-dev-guide.rust-lang.org/getting-started.html"
 users_on_vacation = [
     "jyn514",
     "oli-obk",
-    "onur-ozkan",
 ]
 
 [assign.adhoc_groups]

From d39afacbdfbc4fb1f8a6dcdb4af7c357bae8f7db Mon Sep 17 00:00:00 2001
From: joboet <jonasboettiger@icloud.com>
Date: Mon, 25 Nov 2024 13:41:30 +0100
Subject: [PATCH 27/38] std: expose `const_io_error!` as `const_error!`

ACP: rust-lang/libs-team#205
Tracking issue: #133448
---
 library/std/src/io/error.rs | 49 +++++++++++++++++++++++--------------
 library/std/src/io/mod.rs   |  7 ++++--
 library/std/src/lib.rs      |  1 +
 3 files changed, 37 insertions(+), 20 deletions(-)

diff --git a/library/std/src/io/error.rs b/library/std/src/io/error.rs
index 5d7adcace5247..d98ab35a8809e 100644
--- a/library/std/src/io/error.rs
+++ b/library/std/src/io/error.rs
@@ -151,27 +151,38 @@ pub type RawOsError = sys::RawOsError;
 // (For the sake of being explicit: the alignment requirement here only matters
 // if `error/repr_bitpacked.rs` is in use — for the unpacked repr it doesn't
 // matter at all)
+#[doc(hidden)]
+#[unstable(feature = "io_const_error_internals", issue = "none")]
 #[repr(align(4))]
 #[derive(Debug)]
-pub(crate) struct SimpleMessage {
-    kind: ErrorKind,
-    message: &'static str,
-}
-
-impl SimpleMessage {
-    pub(crate) const fn new(kind: ErrorKind, message: &'static str) -> Self {
-        Self { kind, message }
-    }
+pub struct SimpleMessage {
+    pub kind: ErrorKind,
+    pub message: &'static str,
 }
 
-/// Creates and returns an `io::Error` for a given `ErrorKind` and constant
-/// message. This doesn't allocate.
-pub(crate) macro const_io_error($kind:expr, $message:expr $(,)?) {
-    $crate::io::error::Error::from_static_message({
-        const MESSAGE_DATA: $crate::io::error::SimpleMessage =
-            $crate::io::error::SimpleMessage::new($kind, $message);
-        &MESSAGE_DATA
-    })
+/// Creates a new I/O error from a known kind of error and a string literal.
+///
+/// Contrary to [`Error::new`], this macro does not allocate and can be used in
+/// `const` contexts.
+///
+/// # Example
+/// ```
+/// #![feature(io_const_error)]
+/// use std::io::{const_error, Error, ErrorKind};
+///
+/// const FAIL: Error = const_error!(ErrorKind::Unsupported, "tried something that never works");
+///
+/// fn not_here() -> Result<(), Error> {
+///     Err(FAIL)
+/// }
+/// ```
+#[rustc_macro_transparency = "semitransparent"]
+#[unstable(feature = "io_const_error", issue = "133448")]
+#[allow_internal_unstable(hint_must_use, io_const_error_internals)]
+pub macro const_error($kind:expr, $message:expr $(,)?) {
+    $crate::hint::must_use($crate::io::Error::from_static_message(
+        const { &$crate::io::SimpleMessage { kind: $kind, message: $message } },
+    ))
 }
 
 // As with `SimpleMessage`: `#[repr(align(4))]` here is just because
@@ -598,7 +609,9 @@ impl Error {
     /// This function should maybe change to `from_static_message<const MSG: &'static
     /// str>(kind: ErrorKind)` in the future, when const generics allow that.
     #[inline]
-    pub(crate) const fn from_static_message(msg: &'static SimpleMessage) -> Error {
+    #[doc(hidden)]
+    #[unstable(feature = "io_const_error_internals", issue = "none")]
+    pub const fn from_static_message(msg: &'static SimpleMessage) -> Error {
         Self { repr: Repr::new_simple_message(msg) }
     }
 
diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs
index 21e7077495450..4ffb04630061f 100644
--- a/library/std/src/io/mod.rs
+++ b/library/std/src/io/mod.rs
@@ -301,12 +301,15 @@ mod tests;
 pub use core::io::{BorrowedBuf, BorrowedCursor};
 use core::slice::memchr;
 
-pub(crate) use error::const_io_error;
-
 #[stable(feature = "bufwriter_into_parts", since = "1.56.0")]
 pub use self::buffered::WriterPanicked;
 #[unstable(feature = "raw_os_error_ty", issue = "107792")]
 pub use self::error::RawOsError;
+#[doc(hidden)]
+#[unstable(feature = "io_const_error_internals", issue = "none")]
+pub use self::error::SimpleMessage;
+#[unstable(feature = "io_const_error", issue = "133448")]
+pub use self::error::const_error;
 #[stable(feature = "is_terminal", since = "1.70.0")]
 pub use self::stdio::IsTerminal;
 pub(crate) use self::stdio::attempt_print_to_stderr;
diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs
index ee6fceb024fd7..f1eeac3354009 100644
--- a/library/std/src/lib.rs
+++ b/library/std/src/lib.rs
@@ -340,6 +340,7 @@
 #![feature(fmt_internals)]
 #![feature(hasher_prefixfree_extras)]
 #![feature(hashmap_internals)]
+#![feature(hint_must_use)]
 #![feature(ip)]
 #![feature(lazy_get)]
 #![feature(maybe_uninit_slice)]

From 57d5c6a292e05361d928fd60d54b2478fd0c4e3a Mon Sep 17 00:00:00 2001
From: joboet <jonasboettiger@icloud.com>
Date: Mon, 25 Nov 2024 13:49:25 +0100
Subject: [PATCH 28/38] std: update internal uses of `io::const_error!`

---
 library/std/src/fs.rs                         |  2 +-
 .../std/src/io/buffered/bufreader/buffer.rs   |  2 +-
 library/std/src/io/buffered/bufwriter.rs      |  4 +-
 library/std/src/io/cursor.rs                  |  4 +-
 library/std/src/io/error.rs                   | 18 +++----
 library/std/src/io/error/tests.rs             | 10 ++--
 library/std/src/io/tests.rs                   |  4 +-
 library/std/src/lib.rs                        |  1 +
 library/std/src/net/mod.rs                    |  2 +-
 library/std/src/net/udp.rs                    |  4 +-
 library/std/src/os/unix/net/addr.rs           |  8 +--
 library/std/src/os/wasi/fs.rs                 |  5 +-
 library/std/src/os/windows/io/socket.rs       |  2 +-
 library/std/src/path.rs                       |  2 +-
 .../std/src/sys/pal/common/small_c_string.rs  |  2 +-
 library/std/src/sys/pal/hermit/fs.rs          | 16 +++---
 library/std/src/sys/pal/hermit/mod.rs         |  2 +-
 library/std/src/sys/pal/hermit/net.rs         |  4 +-
 library/std/src/sys/pal/hermit/thread.rs      |  2 +-
 library/std/src/sys/pal/sgx/mod.rs            |  4 +-
 library/std/src/sys/pal/solid/fs.rs           | 13 ++---
 library/std/src/sys/pal/solid/net.rs          |  2 +-
 library/std/src/sys/pal/solid/os.rs           |  2 +-
 library/std/src/sys/pal/uefi/helpers.rs       | 28 +++++------
 library/std/src/sys/pal/uefi/mod.rs           |  2 +-
 library/std/src/sys/pal/uefi/os.rs            | 12 ++---
 library/std/src/sys/pal/uefi/process.rs       |  6 +--
 library/std/src/sys/pal/unix/fs.rs            | 26 +++++-----
 library/std/src/sys/pal/unix/l4re.rs          |  2 +-
 library/std/src/sys/pal/unix/net.rs           |  4 +-
 library/std/src/sys/pal/unix/os.rs            | 23 ++++-----
 .../sys/pal/unix/process/process_fuchsia.rs   |  8 +--
 .../src/sys/pal/unix/process/process_unix.rs  | 10 ++--
 .../sys/pal/unix/process/process_vxworks.rs   |  2 +-
 library/std/src/sys/pal/unix/thread.rs        |  4 +-
 library/std/src/sys/pal/unix/time.rs          |  2 +-
 library/std/src/sys/pal/unsupported/os.rs     |  4 +-
 library/std/src/sys/pal/wasi/fs.rs            |  7 ++-
 library/std/src/sys/pal/wasip2/net.rs         |  2 +-
 library/std/src/sys/pal/windows/args.rs       |  4 +-
 library/std/src/sys/pal/windows/fs.rs         | 20 +++-----
 library/std/src/sys/pal/windows/mod.rs        |  2 +-
 library/std/src/sys/pal/windows/net.rs        |  2 +-
 library/std/src/sys/pal/windows/process.rs    | 13 +++--
 library/std/src/sys/pal/windows/stdio.rs      |  8 +--
 library/std/src/sys/pal/xous/net/dns.rs       |  5 +-
 .../std/src/sys/pal/xous/net/tcplistener.rs   | 36 ++++++-------
 library/std/src/sys/pal/xous/net/tcpstream.rs | 46 ++++++++---------
 library/std/src/sys/pal/xous/net/udp.rs       | 50 ++++++++-----------
 library/std/src/sys/pal/zkvm/os.rs            |  4 +-
 library/std/src/sys/path/windows.rs           |  2 +-
 library/std/src/sys_common/fs.rs              |  2 +-
 library/std/src/sys_common/net.rs             |  4 +-
 53 files changed, 211 insertions(+), 244 deletions(-)

diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs
index d846a4e5f0916..2d5d869630e0e 100644
--- a/library/std/src/fs.rs
+++ b/library/std/src/fs.rs
@@ -3020,7 +3020,7 @@ impl DirBuilder {
         match path.parent() {
             Some(p) => self.create_dir_all(p)?,
             None => {
-                return Err(io::const_io_error!(
+                return Err(io::const_error!(
                     io::ErrorKind::Uncategorized,
                     "failed to create whole tree",
                 ));
diff --git a/library/std/src/io/buffered/bufreader/buffer.rs b/library/std/src/io/buffered/bufreader/buffer.rs
index 52fe49985c65a..17721090db5de 100644
--- a/library/std/src/io/buffered/bufreader/buffer.rs
+++ b/library/std/src/io/buffered/bufreader/buffer.rs
@@ -41,7 +41,7 @@ impl Buffer {
         match Box::try_new_uninit_slice(capacity) {
             Ok(buf) => Ok(Self { buf, pos: 0, filled: 0, initialized: 0 }),
             Err(_) => {
-                Err(io::const_io_error!(ErrorKind::OutOfMemory, "failed to allocate read buffer"))
+                Err(io::const_error!(ErrorKind::OutOfMemory, "failed to allocate read buffer"))
             }
         }
     }
diff --git a/library/std/src/io/buffered/bufwriter.rs b/library/std/src/io/buffered/bufwriter.rs
index c41bae2aa4e81..574eb83dc5649 100644
--- a/library/std/src/io/buffered/bufwriter.rs
+++ b/library/std/src/io/buffered/bufwriter.rs
@@ -96,7 +96,7 @@ impl<W: Write> BufWriter<W> {
 
     pub(crate) fn try_new_buffer() -> io::Result<Vec<u8>> {
         Vec::try_with_capacity(DEFAULT_BUF_SIZE).map_err(|_| {
-            io::const_io_error!(ErrorKind::OutOfMemory, "failed to allocate write buffer")
+            io::const_error!(ErrorKind::OutOfMemory, "failed to allocate write buffer")
         })
     }
 
@@ -238,7 +238,7 @@ impl<W: ?Sized + Write> BufWriter<W> {
 
             match r {
                 Ok(0) => {
-                    return Err(io::const_io_error!(
+                    return Err(io::const_error!(
                         ErrorKind::WriteZero,
                         "failed to write the buffered data",
                     ));
diff --git a/library/std/src/io/cursor.rs b/library/std/src/io/cursor.rs
index fbfdb4fa02323..b2ffeb0f95d0d 100644
--- a/library/std/src/io/cursor.rs
+++ b/library/std/src/io/cursor.rs
@@ -304,7 +304,7 @@ where
                 self.pos = n;
                 Ok(self.pos)
             }
-            None => Err(io::const_io_error!(
+            None => Err(io::const_error!(
                 ErrorKind::InvalidInput,
                 "invalid seek to a negative or overflowing position",
             )),
@@ -446,7 +446,7 @@ fn reserve_and_pad<A: Allocator>(
     buf_len: usize,
 ) -> io::Result<usize> {
     let pos: usize = (*pos_mut).try_into().map_err(|_| {
-        io::const_io_error!(
+        io::const_error!(
             ErrorKind::InvalidInput,
             "cursor position exceeds maximum possible vector length",
         )
diff --git a/library/std/src/io/error.rs b/library/std/src/io/error.rs
index d98ab35a8809e..03f38e220a581 100644
--- a/library/std/src/io/error.rs
+++ b/library/std/src/io/error.rs
@@ -76,31 +76,31 @@ impl fmt::Debug for Error {
 #[allow(dead_code)]
 impl Error {
     pub(crate) const INVALID_UTF8: Self =
-        const_io_error!(ErrorKind::InvalidData, "stream did not contain valid UTF-8");
+        const_error!(ErrorKind::InvalidData, "stream did not contain valid UTF-8");
 
     pub(crate) const READ_EXACT_EOF: Self =
-        const_io_error!(ErrorKind::UnexpectedEof, "failed to fill whole buffer");
+        const_error!(ErrorKind::UnexpectedEof, "failed to fill whole buffer");
 
-    pub(crate) const UNKNOWN_THREAD_COUNT: Self = const_io_error!(
+    pub(crate) const UNKNOWN_THREAD_COUNT: Self = const_error!(
         ErrorKind::NotFound,
         "The number of hardware threads is not known for the target platform"
     );
 
     pub(crate) const UNSUPPORTED_PLATFORM: Self =
-        const_io_error!(ErrorKind::Unsupported, "operation not supported on this platform");
+        const_error!(ErrorKind::Unsupported, "operation not supported on this platform");
 
     pub(crate) const WRITE_ALL_EOF: Self =
-        const_io_error!(ErrorKind::WriteZero, "failed to write whole buffer");
+        const_error!(ErrorKind::WriteZero, "failed to write whole buffer");
 
     pub(crate) const ZERO_TIMEOUT: Self =
-        const_io_error!(ErrorKind::InvalidInput, "cannot set a 0 duration timeout");
+        const_error!(ErrorKind::InvalidInput, "cannot set a 0 duration timeout");
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl From<alloc::ffi::NulError> for Error {
     /// Converts a [`alloc::ffi::NulError`] into a [`Error`].
     fn from(_: alloc::ffi::NulError) -> Error {
-        const_io_error!(ErrorKind::InvalidInput, "data provided contains a nul byte")
+        const_error!(ErrorKind::InvalidInput, "data provided contains a nul byte")
     }
 }
 
@@ -603,8 +603,8 @@ impl Error {
     ///
     /// This function does not allocate.
     ///
-    /// You should not use this directly, and instead use the `const_io_error!`
-    /// macro: `io::const_io_error!(ErrorKind::Something, "some_message")`.
+    /// You should not use this directly, and instead use the `const_error!`
+    /// macro: `io::const_error!(ErrorKind::Something, "some_message")`.
     ///
     /// This function should maybe change to `from_static_message<const MSG: &'static
     /// str>(kind: ErrorKind)` in the future, when const generics allow that.
diff --git a/library/std/src/io/error/tests.rs b/library/std/src/io/error/tests.rs
index 00d04984a3854..edac6563478cd 100644
--- a/library/std/src/io/error/tests.rs
+++ b/library/std/src/io/error/tests.rs
@@ -1,4 +1,4 @@
-use super::{Custom, Error, ErrorData, ErrorKind, Repr, SimpleMessage, const_io_error};
+use super::{Custom, Error, ErrorData, ErrorKind, Repr, SimpleMessage, const_error};
 use crate::assert_matches::assert_matches;
 use crate::mem::size_of;
 use crate::sys::decode_error_kind;
@@ -60,7 +60,7 @@ fn test_downcasting() {
 
 #[test]
 fn test_const() {
-    const E: Error = const_io_error!(ErrorKind::NotFound, "hello");
+    const E: Error = const_error!(ErrorKind::NotFound, "hello");
 
     assert_eq!(E.kind(), ErrorKind::NotFound);
     assert_eq!(E.to_string(), "hello");
@@ -110,13 +110,13 @@ fn test_simple_message_packing() {
         }};
     }
 
-    let not_static = const_io_error!(Uncategorized, "not a constant!");
+    let not_static = const_error!(Uncategorized, "not a constant!");
     check_simple_msg!(not_static, Uncategorized, "not a constant!");
 
-    const CONST: Error = const_io_error!(NotFound, "definitely a constant!");
+    const CONST: Error = const_error!(NotFound, "definitely a constant!");
     check_simple_msg!(CONST, NotFound, "definitely a constant!");
 
-    static STATIC: Error = const_io_error!(BrokenPipe, "a constant, sort of!");
+    static STATIC: Error = const_error!(BrokenPipe, "a constant, sort of!");
     check_simple_msg!(STATIC, BrokenPipe, "a constant, sort of!");
 }
 
diff --git a/library/std/src/io/tests.rs b/library/std/src/io/tests.rs
index 89e806c08911c..47cbb9614afdd 100644
--- a/library/std/src/io/tests.rs
+++ b/library/std/src/io/tests.rs
@@ -225,12 +225,12 @@ fn take_eof() {
 
     impl Read for R {
         fn read(&mut self, _: &mut [u8]) -> io::Result<usize> {
-            Err(io::const_io_error!(io::ErrorKind::Other, ""))
+            Err(io::const_error!(io::ErrorKind::Other, ""))
         }
     }
     impl BufRead for R {
         fn fill_buf(&mut self) -> io::Result<&[u8]> {
-            Err(io::const_io_error!(io::ErrorKind::Other, ""))
+            Err(io::const_error!(io::ErrorKind::Other, ""))
         }
         fn consume(&mut self, _amt: usize) {}
     }
diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs
index f1eeac3354009..cf99a618e5520 100644
--- a/library/std/src/lib.rs
+++ b/library/std/src/lib.rs
@@ -411,6 +411,7 @@
 // Only for const-ness:
 // tidy-alphabetical-start
 #![feature(const_collections_with_hasher)]
+#![feature(io_const_error)]
 #![feature(thread_local_internals)]
 // tidy-alphabetical-end
 //
diff --git a/library/std/src/net/mod.rs b/library/std/src/net/mod.rs
index 3b19c743b1e24..ddd3b68dd2d63 100644
--- a/library/std/src/net/mod.rs
+++ b/library/std/src/net/mod.rs
@@ -84,6 +84,6 @@ where
         }
     }
     Err(last_err.unwrap_or_else(|| {
-        io::const_io_error!(ErrorKind::InvalidInput, "could not resolve to any addresses")
+        io::const_error!(ErrorKind::InvalidInput, "could not resolve to any addresses")
     }))
 }
diff --git a/library/std/src/net/udp.rs b/library/std/src/net/udp.rs
index 6df47d7b0e0cd..674c5fb7d6ea3 100644
--- a/library/std/src/net/udp.rs
+++ b/library/std/src/net/udp.rs
@@ -203,9 +203,7 @@ impl UdpSocket {
     pub fn send_to<A: ToSocketAddrs>(&self, buf: &[u8], addr: A) -> io::Result<usize> {
         match addr.to_socket_addrs()?.next() {
             Some(addr) => self.0.send_to(buf, &addr),
-            None => {
-                Err(io::const_io_error!(ErrorKind::InvalidInput, "no addresses to send data to"))
-            }
+            None => Err(io::const_error!(ErrorKind::InvalidInput, "no addresses to send data to")),
         }
     }
 
diff --git a/library/std/src/os/unix/net/addr.rs b/library/std/src/os/unix/net/addr.rs
index 253e1503cf7af..56789f235fdab 100644
--- a/library/std/src/os/unix/net/addr.rs
+++ b/library/std/src/os/unix/net/addr.rs
@@ -30,14 +30,14 @@ pub(super) fn sockaddr_un(path: &Path) -> io::Result<(libc::sockaddr_un, libc::s
     let bytes = path.as_os_str().as_bytes();
 
     if bytes.contains(&0) {
-        return Err(io::const_io_error!(
+        return Err(io::const_error!(
             io::ErrorKind::InvalidInput,
             "paths must not contain interior null bytes",
         ));
     }
 
     if bytes.len() >= addr.sun_path.len() {
-        return Err(io::const_io_error!(
+        return Err(io::const_error!(
             io::ErrorKind::InvalidInput,
             "path must be shorter than SUN_LEN",
         ));
@@ -119,7 +119,7 @@ impl SocketAddr {
             // linux returns zero bytes of address
             len = SUN_PATH_OFFSET as libc::socklen_t; // i.e., zero-length address
         } else if addr.sun_family != libc::AF_UNIX as libc::sa_family_t {
-            return Err(io::const_io_error!(
+            return Err(io::const_error!(
                 io::ErrorKind::InvalidInput,
                 "file descriptor did not correspond to a Unix socket",
             ));
@@ -273,7 +273,7 @@ impl linux_ext::addr::SocketAddrExt for SocketAddr {
             addr.sun_family = libc::AF_UNIX as libc::sa_family_t;
 
             if name.len() + 1 > addr.sun_path.len() {
-                return Err(io::const_io_error!(
+                return Err(io::const_error!(
                     io::ErrorKind::InvalidInput,
                     "abstract socket name must be shorter than SUN_LEN",
                 ));
diff --git a/library/std/src/os/wasi/fs.rs b/library/std/src/os/wasi/fs.rs
index 9ec3e387e2ba9..42aada131dadc 100644
--- a/library/std/src/os/wasi/fs.rs
+++ b/library/std/src/os/wasi/fs.rs
@@ -261,7 +261,7 @@ impl FileExt for fs::File {
             a if a == wasi::ADVICE_DONTNEED.raw() => wasi::ADVICE_DONTNEED,
             a if a == wasi::ADVICE_NOREUSE.raw() => wasi::ADVICE_NOREUSE,
             _ => {
-                return Err(io::const_io_error!(
+                return Err(io::const_error!(
                     io::ErrorKind::InvalidInput,
                     "invalid parameter 'advice'",
                 ));
@@ -560,6 +560,5 @@ pub fn symlink_path<P: AsRef<Path>, U: AsRef<Path>>(old_path: P, new_path: U) ->
 }
 
 fn osstr2str(f: &OsStr) -> io::Result<&str> {
-    f.to_str()
-        .ok_or_else(|| io::const_io_error!(io::ErrorKind::Uncategorized, "input must be utf-8"))
+    f.to_str().ok_or_else(|| io::const_error!(io::ErrorKind::Uncategorized, "input must be utf-8"))
 }
diff --git a/library/std/src/os/windows/io/socket.rs b/library/std/src/os/windows/io/socket.rs
index 1fcfb6e73ad03..272641ea6c7a8 100644
--- a/library/std/src/os/windows/io/socket.rs
+++ b/library/std/src/os/windows/io/socket.rs
@@ -101,7 +101,7 @@ impl OwnedSocket {
 
     #[cfg(target_vendor = "uwp")]
     pub(crate) fn set_no_inherit(&self) -> io::Result<()> {
-        Err(io::const_io_error!(io::ErrorKind::Unsupported, "Unavailable on UWP"))
+        Err(io::const_error!(io::ErrorKind::Unsupported, "Unavailable on UWP"))
     }
 }
 
diff --git a/library/std/src/path.rs b/library/std/src/path.rs
index b0291e3aa196f..eaad6c53f77d3 100644
--- a/library/std/src/path.rs
+++ b/library/std/src/path.rs
@@ -3580,7 +3580,7 @@ impl Error for StripPrefixError {
 pub fn absolute<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
     let path = path.as_ref();
     if path.as_os_str().is_empty() {
-        Err(io::const_io_error!(io::ErrorKind::InvalidInput, "cannot make an empty path absolute",))
+        Err(io::const_error!(io::ErrorKind::InvalidInput, "cannot make an empty path absolute",))
     } else {
         sys::path::absolute(path)
     }
diff --git a/library/std/src/sys/pal/common/small_c_string.rs b/library/std/src/sys/pal/common/small_c_string.rs
index 3c96714b5c58c..f54505a856e05 100644
--- a/library/std/src/sys/pal/common/small_c_string.rs
+++ b/library/std/src/sys/pal/common/small_c_string.rs
@@ -11,7 +11,7 @@ const MAX_STACK_ALLOCATION: usize = 384;
 const MAX_STACK_ALLOCATION: usize = 32;
 
 const NUL_ERR: io::Error =
-    io::const_io_error!(io::ErrorKind::InvalidInput, "file name contained an unexpected NUL byte");
+    io::const_error!(io::ErrorKind::InvalidInput, "file name contained an unexpected NUL byte");
 
 #[inline]
 pub fn run_path_with_cstr<T>(path: &Path, f: &dyn Fn(&CStr) -> io::Result<T>) -> io::Result<T> {
diff --git a/library/std/src/sys/pal/hermit/fs.rs b/library/std/src/sys/pal/hermit/fs.rs
index 17d15ed2e5045..11862a076082d 100644
--- a/library/std/src/sys/pal/hermit/fs.rs
+++ b/library/std/src/sys/pal/hermit/fs.rs
@@ -294,7 +294,7 @@ impl OpenOptions {
             (false, _, true) => Ok(O_WRONLY | O_APPEND),
             (true, _, true) => Ok(O_RDWR | O_APPEND),
             (false, false, false) => {
-                Err(io::const_io_error!(ErrorKind::InvalidInput, "invalid access mode"))
+                Err(io::const_error!(ErrorKind::InvalidInput, "invalid access mode"))
             }
         }
     }
@@ -304,18 +304,16 @@ impl OpenOptions {
             (true, false) => {}
             (false, false) => {
                 if self.truncate || self.create || self.create_new {
-                    return Err(io::const_io_error!(
-                        ErrorKind::InvalidInput,
-                        "invalid creation mode",
-                    ));
+                    return Err(
+                        io::const_error!(ErrorKind::InvalidInput, "invalid creation mode",),
+                    );
                 }
             }
             (_, true) => {
                 if self.truncate && !self.create_new {
-                    return Err(io::const_io_error!(
-                        ErrorKind::InvalidInput,
-                        "invalid creation mode",
-                    ));
+                    return Err(
+                        io::const_error!(ErrorKind::InvalidInput, "invalid creation mode",),
+                    );
                 }
             }
         }
diff --git a/library/std/src/sys/pal/hermit/mod.rs b/library/std/src/sys/pal/hermit/mod.rs
index b62afb40a615f..f03fca603441d 100644
--- a/library/std/src/sys/pal/hermit/mod.rs
+++ b/library/std/src/sys/pal/hermit/mod.rs
@@ -42,7 +42,7 @@ pub fn unsupported<T>() -> crate::io::Result<T> {
 }
 
 pub fn unsupported_err() -> crate::io::Error {
-    crate::io::const_io_error!(
+    crate::io::const_error!(
         crate::io::ErrorKind::Unsupported,
         "operation not supported on HermitCore yet",
     )
diff --git a/library/std/src/sys/pal/hermit/net.rs b/library/std/src/sys/pal/hermit/net.rs
index d9baa091a2321..4e12374203e38 100644
--- a/library/std/src/sys/pal/hermit/net.rs
+++ b/library/std/src/sys/pal/hermit/net.rs
@@ -87,7 +87,7 @@ impl Socket {
         loop {
             let elapsed = start.elapsed();
             if elapsed >= timeout {
-                return Err(io::const_io_error!(io::ErrorKind::TimedOut, "connection timed out"));
+                return Err(io::const_error!(io::ErrorKind::TimedOut, "connection timed out"));
             }
 
             let timeout = timeout - elapsed;
@@ -114,7 +114,7 @@ impl Socket {
                     // for POLLHUP rather than read readiness
                     if pollfd.revents & netc::POLLHUP != 0 {
                         let e = self.take_error()?.unwrap_or_else(|| {
-                            io::const_io_error!(
+                            io::const_error!(
                                 io::ErrorKind::Uncategorized,
                                 "no error set after POLLHUP",
                             )
diff --git a/library/std/src/sys/pal/hermit/thread.rs b/library/std/src/sys/pal/hermit/thread.rs
index 41f2c3e212355..2a0b8dcb4ed60 100644
--- a/library/std/src/sys/pal/hermit/thread.rs
+++ b/library/std/src/sys/pal/hermit/thread.rs
@@ -41,7 +41,7 @@ impl Thread {
             unsafe {
                 drop(Box::from_raw(p));
             }
-            Err(io::const_io_error!(io::ErrorKind::Uncategorized, "Unable to create thread!"))
+            Err(io::const_error!(io::ErrorKind::Uncategorized, "Unable to create thread!"))
         } else {
             Ok(Thread { tid: tid })
         };
diff --git a/library/std/src/sys/pal/sgx/mod.rs b/library/std/src/sys/pal/sgx/mod.rs
index 586ccd18c2f57..ce8a2fed4bc6b 100644
--- a/library/std/src/sys/pal/sgx/mod.rs
+++ b/library/std/src/sys/pal/sgx/mod.rs
@@ -48,7 +48,7 @@ pub fn unsupported<T>() -> crate::io::Result<T> {
 }
 
 pub fn unsupported_err() -> crate::io::Error {
-    crate::io::const_io_error!(ErrorKind::Unsupported, "operation not supported on SGX yet")
+    crate::io::const_error!(ErrorKind::Unsupported, "operation not supported on SGX yet")
 }
 
 /// This function is used to implement various functions that doesn't exist,
@@ -59,7 +59,7 @@ pub fn unsupported_err() -> crate::io::Error {
 pub fn sgx_ineffective<T>(v: T) -> crate::io::Result<T> {
     static SGX_INEFFECTIVE_ERROR: AtomicBool = AtomicBool::new(false);
     if SGX_INEFFECTIVE_ERROR.load(Ordering::Relaxed) {
-        Err(crate::io::const_io_error!(
+        Err(crate::io::const_error!(
             ErrorKind::Uncategorized,
             "operation can't be trusted to have any effect on SGX",
         ))
diff --git a/library/std/src/sys/pal/solid/fs.rs b/library/std/src/sys/pal/solid/fs.rs
index 776a96ff3b7ba..04dd10ad806d3 100644
--- a/library/std/src/sys/pal/solid/fs.rs
+++ b/library/std/src/sys/pal/solid/fs.rs
@@ -303,7 +303,7 @@ fn cstr(path: &Path) -> io::Result<CString> {
 
     if !path.starts_with(br"\") {
         // Relative paths aren't supported
-        return Err(crate::io::const_io_error!(
+        return Err(crate::io::const_error!(
             crate::io::ErrorKind::Unsupported,
             "relative path is not supported on this platform",
         ));
@@ -314,10 +314,7 @@ fn cstr(path: &Path) -> io::Result<CString> {
     let wrapped_path = [SAFE_PREFIX, &path, &[0]].concat();
 
     CString::from_vec_with_nul(wrapped_path).map_err(|_| {
-        crate::io::const_io_error!(
-            io::ErrorKind::InvalidInput,
-            "path provided contains a nul byte",
-        )
+        crate::io::const_error!(io::ErrorKind::InvalidInput, "path provided contains a nul byte",)
     })
 }
 
@@ -512,7 +509,7 @@ impl fmt::Debug for File {
 
 pub fn unlink(p: &Path) -> io::Result<()> {
     if stat(p)?.file_type().is_dir() {
-        Err(io::const_io_error!(io::ErrorKind::IsADirectory, "is a directory"))
+        Err(io::const_error!(io::ErrorKind::IsADirectory, "is a directory"))
     } else {
         error::SolidError::err_if_negative(unsafe { abi::SOLID_FS_Unlink(cstr(p)?.as_ptr()) })
             .map_err(|e| e.as_io_error())?;
@@ -542,7 +539,7 @@ pub fn rmdir(p: &Path) -> io::Result<()> {
             .map_err(|e| e.as_io_error())?;
         Ok(())
     } else {
-        Err(io::const_io_error!(io::ErrorKind::NotADirectory, "not a directory"))
+        Err(io::const_error!(io::ErrorKind::NotADirectory, "not a directory"))
     }
 }
 
@@ -570,7 +567,7 @@ pub fn remove_dir_all(path: &Path) -> io::Result<()> {
 pub fn readlink(p: &Path) -> io::Result<PathBuf> {
     // This target doesn't support symlinks
     stat(p)?;
-    Err(io::const_io_error!(io::ErrorKind::InvalidInput, "not a symbolic link"))
+    Err(io::const_error!(io::ErrorKind::InvalidInput, "not a symbolic link"))
 }
 
 pub fn symlink(_original: &Path, _link: &Path) -> io::Result<()> {
diff --git a/library/std/src/sys/pal/solid/net.rs b/library/std/src/sys/pal/solid/net.rs
index c0818ecd856d2..5f6436807e27e 100644
--- a/library/std/src/sys/pal/solid/net.rs
+++ b/library/std/src/sys/pal/solid/net.rs
@@ -175,7 +175,7 @@ impl Socket {
         };
 
         match n {
-            0 => Err(io::const_io_error!(io::ErrorKind::TimedOut, "connection timed out")),
+            0 => Err(io::const_error!(io::ErrorKind::TimedOut, "connection timed out")),
             _ => {
                 let can_write = writefds.num_fds != 0;
                 if !can_write {
diff --git a/library/std/src/sys/pal/solid/os.rs b/library/std/src/sys/pal/solid/os.rs
index d8afcb91f67f2..57c28aed3b293 100644
--- a/library/std/src/sys/pal/solid/os.rs
+++ b/library/std/src/sys/pal/solid/os.rs
@@ -204,7 +204,7 @@ pub unsafe fn unsetenv(n: &OsStr) -> io::Result<()> {
 /// In kmclib, `setenv` and `unsetenv` don't always set `errno`, so this
 /// function just returns a generic error.
 fn cvt_env(t: c_int) -> io::Result<c_int> {
-    if t == -1 { Err(io::const_io_error!(io::ErrorKind::Uncategorized, "failure")) } else { Ok(t) }
+    if t == -1 { Err(io::const_error!(io::ErrorKind::Uncategorized, "failure")) } else { Ok(t) }
 }
 
 pub fn temp_dir() -> PathBuf {
diff --git a/library/std/src/sys/pal/uefi/helpers.rs b/library/std/src/sys/pal/uefi/helpers.rs
index abc8e69a285f3..bc980fa718e46 100644
--- a/library/std/src/sys/pal/uefi/helpers.rs
+++ b/library/std/src/sys/pal/uefi/helpers.rs
@@ -30,7 +30,7 @@ type BootUninstallMultipleProtocolInterfaces =
     unsafe extern "efiapi" fn(_: r_efi::efi::Handle, _: ...) -> r_efi::efi::Status;
 
 const BOOT_SERVICES_UNAVAILABLE: io::Error =
-    const_io_error!(io::ErrorKind::Other, "Boot Services are no longer available");
+    const_error!(io::ErrorKind::Other, "Boot Services are no longer available");
 
 /// Locates Handles with a particular Protocol GUID.
 ///
@@ -114,7 +114,7 @@ pub(crate) fn open_protocol<T>(
         Err(crate::io::Error::from_raw_os_error(r.as_usize()))
     } else {
         NonNull::new(unsafe { protocol.assume_init() })
-            .ok_or(const_io_error!(io::ErrorKind::Other, "null protocol"))
+            .ok_or(const_error!(io::ErrorKind::Other, "null protocol"))
     }
 }
 
@@ -134,7 +134,7 @@ pub(crate) fn create_event(
     if r.is_error() {
         Err(crate::io::Error::from_raw_os_error(r.as_usize()))
     } else {
-        NonNull::new(event).ok_or(const_io_error!(io::ErrorKind::Other, "null protocol"))
+        NonNull::new(event).ok_or(const_error!(io::ErrorKind::Other, "null protocol"))
     }
 }
 
@@ -155,10 +155,8 @@ pub(crate) unsafe fn close_event(evt: NonNull<crate::ffi::c_void>) -> io::Result
 ///
 /// Note: Some protocols need to be manually freed. It is the caller's responsibility to do so.
 pub(crate) fn image_handle_protocol<T>(protocol_guid: Guid) -> io::Result<NonNull<T>> {
-    let system_handle = uefi::env::try_image_handle().ok_or(io::const_io_error!(
-        io::ErrorKind::NotFound,
-        "Protocol not found in Image handle"
-    ))?;
+    let system_handle = uefi::env::try_image_handle()
+        .ok_or(io::const_error!(io::ErrorKind::NotFound, "Protocol not found in Image handle"))?;
     open_protocol(system_handle, protocol_guid)
 }
 
@@ -178,7 +176,7 @@ pub(crate) fn device_path_to_text(path: NonNull<device_path::Protocol>) -> io::R
         };
 
         let path = os_string_from_raw(path_ptr)
-            .ok_or(io::const_io_error!(io::ErrorKind::InvalidData, "Invalid path"))?;
+            .ok_or(io::const_error!(io::ErrorKind::InvalidData, "Invalid path"))?;
 
         if let Some(boot_services) = crate::os::uefi::env::boot_services() {
             let boot_services: NonNull<r_efi::efi::BootServices> = boot_services.cast();
@@ -213,7 +211,7 @@ pub(crate) fn device_path_to_text(path: NonNull<device_path::Protocol>) -> io::R
         }
     }
 
-    Err(io::const_io_error!(io::ErrorKind::NotFound, "No device path to text protocol found"))
+    Err(io::const_error!(io::ErrorKind::NotFound, "No device path to text protocol found"))
 }
 
 /// Gets RuntimeServices.
@@ -234,7 +232,7 @@ impl DevicePath {
         ) -> io::Result<DevicePath> {
             let path_vec = p.encode_wide().chain(Some(0)).collect::<Vec<u16>>();
             if path_vec[..path_vec.len() - 1].contains(&0) {
-                return Err(const_io_error!(
+                return Err(const_error!(
                     io::ErrorKind::InvalidInput,
                     "strings passed to UEFI cannot contain NULs",
                 ));
@@ -243,9 +241,9 @@ impl DevicePath {
             let path =
                 unsafe { ((*protocol.as_ptr()).convert_text_to_device_path)(path_vec.as_ptr()) };
 
-            NonNull::new(path).map(DevicePath).ok_or_else(|| {
-                const_io_error!(io::ErrorKind::InvalidFilename, "Invalid Device Path")
-            })
+            NonNull::new(path)
+                .map(DevicePath)
+                .ok_or_else(|| const_error!(io::ErrorKind::InvalidFilename, "Invalid Device Path"))
         }
 
         static LAST_VALID_HANDLE: AtomicPtr<crate::ffi::c_void> =
@@ -271,7 +269,7 @@ impl DevicePath {
             }
         }
 
-        io::Result::Err(const_io_error!(
+        io::Result::Err(const_error!(
             io::ErrorKind::NotFound,
             "DevicePathFromText Protocol not found"
         ))
@@ -326,7 +324,7 @@ impl<T> OwnedProtocol<T> {
         };
 
         let handle = NonNull::new(handle)
-            .ok_or(io::const_io_error!(io::ErrorKind::Uncategorized, "found null handle"))?;
+            .ok_or(io::const_error!(io::ErrorKind::Uncategorized, "found null handle"))?;
 
         Ok(Self { guid, handle, protocol })
     }
diff --git a/library/std/src/sys/pal/uefi/mod.rs b/library/std/src/sys/pal/uefi/mod.rs
index c0ab52f650aa5..f29c91f3bfe68 100644
--- a/library/std/src/sys/pal/uefi/mod.rs
+++ b/library/std/src/sys/pal/uefi/mod.rs
@@ -95,7 +95,7 @@ pub const fn unsupported<T>() -> std_io::Result<T> {
 
 #[inline]
 pub const fn unsupported_err() -> std_io::Error {
-    std_io::const_io_error!(std_io::ErrorKind::Unsupported, "operation not supported on UEFI",)
+    std_io::const_error!(std_io::ErrorKind::Unsupported, "operation not supported on UEFI",)
 }
 
 pub fn decode_error_kind(code: RawOsError) -> crate::io::ErrorKind {
diff --git a/library/std/src/sys/pal/uefi/os.rs b/library/std/src/sys/pal/uefi/os.rs
index 27395f7c3c0b3..6d23c72ef2209 100644
--- a/library/std/src/sys/pal/uefi/os.rs
+++ b/library/std/src/sys/pal/uefi/os.rs
@@ -131,7 +131,7 @@ pub fn getcwd() -> io::Result<PathBuf> {
             let path_ptr = unsafe { ((*shell.as_ptr()).get_cur_dir)(crate::ptr::null_mut()) };
             helpers::os_string_from_raw(path_ptr)
                 .map(PathBuf::from)
-                .ok_or(io::const_io_error!(io::ErrorKind::InvalidData, "Invalid path"))
+                .ok_or(io::const_error!(io::ErrorKind::InvalidData, "Invalid path"))
         }
         None => {
             let mut t = current_exe()?;
@@ -147,7 +147,7 @@ pub fn chdir(p: &path::Path) -> io::Result<()> {
     let shell = helpers::open_shell().ok_or(unsupported_err())?;
 
     let mut p = helpers::os_string_to_raw(p.as_os_str())
-        .ok_or(io::const_io_error!(io::ErrorKind::InvalidData, "Invalid path"))?;
+        .ok_or(io::const_error!(io::ErrorKind::InvalidData, "Invalid path"))?;
 
     let r = unsafe { ((*shell.as_ptr()).set_cur_dir)(crate::ptr::null_mut(), p.as_mut_ptr()) };
     if r.is_error() { Err(io::Error::from_raw_os_error(r.as_usize())) } else { Ok(()) }
@@ -290,15 +290,15 @@ mod uefi_env {
 
     pub(crate) fn set(key: &OsStr, val: &OsStr) -> io::Result<()> {
         let mut key_ptr = helpers::os_string_to_raw(key)
-            .ok_or(io::const_io_error!(io::ErrorKind::InvalidInput, "Invalid Key"))?;
+            .ok_or(io::const_error!(io::ErrorKind::InvalidInput, "Invalid Key"))?;
         let mut val_ptr = helpers::os_string_to_raw(val)
-            .ok_or(io::const_io_error!(io::ErrorKind::InvalidInput, "Invalid Value"))?;
+            .ok_or(io::const_error!(io::ErrorKind::InvalidInput, "Invalid Value"))?;
         unsafe { set_raw(key_ptr.as_mut_ptr(), val_ptr.as_mut_ptr()) }
     }
 
     pub(crate) fn unset(key: &OsStr) -> io::Result<()> {
         let mut key_ptr = helpers::os_string_to_raw(key)
-            .ok_or(io::const_io_error!(io::ErrorKind::InvalidInput, "Invalid Key"))?;
+            .ok_or(io::const_error!(io::ErrorKind::InvalidInput, "Invalid Key"))?;
         unsafe { set_raw(key_ptr.as_mut_ptr(), crate::ptr::null_mut()) }
     }
 
@@ -328,7 +328,7 @@ mod uefi_env {
                 });
                 // SAFETY: val.add(start) is always NULL terminated
                 let val = unsafe { get_raw(shell, val.add(start)) }
-                    .ok_or(io::const_io_error!(io::ErrorKind::InvalidInput, "Invalid Value"))?;
+                    .ok_or(io::const_error!(io::ErrorKind::InvalidInput, "Invalid Value"))?;
 
                 vars.push((key, val));
                 start = i + 1;
diff --git a/library/std/src/sys/pal/uefi/process.rs b/library/std/src/sys/pal/uefi/process.rs
index 1b83f4b0aee88..2195fce51e7ee 100644
--- a/library/std/src/sys/pal/uefi/process.rs
+++ b/library/std/src/sys/pal/uefi/process.rs
@@ -328,7 +328,7 @@ mod uefi_command_internal {
         pub fn load_image(p: &OsStr) -> io::Result<Self> {
             let path = helpers::DevicePath::from_text(p)?;
             let boot_services: NonNull<r_efi::efi::BootServices> = boot_services()
-                .ok_or_else(|| const_io_error!(io::ErrorKind::NotFound, "Boot Services not found"))?
+                .ok_or_else(|| const_error!(io::ErrorKind::NotFound, "Boot Services not found"))?
                 .cast();
             let mut child_handle: MaybeUninit<r_efi::efi::Handle> = MaybeUninit::uninit();
             let image_handle = image_handle();
@@ -369,7 +369,7 @@ mod uefi_command_internal {
             }
 
             let boot_services: NonNull<r_efi::efi::BootServices> = boot_services()
-                .ok_or_else(|| const_io_error!(io::ErrorKind::NotFound, "Boot Services not found"))?
+                .ok_or_else(|| const_error!(io::ErrorKind::NotFound, "Boot Services not found"))?
                 .cast();
             let mut exit_data_size: usize = 0;
             let mut exit_data: MaybeUninit<*mut u16> = MaybeUninit::uninit();
@@ -583,7 +583,7 @@ mod uefi_command_internal {
             OsString::from_wide(&self._buffer)
                 .into_string()
                 .map(Into::into)
-                .map_err(|_| const_io_error!(io::ErrorKind::Other, "utf8 conversion failed"))
+                .map_err(|_| const_error!(io::ErrorKind::Other, "utf8 conversion failed"))
         }
 
         extern "efiapi" fn reset(
diff --git a/library/std/src/sys/pal/unix/fs.rs b/library/std/src/sys/pal/unix/fs.rs
index 96f99efb21e84..37029bcd36e30 100644
--- a/library/std/src/sys/pal/unix/fs.rs
+++ b/library/std/src/sys/pal/unix/fs.rs
@@ -559,7 +559,7 @@ impl FileAttr {
                 return if (ext.stx_mask & libc::STATX_BTIME) != 0 {
                     SystemTime::new(ext.stx_btime.tv_sec, ext.stx_btime.tv_nsec as i64)
                 } else {
-                    Err(io::const_io_error!(
+                    Err(io::const_error!(
                         io::ErrorKind::Unsupported,
                         "creation time is not available for the filesystem",
                     ))
@@ -567,7 +567,7 @@ impl FileAttr {
             }
         }
 
-        Err(io::const_io_error!(
+        Err(io::const_error!(
             io::ErrorKind::Unsupported,
             "creation time is not available on this platform \
                             currently",
@@ -1272,7 +1272,7 @@ impl File {
         target_vendor = "apple",
     )))]
     pub fn lock(&self) -> io::Result<()> {
-        Err(io::const_io_error!(io::ErrorKind::Unsupported, "lock() not supported"))
+        Err(io::const_error!(io::ErrorKind::Unsupported, "lock() not supported"))
     }
 
     #[cfg(any(
@@ -1293,7 +1293,7 @@ impl File {
         target_vendor = "apple",
     )))]
     pub fn lock_shared(&self) -> io::Result<()> {
-        Err(io::const_io_error!(io::ErrorKind::Unsupported, "lock_shared() not supported"))
+        Err(io::const_error!(io::ErrorKind::Unsupported, "lock_shared() not supported"))
     }
 
     #[cfg(any(
@@ -1320,7 +1320,7 @@ impl File {
         target_vendor = "apple",
     )))]
     pub fn try_lock(&self) -> io::Result<bool> {
-        Err(io::const_io_error!(io::ErrorKind::Unsupported, "try_lock() not supported"))
+        Err(io::const_error!(io::ErrorKind::Unsupported, "try_lock() not supported"))
     }
 
     #[cfg(any(
@@ -1347,7 +1347,7 @@ impl File {
         target_vendor = "apple",
     )))]
     pub fn try_lock_shared(&self) -> io::Result<bool> {
-        Err(io::const_io_error!(io::ErrorKind::Unsupported, "try_lock_shared() not supported"))
+        Err(io::const_error!(io::ErrorKind::Unsupported, "try_lock_shared() not supported"))
     }
 
     #[cfg(any(
@@ -1368,7 +1368,7 @@ impl File {
         target_vendor = "apple",
     )))]
     pub fn unlock(&self) -> io::Result<()> {
-        Err(io::const_io_error!(io::ErrorKind::Unsupported, "unlock() not supported"))
+        Err(io::const_error!(io::ErrorKind::Unsupported, "unlock() not supported"))
     }
 
     pub fn truncate(&self, size: u64) -> io::Result<()> {
@@ -1459,11 +1459,11 @@ impl File {
         )))]
         let to_timespec = |time: Option<SystemTime>| match time {
             Some(time) if let Some(ts) = time.t.to_timespec() => Ok(ts),
-            Some(time) if time > crate::sys::time::UNIX_EPOCH => Err(io::const_io_error!(
+            Some(time) if time > crate::sys::time::UNIX_EPOCH => Err(io::const_error!(
                 io::ErrorKind::InvalidInput,
                 "timestamp is too large to set as a file time"
             )),
-            Some(_) => Err(io::const_io_error!(
+            Some(_) => Err(io::const_error!(
                 io::ErrorKind::InvalidInput,
                 "timestamp is too small to set as a file time"
             )),
@@ -1476,7 +1476,7 @@ impl File {
                 // the same as for Redox.
                 // `futimens` and `UTIME_OMIT` are a work in progress for vxworks.
                 let _ = times;
-                Err(io::const_io_error!(
+                Err(io::const_error!(
                     io::ErrorKind::Unsupported,
                     "setting file times not supported",
                 ))
@@ -1515,7 +1515,7 @@ impl File {
                     weak!(fn futimens(c_int, *const libc::timespec) -> c_int);
                     match futimens.get() {
                         Some(futimens) => futimens(self.as_raw_fd(), times.as_ptr()),
-                        None => return Err(io::const_io_error!(
+                        None => return Err(io::const_error!(
                             io::ErrorKind::Unsupported,
                             "setting file times requires Android API level >= 19",
                         )),
@@ -2090,7 +2090,7 @@ pub fn lchown(path: &Path, uid: u32, gid: u32) -> io::Result<()> {
 #[cfg(target_os = "vxworks")]
 pub fn lchown(path: &Path, uid: u32, gid: u32) -> io::Result<()> {
     let (_, _, _) = (path, uid, gid);
-    Err(io::const_io_error!(io::ErrorKind::Unsupported, "lchown not supported by vxworks"))
+    Err(io::const_error!(io::ErrorKind::Unsupported, "lchown not supported by vxworks"))
 }
 
 #[cfg(not(any(target_os = "fuchsia", target_os = "vxworks")))]
@@ -2101,7 +2101,7 @@ pub fn chroot(dir: &Path) -> io::Result<()> {
 #[cfg(target_os = "vxworks")]
 pub fn chroot(dir: &Path) -> io::Result<()> {
     let _ = dir;
-    Err(io::const_io_error!(io::ErrorKind::Unsupported, "chroot not supported by vxworks"))
+    Err(io::const_error!(io::ErrorKind::Unsupported, "chroot not supported by vxworks"))
 }
 
 pub use remove_dir_impl::remove_dir_all;
diff --git a/library/std/src/sys/pal/unix/l4re.rs b/library/std/src/sys/pal/unix/l4re.rs
index 52d39dcfb16fb..37dd370c5146c 100644
--- a/library/std/src/sys/pal/unix/l4re.rs
+++ b/library/std/src/sys/pal/unix/l4re.rs
@@ -1,6 +1,6 @@
 macro_rules! unimpl {
     () => {
-        return Err(io::const_io_error!(
+        return Err(io::const_error!(
             io::ErrorKind::Unsupported,
             "No networking available on L4Re.",
         ));
diff --git a/library/std/src/sys/pal/unix/net.rs b/library/std/src/sys/pal/unix/net.rs
index 6a67bb0a101e9..d140607869c14 100644
--- a/library/std/src/sys/pal/unix/net.rs
+++ b/library/std/src/sys/pal/unix/net.rs
@@ -190,7 +190,7 @@ impl Socket {
         loop {
             let elapsed = start.elapsed();
             if elapsed >= timeout {
-                return Err(io::const_io_error!(io::ErrorKind::TimedOut, "connection timed out"));
+                return Err(io::const_error!(io::ErrorKind::TimedOut, "connection timed out"));
             }
 
             let timeout = timeout - elapsed;
@@ -225,7 +225,7 @@ impl Socket {
                         // for POLLHUP or POLLERR rather than read readiness
                         if pollfd.revents & (libc::POLLHUP | libc::POLLERR) != 0 {
                             let e = self.take_error()?.unwrap_or_else(|| {
-                                io::const_io_error!(
+                                io::const_error!(
                                     io::ErrorKind::Uncategorized,
                                     "no error set after POLLHUP",
                                 )
diff --git a/library/std/src/sys/pal/unix/os.rs b/library/std/src/sys/pal/unix/os.rs
index f207131ddf332..789a40c13e61b 100644
--- a/library/std/src/sys/pal/unix/os.rs
+++ b/library/std/src/sys/pal/unix/os.rs
@@ -258,7 +258,7 @@ pub fn current_exe() -> io::Result<PathBuf> {
     use crate::env;
     use crate::io::ErrorKind;
 
-    let exe_path = env::args().next().ok_or(io::const_io_error!(
+    let exe_path = env::args().next().ok_or(io::const_error!(
         ErrorKind::NotFound,
         "an executable path was not found because no arguments were provided through argv"
     ))?;
@@ -284,7 +284,7 @@ pub fn current_exe() -> io::Result<PathBuf> {
             }
         }
     }
-    Err(io::const_io_error!(ErrorKind::NotFound, "an executable path was not found"))
+    Err(io::const_error!(ErrorKind::NotFound, "an executable path was not found"))
 }
 
 #[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
@@ -340,7 +340,7 @@ pub fn current_exe() -> io::Result<PathBuf> {
                 0,
             ))?;
             if path_len <= 1 {
-                return Err(io::const_io_error!(
+                return Err(io::const_error!(
                     io::ErrorKind::Uncategorized,
                     "KERN_PROC_PATHNAME sysctl returned zero-length string",
                 ));
@@ -363,7 +363,7 @@ pub fn current_exe() -> io::Result<PathBuf> {
         if curproc_exe.is_file() {
             return crate::fs::read_link(curproc_exe);
         }
-        Err(io::const_io_error!(
+        Err(io::const_error!(
             io::ErrorKind::Uncategorized,
             "/proc/curproc/exe doesn't point to regular file.",
         ))
@@ -382,10 +382,9 @@ pub fn current_exe() -> io::Result<PathBuf> {
         cvt(libc::sysctl(mib, 4, argv.as_mut_ptr() as *mut _, &mut argv_len, ptr::null_mut(), 0))?;
         argv.set_len(argv_len as usize);
         if argv[0].is_null() {
-            return Err(io::const_io_error!(
-                io::ErrorKind::Uncategorized,
-                "no current exe available",
-            ));
+            return Err(
+                io::const_error!(io::ErrorKind::Uncategorized, "no current exe available",),
+            );
         }
         let argv0 = CStr::from_ptr(argv[0]).to_bytes();
         if argv0[0] == b'.' || argv0.iter().any(|b| *b == b'/') {
@@ -405,7 +404,7 @@ pub fn current_exe() -> io::Result<PathBuf> {
 ))]
 pub fn current_exe() -> io::Result<PathBuf> {
     match crate::fs::read_link("/proc/self/exe") {
-        Err(ref e) if e.kind() == io::ErrorKind::NotFound => Err(io::const_io_error!(
+        Err(ref e) if e.kind() == io::ErrorKind::NotFound => Err(io::const_error!(
             io::ErrorKind::Uncategorized,
             "no /proc/self/exe available. Is /proc mounted?",
         )),
@@ -476,7 +475,7 @@ pub fn current_exe() -> io::Result<PathBuf> {
         );
         if result != libc::B_OK {
             use crate::io::ErrorKind;
-            Err(io::const_io_error!(ErrorKind::Uncategorized, "Error getting executable path"))
+            Err(io::const_error!(ErrorKind::Uncategorized, "Error getting executable path"))
         } else {
             // find_path adds the null terminator.
             let name = CStr::from_ptr(name.as_ptr()).to_bytes();
@@ -493,7 +492,7 @@ pub fn current_exe() -> io::Result<PathBuf> {
 #[cfg(target_os = "l4re")]
 pub fn current_exe() -> io::Result<PathBuf> {
     use crate::io::ErrorKind;
-    Err(io::const_io_error!(ErrorKind::Unsupported, "Not yet implemented!"))
+    Err(io::const_error!(ErrorKind::Unsupported, "Not yet implemented!"))
 }
 
 #[cfg(target_os = "vxworks")]
@@ -523,7 +522,7 @@ pub fn current_exe() -> io::Result<PathBuf> {
     use crate::env;
     use crate::io::ErrorKind;
 
-    let exe_path = env::args().next().ok_or(io::const_io_error!(
+    let exe_path = env::args().next().ok_or(io::const_error!(
         ErrorKind::Uncategorized,
         "an executable path was not found because no arguments were provided through argv"
     ))?;
diff --git a/library/std/src/sys/pal/unix/process/process_fuchsia.rs b/library/std/src/sys/pal/unix/process/process_fuchsia.rs
index 8f7d786e32fcd..b7a35718757ae 100644
--- a/library/std/src/sys/pal/unix/process/process_fuchsia.rs
+++ b/library/std/src/sys/pal/unix/process/process_fuchsia.rs
@@ -18,7 +18,7 @@ impl Command {
         let envp = self.capture_env();
 
         if self.saw_nul() {
-            return Err(io::const_io_error!(
+            return Err(io::const_error!(
                 io::ErrorKind::InvalidInput,
                 "nul byte found in provided data",
             ));
@@ -38,7 +38,7 @@ impl Command {
 
     pub fn exec(&mut self, default: Stdio) -> io::Error {
         if self.saw_nul() {
-            return io::const_io_error!(
+            return io::const_error!(
                 io::ErrorKind::InvalidInput,
                 "nul byte found in provided data",
             );
@@ -185,7 +185,7 @@ impl Process {
             ))?;
         }
         if actual != 1 {
-            return Err(io::const_io_error!(
+            return Err(io::const_error!(
                 io::ErrorKind::InvalidData,
                 "Failed to get exit status of process",
             ));
@@ -222,7 +222,7 @@ impl Process {
             ))?;
         }
         if actual != 1 {
-            return Err(io::const_io_error!(
+            return Err(io::const_error!(
                 io::ErrorKind::InvalidData,
                 "Failed to get exit status of process",
             ));
diff --git a/library/std/src/sys/pal/unix/process/process_unix.rs b/library/std/src/sys/pal/unix/process/process_unix.rs
index 8faf1fda5464d..ec4965c1d7196 100644
--- a/library/std/src/sys/pal/unix/process/process_unix.rs
+++ b/library/std/src/sys/pal/unix/process/process_unix.rs
@@ -61,7 +61,7 @@ impl Command {
         let envp = self.capture_env();
 
         if self.saw_nul() {
-            return Err(io::const_io_error!(
+            return Err(io::const_error!(
                 ErrorKind::InvalidInput,
                 "nul byte found in provided data",
             ));
@@ -175,7 +175,7 @@ impl Command {
     // allowed to exist in dead code), but it sounds bad, so we go out of our
     // way to avoid that all-together.
     #[cfg(any(target_os = "tvos", target_os = "watchos"))]
-    const ERR_APPLE_TV_WATCH_NO_FORK_EXEC: Error = io::const_io_error!(
+    const ERR_APPLE_TV_WATCH_NO_FORK_EXEC: Error = io::const_error!(
         ErrorKind::Unsupported,
         "`fork`+`exec`-based process spawning is not supported on this target",
     );
@@ -218,7 +218,7 @@ impl Command {
                 } else if delay < MAX_FORKSPAWN_SLEEP {
                     thread::sleep(delay);
                 } else {
-                    return Err(io::const_io_error!(
+                    return Err(io::const_error!(
                         ErrorKind::WouldBlock,
                         "forking returned EBADF too often",
                     ));
@@ -235,7 +235,7 @@ impl Command {
         let envp = self.capture_env();
 
         if self.saw_nul() {
-            return io::const_io_error!(ErrorKind::InvalidInput, "nul byte found in provided data",);
+            return io::const_error!(ErrorKind::InvalidInput, "nul byte found in provided data",);
         }
 
         match self.setup_io(default, true) {
@@ -561,7 +561,7 @@ impl Command {
                         } else if delay < MAX_FORKSPAWN_SLEEP {
                             thread::sleep(delay);
                         } else {
-                            return Err(io::const_io_error!(
+                            return Err(io::const_error!(
                                 ErrorKind::WouldBlock,
                                 "posix_spawnp returned EBADF too often",
                             ));
diff --git a/library/std/src/sys/pal/unix/process/process_vxworks.rs b/library/std/src/sys/pal/unix/process/process_vxworks.rs
index 38daf6af91808..e2c1b6a032624 100644
--- a/library/std/src/sys/pal/unix/process/process_vxworks.rs
+++ b/library/std/src/sys/pal/unix/process/process_vxworks.rs
@@ -22,7 +22,7 @@ impl Command {
         let envp = self.capture_env();
 
         if self.saw_nul() {
-            return Err(io::const_io_error!(
+            return Err(io::const_error!(
                 ErrorKind::InvalidInput,
                 "nul byte found in provided data",
             ));
diff --git a/library/std/src/sys/pal/unix/thread.rs b/library/std/src/sys/pal/unix/thread.rs
index 040246618360f..131a6e81b1e92 100644
--- a/library/std/src/sys/pal/unix/thread.rs
+++ b/library/std/src/sys/pal/unix/thread.rs
@@ -469,7 +469,7 @@ pub fn available_parallelism() -> io::Result<NonZero<usize>> {
             unsafe {
                 use libc::_syspage_ptr;
                 if _syspage_ptr.is_null() {
-                    Err(io::const_io_error!(io::ErrorKind::NotFound, "No syspage available"))
+                    Err(io::const_error!(io::ErrorKind::NotFound, "No syspage available"))
                 } else {
                     let cpus = (*_syspage_ptr).num_cpu;
                     NonZero::new(cpus as usize)
@@ -509,7 +509,7 @@ pub fn available_parallelism() -> io::Result<NonZero<usize>> {
             }
         } else {
             // FIXME: implement on Redox, l4re
-            Err(io::const_io_error!(io::ErrorKind::Unsupported, "Getting the number of hardware threads is not supported on the target platform"))
+            Err(io::const_error!(io::ErrorKind::Unsupported, "Getting the number of hardware threads is not supported on the target platform"))
         }
     }
 }
diff --git a/library/std/src/sys/pal/unix/time.rs b/library/std/src/sys/pal/unix/time.rs
index 535fe6b27d91e..343864d0b3fd2 100644
--- a/library/std/src/sys/pal/unix/time.rs
+++ b/library/std/src/sys/pal/unix/time.rs
@@ -96,7 +96,7 @@ impl Timespec {
         if tv_nsec >= 0 && tv_nsec < NSEC_PER_SEC as i64 {
             Ok(unsafe { Self::new_unchecked(tv_sec, tv_nsec) })
         } else {
-            Err(io::const_io_error!(io::ErrorKind::InvalidData, "Invalid timestamp"))
+            Err(io::const_error!(io::ErrorKind::InvalidData, "Invalid timestamp"))
         }
     }
 
diff --git a/library/std/src/sys/pal/unsupported/os.rs b/library/std/src/sys/pal/unsupported/os.rs
index 481fd62c04fe8..48de4312885fe 100644
--- a/library/std/src/sys/pal/unsupported/os.rs
+++ b/library/std/src/sys/pal/unsupported/os.rs
@@ -96,11 +96,11 @@ pub fn getenv(_: &OsStr) -> Option<OsString> {
 }
 
 pub unsafe fn setenv(_: &OsStr, _: &OsStr) -> io::Result<()> {
-    Err(io::const_io_error!(io::ErrorKind::Unsupported, "cannot set env vars on this platform"))
+    Err(io::const_error!(io::ErrorKind::Unsupported, "cannot set env vars on this platform"))
 }
 
 pub unsafe fn unsetenv(_: &OsStr) -> io::Result<()> {
-    Err(io::const_io_error!(io::ErrorKind::Unsupported, "cannot unset env vars on this platform"))
+    Err(io::const_error!(io::ErrorKind::Unsupported, "cannot unset env vars on this platform"))
 }
 
 pub fn temp_dir() -> PathBuf {
diff --git a/library/std/src/sys/pal/wasi/fs.rs b/library/std/src/sys/pal/wasi/fs.rs
index 3296c762cca2b..0667eb9010100 100644
--- a/library/std/src/sys/pal/wasi/fs.rs
+++ b/library/std/src/sys/pal/wasi/fs.rs
@@ -496,7 +496,7 @@ impl File {
     pub fn set_times(&self, times: FileTimes) -> io::Result<()> {
         let to_timestamp = |time: Option<SystemTime>| match time {
             Some(time) if let Some(ts) = time.to_wasi_timestamp() => Ok(ts),
-            Some(_) => Err(io::const_io_error!(
+            Some(_) => Err(io::const_error!(
                 io::ErrorKind::InvalidInput,
                 "timestamp is too large to set as a file time"
             )),
@@ -764,8 +764,7 @@ fn open_parent(p: &Path) -> io::Result<(ManuallyDrop<WasiFd>, PathBuf)> {
 }
 
 pub fn osstr2str(f: &OsStr) -> io::Result<&str> {
-    f.to_str()
-        .ok_or_else(|| io::const_io_error!(io::ErrorKind::Uncategorized, "input must be utf-8"))
+    f.to_str().ok_or_else(|| io::const_error!(io::ErrorKind::Uncategorized, "input must be utf-8"))
 }
 
 pub fn copy(from: &Path, to: &Path) -> io::Result<u64> {
@@ -811,7 +810,7 @@ fn remove_dir_all_recursive(parent: &WasiFd, path: &Path) -> io::Result<()> {
     for entry in ReadDir::new(fd, dummy_root) {
         let entry = entry?;
         let path = crate::str::from_utf8(&entry.name).map_err(|_| {
-            io::const_io_error!(io::ErrorKind::Uncategorized, "invalid utf-8 file name found")
+            io::const_error!(io::ErrorKind::Uncategorized, "invalid utf-8 file name found")
         })?;
 
         let result: io::Result<()> = try {
diff --git a/library/std/src/sys/pal/wasip2/net.rs b/library/std/src/sys/pal/wasip2/net.rs
index 06e623df8438e..f009a51821f35 100644
--- a/library/std/src/sys/pal/wasip2/net.rs
+++ b/library/std/src/sys/pal/wasip2/net.rs
@@ -117,7 +117,7 @@ impl Socket {
         loop {
             let elapsed = start.elapsed();
             if elapsed >= timeout {
-                return Err(io::const_io_error!(io::ErrorKind::TimedOut, "connection timed out"));
+                return Err(io::const_error!(io::ErrorKind::TimedOut, "connection timed out"));
             }
 
             let timeout = timeout - elapsed;
diff --git a/library/std/src/sys/pal/windows/args.rs b/library/std/src/sys/pal/windows/args.rs
index e9fc19bcb99c1..3447a0157e4c5 100644
--- a/library/std/src/sys/pal/windows/args.rs
+++ b/library/std/src/sys/pal/windows/args.rs
@@ -327,7 +327,7 @@ pub(crate) fn make_bat_command_line(
     force_quotes: bool,
 ) -> io::Result<Vec<u16>> {
     const INVALID_ARGUMENT_ERROR: io::Error =
-        io::const_io_error!(io::ErrorKind::InvalidInput, r#"batch file arguments are invalid"#);
+        io::const_error!(io::ErrorKind::InvalidInput, r#"batch file arguments are invalid"#);
     // Set the start of the command line to `cmd.exe /c "`
     // It is necessary to surround the command in an extra pair of quotes,
     // hence the trailing quote here. It will be closed after all arguments
@@ -340,7 +340,7 @@ pub(crate) fn make_bat_command_line(
     // Windows file names cannot contain a `"` character or end with `\\`.
     // If the script name does then return an error.
     if script.contains(&(b'"' as u16)) || script.last() == Some(&(b'\\' as u16)) {
-        return Err(io::const_io_error!(
+        return Err(io::const_error!(
             io::ErrorKind::InvalidInput,
             "Windows file names may not contain `\"` or end with `\\`"
         ));
diff --git a/library/std/src/sys/pal/windows/fs.rs b/library/std/src/sys/pal/windows/fs.rs
index 07e4f93a37956..5bdd5f81b9c3d 100644
--- a/library/std/src/sys/pal/windows/fs.rs
+++ b/library/std/src/sys/pal/windows/fs.rs
@@ -677,7 +677,7 @@ impl File {
                     )
                 }
                 _ => {
-                    return Err(io::const_io_error!(
+                    return Err(io::const_error!(
                         io::ErrorKind::Uncategorized,
                         "Unsupported reparse point type",
                     ));
@@ -718,7 +718,7 @@ impl File {
             || times.modified.map_or(false, is_zero)
             || times.created.map_or(false, is_zero)
         {
-            return Err(io::const_io_error!(
+            return Err(io::const_error!(
                 io::ErrorKind::InvalidInput,
                 "Cannot set file timestamp to 0",
             ));
@@ -728,7 +728,7 @@ impl File {
             || times.modified.map_or(false, is_max)
             || times.created.map_or(false, is_max)
         {
-            return Err(io::const_io_error!(
+            return Err(io::const_error!(
                 io::ErrorKind::InvalidInput,
                 "Cannot set file timestamp to 0xFFFF_FFFF_FFFF_FFFF",
             ));
@@ -1305,10 +1305,9 @@ pub fn link(original: &Path, link: &Path) -> io::Result<()> {
 
 #[cfg(target_vendor = "uwp")]
 pub fn link(_original: &Path, _link: &Path) -> io::Result<()> {
-    return Err(io::const_io_error!(
-        io::ErrorKind::Unsupported,
-        "hard link are not supported on UWP",
-    ));
+    return Err(
+        io::const_error!(io::ErrorKind::Unsupported, "hard link are not supported on UWP",),
+    );
 }
 
 pub fn stat(path: &Path) -> io::Result<FileAttr> {
@@ -1495,7 +1494,7 @@ pub fn junction_point(original: &Path, link: &Path) -> io::Result<()> {
             let bytes = unsafe { OsStr::from_encoded_bytes_unchecked(&abs_path[2..]) };
             r"\??\UNC\".encode_utf16().chain(bytes.encode_wide()).collect()
         } else {
-            return Err(io::const_io_error!(io::ErrorKind::InvalidInput, "path is not valid"));
+            return Err(io::const_error!(io::ErrorKind::InvalidInput, "path is not valid"));
         }
     };
     // Defined inline so we don't have to mess about with variable length buffer.
@@ -1512,10 +1511,7 @@ pub fn junction_point(original: &Path, link: &Path) -> io::Result<()> {
     }
     let data_len = 12 + (abs_path.len() * 2);
     if data_len > u16::MAX as usize {
-        return Err(io::const_io_error!(
-            io::ErrorKind::InvalidInput,
-            "`original` path is too long"
-        ));
+        return Err(io::const_error!(io::ErrorKind::InvalidInput, "`original` path is too long"));
     }
     let data_len = data_len as u16;
     let mut header = MountPointBuffer {
diff --git a/library/std/src/sys/pal/windows/mod.rs b/library/std/src/sys/pal/windows/mod.rs
index aca69490d7a1a..d66ff15e10bf6 100644
--- a/library/std/src/sys/pal/windows/mod.rs
+++ b/library/std/src/sys/pal/windows/mod.rs
@@ -183,7 +183,7 @@ pub fn to_u16s<S: AsRef<OsStr>>(s: S) -> crate::io::Result<Vec<u16>> {
         maybe_result.extend(s.encode_wide());
 
         if unrolled_find_u16s(0, &maybe_result).is_some() {
-            return Err(crate::io::const_io_error!(
+            return Err(crate::io::const_error!(
                 ErrorKind::InvalidInput,
                 "strings passed to WinAPI cannot contain NULs",
             ));
diff --git a/library/std/src/sys/pal/windows/net.rs b/library/std/src/sys/pal/windows/net.rs
index fd62d1f407c27..a92853c642c06 100644
--- a/library/std/src/sys/pal/windows/net.rs
+++ b/library/std/src/sys/pal/windows/net.rs
@@ -267,7 +267,7 @@ impl Socket {
                 };
 
                 match count {
-                    0 => Err(io::const_io_error!(io::ErrorKind::TimedOut, "connection timed out")),
+                    0 => Err(io::const_error!(io::ErrorKind::TimedOut, "connection timed out")),
                     _ => {
                         if writefds.fd_count != 1 {
                             if let Some(e) = self.take_error()? {
diff --git a/library/std/src/sys/pal/windows/process.rs b/library/std/src/sys/pal/windows/process.rs
index 17bb03fe7af04..da0daacd1dde3 100644
--- a/library/std/src/sys/pal/windows/process.rs
+++ b/library/std/src/sys/pal/windows/process.rs
@@ -144,7 +144,7 @@ impl AsRef<OsStr> for EnvKey {
 
 pub(crate) fn ensure_no_nuls<T: AsRef<OsStr>>(str: T) -> io::Result<T> {
     if str.as_ref().encode_wide().any(|b| b == 0) {
-        Err(io::const_io_error!(ErrorKind::InvalidInput, "nul byte found in provided data"))
+        Err(io::const_error!(ErrorKind::InvalidInput, "nul byte found in provided data"))
     } else {
         Ok(str)
     }
@@ -439,10 +439,9 @@ fn resolve_exe<'a>(
 ) -> io::Result<Vec<u16>> {
     // Early return if there is no filename.
     if exe_path.is_empty() || path::has_trailing_slash(exe_path) {
-        return Err(io::const_io_error!(
-            io::ErrorKind::InvalidInput,
-            "program path has no file name",
-        ));
+        return Err(
+            io::const_error!(io::ErrorKind::InvalidInput, "program path has no file name",),
+        );
     }
     // Test if the file name has the `exe` extension.
     // This does a case-insensitive `ends_with`.
@@ -492,7 +491,7 @@ fn resolve_exe<'a>(
         }
     }
     // If we get here then the executable cannot be found.
-    Err(io::const_io_error!(io::ErrorKind::NotFound, "program not found"))
+    Err(io::const_error!(io::ErrorKind::NotFound, "program not found"))
 }
 
 // Calls `f` for every path that should be used to find an executable.
@@ -921,7 +920,7 @@ fn make_proc_thread_attribute_list(
     // a null pointer to retrieve the required size.
     let mut required_size = 0;
     let Ok(attribute_count) = attributes.len().try_into() else {
-        return Err(io::const_io_error!(
+        return Err(io::const_error!(
             ErrorKind::InvalidInput,
             "maximum number of ProcThreadAttributes exceeded",
         ));
diff --git a/library/std/src/sys/pal/windows/stdio.rs b/library/std/src/sys/pal/windows/stdio.rs
index 575f2250eb91c..642c8bc4df7d1 100644
--- a/library/std/src/sys/pal/windows/stdio.rs
+++ b/library/std/src/sys/pal/windows/stdio.rs
@@ -107,7 +107,7 @@ fn write(handle_id: u32, data: &[u8], incomplete_utf8: &mut IncompleteUtf8) -> i
         if data[0] >> 6 != 0b10 {
             // not a continuation byte - reject
             incomplete_utf8.len = 0;
-            return Err(io::const_io_error!(
+            return Err(io::const_error!(
                 io::ErrorKind::InvalidData,
                 "Windows stdio in console mode does not support writing non-UTF-8 byte sequences",
             ));
@@ -129,7 +129,7 @@ fn write(handle_id: u32, data: &[u8], incomplete_utf8: &mut IncompleteUtf8) -> i
                 return Ok(1);
             }
             Err(_) => {
-                return Err(io::const_io_error!(
+                return Err(io::const_error!(
                     io::ErrorKind::InvalidData,
                     "Windows stdio in console mode does not support writing non-UTF-8 byte sequences",
                 ));
@@ -153,7 +153,7 @@ fn write(handle_id: u32, data: &[u8], incomplete_utf8: &mut IncompleteUtf8) -> i
                 incomplete_utf8.len = 1;
                 return Ok(1);
             } else {
-                return Err(io::const_io_error!(
+                return Err(io::const_error!(
                     io::ErrorKind::InvalidData,
                     "Windows stdio in console mode does not support writing non-UTF-8 byte sequences",
                 ));
@@ -392,7 +392,7 @@ fn utf16_to_utf8(utf16: &[u16], utf8: &mut [u8]) -> io::Result<usize> {
     };
     if result == 0 {
         // We can't really do any better than forget all data and return an error.
-        Err(io::const_io_error!(
+        Err(io::const_error!(
             io::ErrorKind::InvalidData,
             "Windows stdin in console mode does not support non-UTF-16 input; \
             encountered unpaired surrogate",
diff --git a/library/std/src/sys/pal/xous/net/dns.rs b/library/std/src/sys/pal/xous/net/dns.rs
index 1a2b56b4da5d3..ff6e49ed2d430 100644
--- a/library/std/src/sys/pal/xous/net/dns.rs
+++ b/library/std/src/sys/pal/xous/net/dns.rs
@@ -107,7 +107,7 @@ impl TryFrom<&str> for LookupHost {
             ($e:expr, $msg:expr) => {
                 match $e {
                     Some(r) => r,
-                    None => return Err(io::const_io_error!(io::ErrorKind::InvalidInput, &$msg)),
+                    None => return Err(io::const_error!(io::ErrorKind::InvalidInput, &$msg)),
                 }
             };
         }
@@ -123,7 +123,6 @@ impl TryFrom<(&str, u16)> for LookupHost {
     type Error = io::Error;
 
     fn try_from(v: (&str, u16)) -> io::Result<LookupHost> {
-        lookup(v.0, v.1)
-            .map_err(|_e| io::const_io_error!(io::ErrorKind::InvalidInput, &"DNS failure"))
+        lookup(v.0, v.1).map_err(|_e| io::const_error!(io::ErrorKind::InvalidInput, &"DNS failure"))
     }
 }
diff --git a/library/std/src/sys/pal/xous/net/tcplistener.rs b/library/std/src/sys/pal/xous/net/tcplistener.rs
index ddfb289162b69..640a02a64f525 100644
--- a/library/std/src/sys/pal/xous/net/tcplistener.rs
+++ b/library/std/src/sys/pal/xous/net/tcplistener.rs
@@ -9,7 +9,7 @@ use crate::{fmt, io};
 
 macro_rules! unimpl {
     () => {
-        return Err(io::const_io_error!(
+        return Err(io::const_error!(
             io::ErrorKind::Unsupported,
             &"This function is not yet implemented",
         ));
@@ -71,7 +71,7 @@ impl TcpListener {
             0,
             4096,
         ) else {
-            return Err(io::const_io_error!(io::ErrorKind::InvalidInput, &"Invalid response"));
+            return Err(io::const_error!(io::ErrorKind::InvalidInput, &"Invalid response"));
         };
 
         // The first four bytes should be zero upon success, and will be nonzero
@@ -80,16 +80,13 @@ impl TcpListener {
         if response[0] != 0 || valid == 0 {
             let errcode = response[1];
             if errcode == NetError::SocketInUse as u8 {
-                return Err(io::const_io_error!(io::ErrorKind::ResourceBusy, &"Socket in use"));
+                return Err(io::const_error!(io::ErrorKind::ResourceBusy, &"Socket in use"));
             } else if errcode == NetError::Invalid as u8 {
-                return Err(io::const_io_error!(
-                    io::ErrorKind::AddrNotAvailable,
-                    &"Invalid address"
-                ));
+                return Err(io::const_error!(io::ErrorKind::AddrNotAvailable, &"Invalid address"));
             } else if errcode == NetError::LibraryError as u8 {
-                return Err(io::const_io_error!(io::ErrorKind::Other, &"Library error"));
+                return Err(io::const_error!(io::ErrorKind::Other, &"Library error"));
             } else {
-                return Err(io::const_io_error!(
+                return Err(io::const_error!(
                     io::ErrorKind::Other,
                     &"Unable to connect or internal error"
                 ));
@@ -130,16 +127,15 @@ impl TcpListener {
             if receive_request.raw[0] != 0 {
                 // error case
                 if receive_request.raw[1] == NetError::TimedOut as u8 {
-                    return Err(io::const_io_error!(io::ErrorKind::TimedOut, &"accept timed out",));
+                    return Err(io::const_error!(io::ErrorKind::TimedOut, &"accept timed out",));
                 } else if receive_request.raw[1] == NetError::WouldBlock as u8 {
-                    return Err(io::const_io_error!(
-                        io::ErrorKind::WouldBlock,
-                        &"accept would block",
-                    ));
+                    return Err(
+                        io::const_error!(io::ErrorKind::WouldBlock, &"accept would block",),
+                    );
                 } else if receive_request.raw[1] == NetError::LibraryError as u8 {
-                    return Err(io::const_io_error!(io::ErrorKind::Other, &"Library error"));
+                    return Err(io::const_error!(io::ErrorKind::Other, &"Library error"));
                 } else {
-                    return Err(io::const_io_error!(io::ErrorKind::Other, &"library error",));
+                    return Err(io::const_error!(io::ErrorKind::Other, &"library error",));
                 }
             } else {
                 // accept successful
@@ -163,7 +159,7 @@ impl TcpListener {
                         port,
                     )
                 } else {
-                    return Err(io::const_io_error!(io::ErrorKind::Other, &"library error",));
+                    return Err(io::const_error!(io::ErrorKind::Other, &"library error",));
                 };
 
                 // replenish the listener
@@ -175,7 +171,7 @@ impl TcpListener {
                 Ok((TcpStream::from_listener(stream_fd, self.local.port(), port, addr), addr))
             }
         } else {
-            Err(io::const_io_error!(io::ErrorKind::InvalidInput, &"Unable to accept"))
+            Err(io::const_error!(io::ErrorKind::InvalidInput, &"Unable to accept"))
         }
     }
 
@@ -192,7 +188,7 @@ impl TcpListener {
             services::net_server(),
             services::NetBlockingScalar::StdSetTtlTcp(self.fd.load(Ordering::Relaxed), ttl).into(),
         )
-        .or(Err(io::const_io_error!(io::ErrorKind::InvalidInput, &"Unexpected return value")))
+        .or(Err(io::const_error!(io::ErrorKind::InvalidInput, &"Unexpected return value")))
         .map(|_| ())
     }
 
@@ -201,7 +197,7 @@ impl TcpListener {
             services::net_server(),
             services::NetBlockingScalar::StdGetTtlTcp(self.fd.load(Ordering::Relaxed)).into(),
         )
-        .or(Err(io::const_io_error!(io::ErrorKind::InvalidInput, &"Unexpected return value")))
+        .or(Err(io::const_error!(io::ErrorKind::InvalidInput, &"Unexpected return value")))
         .map(|res| res[0] as _)?)
     }
 
diff --git a/library/std/src/sys/pal/xous/net/tcpstream.rs b/library/std/src/sys/pal/xous/net/tcpstream.rs
index 03442cf2fcdfd..572dd6b3b6398 100644
--- a/library/std/src/sys/pal/xous/net/tcpstream.rs
+++ b/library/std/src/sys/pal/xous/net/tcpstream.rs
@@ -10,7 +10,7 @@ use crate::time::Duration;
 
 macro_rules! unimpl {
     () => {
-        return Err(io::const_io_error!(
+        return Err(io::const_error!(
             io::ErrorKind::Unsupported,
             &"This function is not yet implemented",
         ));
@@ -96,7 +96,7 @@ impl TcpStream {
             0,
             4096,
         ) else {
-            return Err(io::const_io_error!(io::ErrorKind::InvalidInput, &"Invalid response"));
+            return Err(io::const_error!(io::ErrorKind::InvalidInput, &"Invalid response"));
         };
 
         // The first four bytes should be zero upon success, and will be nonzero
@@ -106,14 +106,11 @@ impl TcpStream {
             // errcode is a u8 but stuck in a u16 where the upper byte is invalid. Mask & decode accordingly.
             let errcode = response[0];
             if errcode == NetError::SocketInUse as u8 {
-                return Err(io::const_io_error!(io::ErrorKind::ResourceBusy, &"Socket in use",));
+                return Err(io::const_error!(io::ErrorKind::ResourceBusy, &"Socket in use",));
             } else if errcode == NetError::Unaddressable as u8 {
-                return Err(io::const_io_error!(
-                    io::ErrorKind::AddrNotAvailable,
-                    &"Invalid address",
-                ));
+                return Err(io::const_error!(io::ErrorKind::AddrNotAvailable, &"Invalid address",));
             } else {
-                return Err(io::const_io_error!(
+                return Err(io::const_error!(
                     io::ErrorKind::InvalidInput,
                     &"Unable to connect or internal error",
                 ));
@@ -199,7 +196,7 @@ impl TcpStream {
             self.read_timeout.load(Ordering::Relaxed) as usize,
             data_to_read,
         ) else {
-            return Err(io::const_io_error!(
+            return Err(io::const_error!(
                 io::ErrorKind::InvalidInput,
                 &"Library failure: wrong message type or messaging error"
             ));
@@ -215,14 +212,14 @@ impl TcpStream {
             if result[0] != 0 {
                 if result[1] == 8 {
                     // timed out
-                    return Err(io::const_io_error!(io::ErrorKind::TimedOut, &"Timeout",));
+                    return Err(io::const_error!(io::ErrorKind::TimedOut, &"Timeout",));
                 }
                 if result[1] == 9 {
                     // would block
-                    return Err(io::const_io_error!(io::ErrorKind::WouldBlock, &"Would block",));
+                    return Err(io::const_error!(io::ErrorKind::WouldBlock, &"Would block",));
                 }
             }
-            Err(io::const_io_error!(io::ErrorKind::Other, &"recv_slice failure"))
+            Err(io::const_error!(io::ErrorKind::Other, &"recv_slice failure"))
         }
     }
 
@@ -261,23 +258,20 @@ impl TcpStream {
             self.write_timeout.load(Ordering::Relaxed) as usize,
             buf_len,
         )
-        .or(Err(io::const_io_error!(io::ErrorKind::InvalidInput, &"Internal error")))?;
+        .or(Err(io::const_error!(io::ErrorKind::InvalidInput, &"Internal error")))?;
 
         if send_request.raw[0] != 0 {
             if send_request.raw[4] == 8 {
                 // timed out
-                return Err(io::const_io_error!(
+                return Err(io::const_error!(
                     io::ErrorKind::BrokenPipe,
                     &"Timeout or connection closed",
                 ));
             } else if send_request.raw[4] == 9 {
                 // would block
-                return Err(io::const_io_error!(io::ErrorKind::WouldBlock, &"Would block",));
+                return Err(io::const_error!(io::ErrorKind::WouldBlock, &"Would block",));
             } else {
-                return Err(io::const_io_error!(
-                    io::ErrorKind::InvalidInput,
-                    &"Error when sending",
-                ));
+                return Err(io::const_error!(io::ErrorKind::InvalidInput, &"Error when sending",));
             }
         }
         Ok(u32::from_le_bytes([
@@ -310,7 +304,7 @@ impl TcpStream {
             0,
             0,
         ) else {
-            return Err(io::const_io_error!(io::ErrorKind::InvalidInput, &"Internal error"));
+            return Err(io::const_error!(io::ErrorKind::InvalidInput, &"Internal error"));
         };
         let mut i = get_addr.raw.iter();
         match *i.next().unwrap() {
@@ -330,7 +324,7 @@ impl TcpStream {
                 }
                 Ok(SocketAddr::V6(SocketAddrV6::new(new_addr.into(), self.local_port, 0, 0)))
             }
-            _ => Err(io::const_io_error!(io::ErrorKind::InvalidInput, &"Internal error")),
+            _ => Err(io::const_error!(io::ErrorKind::InvalidInput, &"Internal error")),
         }
     }
 
@@ -339,7 +333,7 @@ impl TcpStream {
             services::net_server(),
             services::NetBlockingScalar::StdTcpStreamShutdown(self.fd, how).into(),
         )
-        .or(Err(io::const_io_error!(io::ErrorKind::InvalidInput, &"Unexpected return value")))
+        .or(Err(io::const_error!(io::ErrorKind::InvalidInput, &"Unexpected return value")))
         .map(|_| ())
     }
 
@@ -361,7 +355,7 @@ impl TcpStream {
             services::net_server(),
             services::NetBlockingScalar::StdSetNodelay(self.fd, enabled).into(),
         )
-        .or(Err(io::const_io_error!(io::ErrorKind::InvalidInput, &"Unexpected return value")))
+        .or(Err(io::const_error!(io::ErrorKind::InvalidInput, &"Unexpected return value")))
         .map(|_| ())
     }
 
@@ -370,7 +364,7 @@ impl TcpStream {
             services::net_server(),
             services::NetBlockingScalar::StdGetNodelay(self.fd).into(),
         )
-        .or(Err(io::const_io_error!(io::ErrorKind::InvalidInput, &"Unexpected return value")))
+        .or(Err(io::const_error!(io::ErrorKind::InvalidInput, &"Unexpected return value")))
         .map(|res| res[0] != 0)?)
     }
 
@@ -382,7 +376,7 @@ impl TcpStream {
             services::net_server(),
             services::NetBlockingScalar::StdSetTtlTcp(self.fd, ttl).into(),
         )
-        .or(Err(io::const_io_error!(io::ErrorKind::InvalidInput, &"Unexpected return value")))
+        .or(Err(io::const_error!(io::ErrorKind::InvalidInput, &"Unexpected return value")))
         .map(|_| ())
     }
 
@@ -391,7 +385,7 @@ impl TcpStream {
             services::net_server(),
             services::NetBlockingScalar::StdGetTtlTcp(self.fd).into(),
         )
-        .or(Err(io::const_io_error!(io::ErrorKind::InvalidInput, &"Unexpected return value")))
+        .or(Err(io::const_error!(io::ErrorKind::InvalidInput, &"Unexpected return value")))
         .map(|res| res[0] as _)?)
     }
 
diff --git a/library/std/src/sys/pal/xous/net/udp.rs b/library/std/src/sys/pal/xous/net/udp.rs
index de5133280ba9d..1b7ecac6d3a7e 100644
--- a/library/std/src/sys/pal/xous/net/udp.rs
+++ b/library/std/src/sys/pal/xous/net/udp.rs
@@ -11,7 +11,7 @@ use crate::{fmt, io};
 
 macro_rules! unimpl {
     () => {
-        return Err(io::const_io_error!(
+        return Err(io::const_error!(
             io::ErrorKind::Unsupported,
             &"This function is not yet implemented",
         ));
@@ -72,16 +72,16 @@ impl UdpSocket {
             if response[0] != 0 || valid == 0 {
                 let errcode = response[1];
                 if errcode == NetError::SocketInUse as u8 {
-                    return Err(io::const_io_error!(io::ErrorKind::ResourceBusy, &"Socket in use"));
+                    return Err(io::const_error!(io::ErrorKind::ResourceBusy, &"Socket in use"));
                 } else if errcode == NetError::Invalid as u8 {
-                    return Err(io::const_io_error!(
+                    return Err(io::const_error!(
                         io::ErrorKind::InvalidInput,
                         &"Port can't be 0 or invalid address"
                     ));
                 } else if errcode == NetError::LibraryError as u8 {
-                    return Err(io::const_io_error!(io::ErrorKind::Other, &"Library error"));
+                    return Err(io::const_error!(io::ErrorKind::Other, &"Library error"));
                 } else {
-                    return Err(io::const_io_error!(
+                    return Err(io::const_error!(
                         io::ErrorKind::Other,
                         &"Unable to connect or internal error"
                     ));
@@ -98,13 +98,13 @@ impl UdpSocket {
                 nonblocking: Cell::new(false),
             });
         }
-        Err(io::const_io_error!(io::ErrorKind::InvalidInput, &"Invalid response"))
+        Err(io::const_error!(io::ErrorKind::InvalidInput, &"Invalid response"))
     }
 
     pub fn peer_addr(&self) -> io::Result<SocketAddr> {
         match self.remote.get() {
             Some(dest) => Ok(dest),
-            None => Err(io::const_io_error!(io::ErrorKind::NotConnected, &"No peer specified")),
+            None => Err(io::const_error!(io::ErrorKind::NotConnected, &"No peer specified")),
         }
     }
 
@@ -141,16 +141,13 @@ impl UdpSocket {
             if receive_request.raw[0] != 0 {
                 // error case
                 if receive_request.raw[1] == NetError::TimedOut as u8 {
-                    return Err(io::const_io_error!(io::ErrorKind::TimedOut, &"recv timed out",));
+                    return Err(io::const_error!(io::ErrorKind::TimedOut, &"recv timed out",));
                 } else if receive_request.raw[1] == NetError::WouldBlock as u8 {
-                    return Err(io::const_io_error!(
-                        io::ErrorKind::WouldBlock,
-                        &"recv would block",
-                    ));
+                    return Err(io::const_error!(io::ErrorKind::WouldBlock, &"recv would block",));
                 } else if receive_request.raw[1] == NetError::LibraryError as u8 {
-                    return Err(io::const_io_error!(io::ErrorKind::Other, &"Library error"));
+                    return Err(io::const_error!(io::ErrorKind::Other, &"Library error"));
                 } else {
-                    return Err(io::const_io_error!(io::ErrorKind::Other, &"library error",));
+                    return Err(io::const_error!(io::ErrorKind::Other, &"library error",));
                 }
             } else {
                 let rr = &receive_request.raw;
@@ -173,7 +170,7 @@ impl UdpSocket {
                         port,
                     )
                 } else {
-                    return Err(io::const_io_error!(io::ErrorKind::Other, &"library error",));
+                    return Err(io::const_error!(io::ErrorKind::Other, &"library error",));
                 };
                 for (&s, d) in rr[22..22 + rxlen as usize].iter().zip(buf.iter_mut()) {
                     *d = s;
@@ -181,7 +178,7 @@ impl UdpSocket {
                 Ok((rxlen as usize, addr))
             }
         } else {
-            Err(io::const_io_error!(io::ErrorKind::InvalidInput, &"Unable to recv"))
+            Err(io::const_error!(io::ErrorKind::InvalidInput, &"Unable to recv"))
         }
     }
 
@@ -211,7 +208,7 @@ impl UdpSocket {
         if let Some(addr) = self.remote.get() {
             self.send_to(buf, &addr)
         } else {
-            Err(io::const_io_error!(io::ErrorKind::NotConnected, &"No remote specified"))
+            Err(io::const_error!(io::ErrorKind::NotConnected, &"No remote specified"))
         }
     }
 
@@ -282,22 +279,19 @@ impl UdpSocket {
                     if response[0] != 0 || valid == 0 {
                         let errcode = response[1];
                         if errcode == NetError::SocketInUse as u8 {
-                            return Err(io::const_io_error!(
+                            return Err(io::const_error!(
                                 io::ErrorKind::ResourceBusy,
                                 &"Socket in use"
                             ));
                         } else if errcode == NetError::Invalid as u8 {
-                            return Err(io::const_io_error!(
+                            return Err(io::const_error!(
                                 io::ErrorKind::InvalidInput,
                                 &"Socket not valid"
                             ));
                         } else if errcode == NetError::LibraryError as u8 {
-                            return Err(io::const_io_error!(
-                                io::ErrorKind::Other,
-                                &"Library error"
-                            ));
+                            return Err(io::const_error!(io::ErrorKind::Other, &"Library error"));
                         } else {
-                            return Err(io::const_io_error!(
+                            return Err(io::const_error!(
                                 io::ErrorKind::Other,
                                 &"Unable to connect"
                             ));
@@ -309,7 +303,7 @@ impl UdpSocket {
                 }
                 Err(crate::os::xous::ffi::Error::ServerQueueFull) => {
                     if now.elapsed() >= write_timeout {
-                        return Err(io::const_io_error!(
+                        return Err(io::const_error!(
                             io::ErrorKind::WouldBlock,
                             &"Write timed out"
                         ));
@@ -318,7 +312,7 @@ impl UdpSocket {
                         crate::thread::yield_now();
                     }
                 }
-                _ => return Err(io::const_io_error!(io::ErrorKind::Other, &"Library error")),
+                _ => return Err(io::const_error!(io::ErrorKind::Other, &"Library error")),
             }
         }
     }
@@ -372,7 +366,7 @@ impl UdpSocket {
             services::net_server(),
             services::NetBlockingScalar::StdSetTtlUdp(self.fd, ttl).into(),
         )
-        .or(Err(io::const_io_error!(io::ErrorKind::InvalidInput, &"Unexpected return value")))
+        .or(Err(io::const_error!(io::ErrorKind::InvalidInput, &"Unexpected return value")))
         .map(|_| ())
     }
 
@@ -381,7 +375,7 @@ impl UdpSocket {
             services::net_server(),
             services::NetBlockingScalar::StdGetTtlUdp(self.fd).into(),
         )
-        .or(Err(io::const_io_error!(io::ErrorKind::InvalidInput, &"Unexpected return value")))
+        .or(Err(io::const_error!(io::ErrorKind::InvalidInput, &"Unexpected return value")))
         .map(|res| res[0] as _)?)
     }
 
diff --git a/library/std/src/sys/pal/zkvm/os.rs b/library/std/src/sys/pal/zkvm/os.rs
index 5d224ffd1ba5a..868b19e33b672 100644
--- a/library/std/src/sys/pal/zkvm/os.rs
+++ b/library/std/src/sys/pal/zkvm/os.rs
@@ -115,11 +115,11 @@ pub fn getenv(varname: &OsStr) -> Option<OsString> {
 }
 
 pub unsafe fn setenv(_: &OsStr, _: &OsStr) -> io::Result<()> {
-    Err(io::const_io_error!(io::ErrorKind::Unsupported, "cannot set env vars on this platform"))
+    Err(io::const_error!(io::ErrorKind::Unsupported, "cannot set env vars on this platform"))
 }
 
 pub unsafe fn unsetenv(_: &OsStr) -> io::Result<()> {
-    Err(io::const_io_error!(io::ErrorKind::Unsupported, "cannot unset env vars on this platform"))
+    Err(io::const_error!(io::ErrorKind::Unsupported, "cannot unset env vars on this platform"))
 }
 
 pub fn temp_dir() -> PathBuf {
diff --git a/library/std/src/sys/path/windows.rs b/library/std/src/sys/path/windows.rs
index 9267602cb9715..de042fa3f82ab 100644
--- a/library/std/src/sys/path/windows.rs
+++ b/library/std/src/sys/path/windows.rs
@@ -328,7 +328,7 @@ pub(crate) fn absolute(path: &Path) -> io::Result<PathBuf> {
     if prefix.map(|x| x.is_verbatim()).unwrap_or(false) {
         // NULs in verbatim paths are rejected for consistency.
         if path.as_encoded_bytes().contains(&0) {
-            return Err(io::const_io_error!(
+            return Err(io::const_error!(
                 io::ErrorKind::InvalidInput,
                 "strings passed to WinAPI cannot contain NULs",
             ));
diff --git a/library/std/src/sys_common/fs.rs b/library/std/src/sys_common/fs.rs
index a25a7244660bb..bfd684d295b89 100644
--- a/library/std/src/sys_common/fs.rs
+++ b/library/std/src/sys_common/fs.rs
@@ -5,7 +5,7 @@ use crate::io::{self, Error, ErrorKind};
 use crate::path::Path;
 use crate::sys_common::ignore_notfound;
 
-pub(crate) const NOT_FILE_ERROR: Error = io::const_io_error!(
+pub(crate) const NOT_FILE_ERROR: Error = io::const_error!(
     ErrorKind::InvalidInput,
     "the source path is neither a regular file nor a symlink to a regular file",
 );
diff --git a/library/std/src/sys_common/net.rs b/library/std/src/sys_common/net.rs
index 5a0ad90758101..74306978d2284 100644
--- a/library/std/src/sys_common/net.rs
+++ b/library/std/src/sys_common/net.rs
@@ -122,7 +122,7 @@ pub fn sockaddr_to_addr(storage: &c::sockaddr_storage, len: usize) -> io::Result
                 *(storage as *const _ as *const c::sockaddr_in6)
             })))
         }
-        _ => Err(io::const_io_error!(ErrorKind::InvalidInput, "invalid argument")),
+        _ => Err(io::const_error!(ErrorKind::InvalidInput, "invalid argument")),
     }
 }
 
@@ -185,7 +185,7 @@ impl TryFrom<&str> for LookupHost {
             ($e:expr, $msg:expr) => {
                 match $e {
                     Some(r) => r,
-                    None => return Err(io::const_io_error!(io::ErrorKind::InvalidInput, $msg)),
+                    None => return Err(io::const_error!(io::ErrorKind::InvalidInput, $msg)),
                 }
             };
         }

From 402bdd183bc8db8cdbd8a582e69d40a09e971a2e Mon Sep 17 00:00:00 2001
From: Hans Wennborg <hans@chromium.org>
Date: Mon, 25 Nov 2024 15:30:32 +0100
Subject: [PATCH 29/38] Update test expectations to accept LLVM 'initializes'
 attribute

The test was checking for two `ptr` arguments by matching commas (or
non-commas), however after
https://github.com/llvm/llvm-project/pull/117104 LLVM adds an
`initializes((0, 16))` attribute, which includes a comma.

So instead, we make the test check for two LLVM values, i.e. something
prefixed by %.

(See also https://crbug.com/380707238)
---
 tests/codegen/aarch64-softfloat.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/codegen/aarch64-softfloat.rs b/tests/codegen/aarch64-softfloat.rs
index 14d0054f80cd0..85380a6c4728d 100644
--- a/tests/codegen/aarch64-softfloat.rs
+++ b/tests/codegen/aarch64-softfloat.rs
@@ -41,7 +41,7 @@ fn pass_f32_pair_Rust(x: (f32, f32)) -> (f32, f32) {
     x
 }
 
-// CHECK: void @pass_f64_pair_Rust(ptr {{[^,]*}}, ptr {{[^,]*}})
+// CHECK: void @pass_f64_pair_Rust(ptr {{.*}}%{{[^ ]+}}, ptr {{.*}}%{{[^ ]+}})
 #[no_mangle]
 fn pass_f64_pair_Rust(x: (f64, f64)) -> (f64, f64) {
     x

From 9f1cfec299a1060bdd8382d3e6a6ebd8dc64d3ab Mon Sep 17 00:00:00 2001
From: Henry Jiang <henry.jiang1@ibm.com>
Date: Mon, 25 Nov 2024 11:15:50 -0500
Subject: [PATCH 30/38] use ReadCache for archive loading

---
 compiler/rustc_metadata/src/creader.rs |  2 +-
 src/bootstrap/Cargo.toml               |  2 +-
 src/bootstrap/src/utils/helpers.rs     | 14 +++++++-------
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/compiler/rustc_metadata/src/creader.rs b/compiler/rustc_metadata/src/creader.rs
index ebae968d005d6..007d9265165ff 100644
--- a/compiler/rustc_metadata/src/creader.rs
+++ b/compiler/rustc_metadata/src/creader.rs
@@ -1172,7 +1172,7 @@ fn attempt_load_dylib(path: &Path) -> Result<libloading::Library, libloading::Er
         // the expected format is lib<name>.a(libname.so) for the actual
         // dynamic library
         let library_name = path.file_stem().expect("expect a library name");
-        let mut archive_member = OsString::from("a(");
+        let mut archive_member = std::ffi::OsString::from("a(");
         archive_member.push(library_name);
         archive_member.push(".so)");
         let new_path = path.with_extension(archive_member);
diff --git a/src/bootstrap/Cargo.toml b/src/bootstrap/Cargo.toml
index 1aa49fa39ffbf..fcd97b7b5898f 100644
--- a/src/bootstrap/Cargo.toml
+++ b/src/bootstrap/Cargo.toml
@@ -47,7 +47,7 @@ fd-lock = "4.0"
 home = "0.5"
 ignore = "0.4"
 libc = "0.2"
-object = { version = "0.36.3", default-features = false, features = ["archive", "coff", "read_core", "unaligned"] }
+object = { version = "0.36.3", default-features = false, features = ["archive", "coff", "read_core", "std", "unaligned"] }
 opener = "0.5"
 semver = "1.0"
 serde = "1.0"
diff --git a/src/bootstrap/src/utils/helpers.rs b/src/bootstrap/src/utils/helpers.rs
index 9ca036a2afd43..079213e8c3da3 100644
--- a/src/bootstrap/src/utils/helpers.rs
+++ b/src/bootstrap/src/utils/helpers.rs
@@ -61,18 +61,18 @@ pub fn is_dylib(path: &Path) -> bool {
 }
 
 fn is_aix_shared_archive(path: &Path) -> bool {
-    // FIXME(#133268): reading the entire file as &[u8] into memory seems excessive
-    // look into either mmap it or use the ReadCache
-    let data = match fs::read(path) {
-        Ok(data) => data,
+    let file = match fs::File::open(path) {
+        Ok(file) => file,
         Err(_) => return false,
     };
-    let file = match ArchiveFile::parse(&*data) {
-        Ok(file) => file,
+    let reader = object::ReadCache::new(file);
+    let archive = match ArchiveFile::parse(&reader) {
+        Ok(result) => result,
         Err(_) => return false,
     };
 
-    file.members()
+    archive
+        .members()
         .filter_map(Result::ok)
         .any(|entry| String::from_utf8_lossy(entry.name()).contains(".so"))
 }

From d0a45cfeaa5e0861f0c363cc9d07aa94b429b820 Mon Sep 17 00:00:00 2001
From: Guillaume Gomez <guillaume1.gomez@gmail.com>
Date: Mon, 25 Nov 2024 16:15:46 +0100
Subject: [PATCH 31/38] Fix `Result` and `Option` not getting a jump to def
 link generated

---
 src/librustdoc/html/highlight.rs | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/librustdoc/html/highlight.rs b/src/librustdoc/html/highlight.rs
index 29f6f92a6b28e..b2fc1a47f78fb 100644
--- a/src/librustdoc/html/highlight.rs
+++ b/src/librustdoc/html/highlight.rs
@@ -181,6 +181,9 @@ impl<'a, 'tcx, F: Write> TokenHandler<'a, 'tcx, F> {
             // current parent tag is not the same as our pending content.
             let close_tag = if self.pending_elems.len() > 1
                 && let Some(current_class) = current_class
+                // `PreludeTy` can never include more than an ident so it should not generate
+                // a wrapping `span`.
+                && !matches!(current_class, Class::PreludeTy(_))
             {
                 Some(enter_span(self.out, current_class, &self.href_context))
             } else {
@@ -333,7 +336,7 @@ enum Class {
     /// `Ident` isn't rendered in the HTML but we still need it for the `Span` it contains.
     Ident(Span),
     Lifetime,
-    PreludeTy,
+    PreludeTy(Span),
     PreludeVal,
     QuestionMark,
     Decoration(&'static str),
@@ -381,7 +384,7 @@ impl Class {
             Class::Bool => "bool-val",
             Class::Ident(_) => "",
             Class::Lifetime => "lifetime",
-            Class::PreludeTy => "prelude-ty",
+            Class::PreludeTy(_) => "prelude-ty",
             Class::PreludeVal => "prelude-val",
             Class::QuestionMark => "question-mark",
             Class::Decoration(kind) => kind,
@@ -392,7 +395,7 @@ impl Class {
     /// a "span" (a tuple representing `(lo, hi)` equivalent of `Span`).
     fn get_span(self) -> Option<Span> {
         match self {
-            Self::Ident(sp) | Self::Self_(sp) | Self::Macro(sp) => Some(sp),
+            Self::Ident(sp) | Self::Self_(sp) | Self::Macro(sp) | Self::PreludeTy(sp) => Some(sp),
             Self::Comment
             | Self::DocComment
             | Self::Attribute
@@ -403,7 +406,6 @@ impl Class {
             | Self::Number
             | Self::Bool
             | Self::Lifetime
-            | Self::PreludeTy
             | Self::PreludeVal
             | Self::QuestionMark
             | Self::Decoration(_) => None,
@@ -411,6 +413,7 @@ impl Class {
     }
 }
 
+#[derive(Debug)]
 enum Highlight<'a> {
     Token { text: &'a str, class: Option<Class> },
     EnterSpan { class: Class },
@@ -847,7 +850,7 @@ impl<'src> Classifier<'src> {
             }
             TokenKind::Ident => match get_real_ident_class(text, false) {
                 None => match text {
-                    "Option" | "Result" => Class::PreludeTy,
+                    "Option" | "Result" => Class::PreludeTy(self.new_span(before, text)),
                     "Some" | "None" | "Ok" | "Err" => Class::PreludeVal,
                     // "union" is a weak keyword and is only considered as a keyword when declaring
                     // a union type.

From c8399255f3780072d1876ebed56decc7c78f378d Mon Sep 17 00:00:00 2001
From: Guillaume Gomez <guillaume1.gomez@gmail.com>
Date: Mon, 25 Nov 2024 16:33:38 +0100
Subject: [PATCH 32/38] Add regression test for prelude types

---
 tests/rustdoc/jump-to-def-prelude-types.rs | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 tests/rustdoc/jump-to-def-prelude-types.rs

diff --git a/tests/rustdoc/jump-to-def-prelude-types.rs b/tests/rustdoc/jump-to-def-prelude-types.rs
new file mode 100644
index 0000000000000..43617b1bc9df7
--- /dev/null
+++ b/tests/rustdoc/jump-to-def-prelude-types.rs
@@ -0,0 +1,23 @@
+// This test checks that prelude types like `Result` and `Option` still get a link generated.
+
+//@ compile-flags: -Zunstable-options --generate-link-to-definition
+
+#![crate_name = "foo"]
+
+//@ has 'src/foo/jump-to-def-prelude-types.rs.html'
+// FIXME: would be nice to be able to check both the class and the href at the same time so
+// we could check the text as well...
+//@ has - '//a[@class="prelude-ty"]/@href' '{{channel}}/core/result/enum.Result.html'
+//@ has - '//a[@class="prelude-ty"]/@href' '{{channel}}/core/option/enum.Option.html'
+pub fn foo() -> Result<Option<()>, ()> { Err(()) }
+
+// This part is to ensure that they are not linking to the actual prelude ty.
+pub mod bar {
+    struct Result;
+    struct Option;
+
+    //@ has - '//a[@href="#16"]' 'Result'
+    pub fn bar() -> Result { Result }
+    //@ has - '//a[@href="#17"]' 'Option'
+    pub fn bar2() -> Option { Option }
+}

From 8bc8adb8dcaa268e2b2bd9093f8f4f4bcb0b1a45 Mon Sep 17 00:00:00 2001
From: Ralf Jung <post@ralfj.de>
Date: Mon, 25 Nov 2024 18:29:36 +0100
Subject: [PATCH 33/38] std::thread: avoid leading whitespace in some panic
 messages

---
 library/std/src/thread/current.rs | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/library/std/src/thread/current.rs b/library/std/src/thread/current.rs
index b9b959f98946b..1048ef973560e 100644
--- a/library/std/src/thread/current.rs
+++ b/library/std/src/thread/current.rs
@@ -243,17 +243,17 @@ fn init_current(current: *mut ()) -> Thread {
         // a particular API should be entirely allocation-free, feel free to open
         // an issue on the Rust repository, we'll see what we can do.
         rtabort!(
-            "\n
-            Attempted to access thread-local data while allocating said data.\n
-            Do not access functions that allocate in the global allocator!\n
-            This is a bug in the global allocator.\n
-        "
+            "\n\
+            Attempted to access thread-local data while allocating said data.\n\
+            Do not access functions that allocate in the global allocator!\n\
+            This is a bug in the global allocator.\n\
+            "
         )
     } else {
         debug_assert_eq!(current, DESTROYED);
         panic!(
-            "use of std::thread::current() is not possible after the thread's
-         local data has been destroyed"
+            "use of std::thread::current() is not possible after the thread's \
+            local data has been destroyed"
         )
     }
 }

From b77d8fa12946472176094725055a07f9d0ce3440 Mon Sep 17 00:00:00 2001
From: Martin Nordholts <martin.nordholts@codetale.se>
Date: Mon, 25 Nov 2024 18:30:13 +0100
Subject: [PATCH 34/38] tests: Add recursive associated type bound regression
 tests

---
 .../129541-recursive-enum-and-array-impl.rs   | 22 ++++++++++++++++++
 ...29541-recursive-enum-and-array-impl.stderr | 10 ++++++++
 .../129541-recursive-struct-and-array-impl.rs | 23 +++++++++++++++++++
 .../solver-cycles/129541-recursive-struct.rs  | 19 +++++++++++++++
 4 files changed, 74 insertions(+)
 create mode 100644 tests/ui/traits/solver-cycles/129541-recursive-enum-and-array-impl.rs
 create mode 100644 tests/ui/traits/solver-cycles/129541-recursive-enum-and-array-impl.stderr
 create mode 100644 tests/ui/traits/solver-cycles/129541-recursive-struct-and-array-impl.rs
 create mode 100644 tests/ui/traits/solver-cycles/129541-recursive-struct.rs

diff --git a/tests/ui/traits/solver-cycles/129541-recursive-enum-and-array-impl.rs b/tests/ui/traits/solver-cycles/129541-recursive-enum-and-array-impl.rs
new file mode 100644
index 0000000000000..197207dfb4be8
--- /dev/null
+++ b/tests/ui/traits/solver-cycles/129541-recursive-enum-and-array-impl.rs
@@ -0,0 +1,22 @@
+// Regression test for #129541
+//~^ ERROR cycle detected when computing layout of `<[Hello] as Normalize>::Assoc` [E0391]
+
+trait Bound {}
+trait Normalize {
+    type Assoc;
+}
+
+impl<T: Bound> Normalize for T {
+    type Assoc = T;
+}
+
+impl<T: Bound> Normalize for [T] {
+    type Assoc = T;
+}
+
+impl Bound for Hello {}
+enum Hello {
+    Variant(<[Hello] as Normalize>::Assoc),
+}
+
+fn main() {}
diff --git a/tests/ui/traits/solver-cycles/129541-recursive-enum-and-array-impl.stderr b/tests/ui/traits/solver-cycles/129541-recursive-enum-and-array-impl.stderr
new file mode 100644
index 0000000000000..50dcea0bfac69
--- /dev/null
+++ b/tests/ui/traits/solver-cycles/129541-recursive-enum-and-array-impl.stderr
@@ -0,0 +1,10 @@
+error[E0391]: cycle detected when computing layout of `<[Hello] as Normalize>::Assoc`
+   |
+   = note: ...which requires computing layout of `Hello`...
+   = note: ...which again requires computing layout of `<[Hello] as Normalize>::Assoc`, completing the cycle
+   = note: cycle used when computing layout of `Hello`
+   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/traits/solver-cycles/129541-recursive-struct-and-array-impl.rs b/tests/ui/traits/solver-cycles/129541-recursive-struct-and-array-impl.rs
new file mode 100644
index 0000000000000..defb39aae06d4
--- /dev/null
+++ b/tests/ui/traits/solver-cycles/129541-recursive-struct-and-array-impl.rs
@@ -0,0 +1,23 @@
+// Regression test for #129541
+
+//@ check-pass
+
+trait Bound {}
+trait Normalize {
+    type Assoc;
+}
+
+impl<T: Bound> Normalize for T {
+    type Assoc = T;
+}
+
+impl<T: Bound> Normalize for [T] {
+    type Assoc = T;
+}
+
+impl Bound for Hello {}
+struct Hello {
+    a: <[Hello] as Normalize>::Assoc,
+}
+
+fn main() {}
diff --git a/tests/ui/traits/solver-cycles/129541-recursive-struct.rs b/tests/ui/traits/solver-cycles/129541-recursive-struct.rs
new file mode 100644
index 0000000000000..d4339dd54d6c7
--- /dev/null
+++ b/tests/ui/traits/solver-cycles/129541-recursive-struct.rs
@@ -0,0 +1,19 @@
+// Regression test for #129541
+
+//@ check-pass
+
+trait Bound {}
+trait Normalize {
+    type Assoc;
+}
+
+impl<T: Bound> Normalize for [T] {
+    type Assoc = T;
+}
+
+impl Bound for Hello {}
+struct Hello {
+    a: <[Hello] as Normalize>::Assoc,
+}
+
+fn main() {}

From f62753f84f355d2c8c67b257db6746c7ae58be2e Mon Sep 17 00:00:00 2001
From: Jieyou Xu <jieyouxu@outlook.com>
Date: Tue, 26 Nov 2024 00:37:33 +0800
Subject: [PATCH 35/38] compiletest: remove `pretty-expanded` directive and
 infra

Foreword
========

Let us begin the journey to rediscover what the `//@ pretty-expanded`
directive does, brave traveller --

    "My good friend, [..] when I wrote that passage, God and I knew what
    it meant. It is possible that God knows it still; but as for me, I
    have totally forgotten."

                                 -- Johann Paul Friedrich Richter, 1826

We must retrace the steps of those before us, for history shall guide us
in the present and inform us of the future.

The Past
========

Originally there was some effort to introduce more test coverage for `-Z
unpretty=expanded` (in 2015 this was called `--pretty=expanded`). In
[Make it an error to not declare used features #23598][pr-23598], there
was a flip from `//@ no-pretty-expanded` (opt-out of `-Z
unpretty=expanded` test) to `//@ pretty-expanded` (opt-in to `-Z
unpretty=expanded` test). This was needed because back then the
dedicated `tests/pretty` ("pretty") test suite did not existed, and the
pretty tests were grouped together under `run-pass` tests (I believe
`ui` test suite didn't exist back then either). Unfortunately, in this
process the replacement `//@ pretty-expanded` directives contained a
`FIXME #23616` linking to [There are very few tests for `-Z unpretty`
expansion #23616][issue-23616]. But this was arguably backwards and
somewhat misleading, as noted in
<https://github.com/rust-lang/rust/issues/23616#issuecomment-484999901>:

    The attribute is off by default and things just work if you don't
    test it, people have not been adding the `pretty-expanded`
    annotation to new tests even if it would work.

Which basically renders this useless.

The Present
===========

As of Nov 2024, we have a dedicated `pretty` test suite, and some time
over the years the split between `run-pass` into `ui` and `pretty` test
suites caused all of the `//@ pretty-expanded` in `ui` tests to do
absolutely nothing -- the compiletest logic for `pretty-expanded` only
triggered in the *pretty* test suite, but none of the pretty tests use
it. Oops.

The Future
==========

Nobody remembers this, nobody uses this, it's misleading in ui tests.
Let's get rid of this directive altogether.

[pr-23598]: https://github.com/rust-lang/rust/pull/23598
[issue-23616]: https://github.com/rust-lang/rust/issues/23616
---
 src/tools/compiletest/src/directive-list.rs |  1 -
 src/tools/compiletest/src/header.rs         |  5 -----
 src/tools/compiletest/src/runtest/pretty.rs | 16 ----------------
 3 files changed, 22 deletions(-)

diff --git a/src/tools/compiletest/src/directive-list.rs b/src/tools/compiletest/src/directive-list.rs
index bdd0b80b3957c..0c47ef871d217 100644
--- a/src/tools/compiletest/src/directive-list.rs
+++ b/src/tools/compiletest/src/directive-list.rs
@@ -214,7 +214,6 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
     "only-x86_64-unknown-linux-gnu",
     "pp-exact",
     "pretty-compare-only",
-    "pretty-expanded",
     "pretty-mode",
     "reference",
     "regex-error-pattern",
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
index 3539e85ba632b..e945797647e2d 100644
--- a/src/tools/compiletest/src/header.rs
+++ b/src/tools/compiletest/src/header.rs
@@ -124,8 +124,6 @@ pub struct TestProps {
     // a proc-macro and needs `#![crate_type = "proc-macro"]`. This ensures
     // that the aux file is compiled as a `proc-macro` and not as a `dylib`.
     pub no_prefer_dynamic: bool,
-    // Run -Zunpretty expanded when running pretty printing tests
-    pub pretty_expanded: bool,
     // Which pretty mode are we testing with, default to 'normal'
     pub pretty_mode: String,
     // Only compare pretty output and don't try compiling
@@ -218,7 +216,6 @@ mod directives {
     pub const DONT_CHECK_COMPILER_STDOUT: &'static str = "dont-check-compiler-stdout";
     pub const DONT_CHECK_COMPILER_STDERR: &'static str = "dont-check-compiler-stderr";
     pub const NO_PREFER_DYNAMIC: &'static str = "no-prefer-dynamic";
-    pub const PRETTY_EXPANDED: &'static str = "pretty-expanded";
     pub const PRETTY_MODE: &'static str = "pretty-mode";
     pub const PRETTY_COMPARE_ONLY: &'static str = "pretty-compare-only";
     pub const AUX_BIN: &'static str = "aux-bin";
@@ -278,7 +275,6 @@ impl TestProps {
             dont_check_compiler_stderr: false,
             compare_output_lines_by_subset: false,
             no_prefer_dynamic: false,
-            pretty_expanded: false,
             pretty_mode: "normal".to_string(),
             pretty_compare_only: false,
             forbid_output: vec![],
@@ -425,7 +421,6 @@ impl TestProps {
                         &mut self.dont_check_compiler_stderr,
                     );
                     config.set_name_directive(ln, NO_PREFER_DYNAMIC, &mut self.no_prefer_dynamic);
-                    config.set_name_directive(ln, PRETTY_EXPANDED, &mut self.pretty_expanded);
 
                     if let Some(m) = config.parse_name_value_directive(ln, PRETTY_MODE) {
                         self.pretty_mode = m;
diff --git a/src/tools/compiletest/src/runtest/pretty.rs b/src/tools/compiletest/src/runtest/pretty.rs
index 40e767e84ef39..e3b07f1d63d1e 100644
--- a/src/tools/compiletest/src/runtest/pretty.rs
+++ b/src/tools/compiletest/src/runtest/pretty.rs
@@ -84,21 +84,5 @@ impl TestCx<'_> {
         if !proc_res.status.success() {
             self.fatal_proc_rec("pretty-printed source does not typecheck", &proc_res);
         }
-
-        if !self.props.pretty_expanded {
-            return;
-        }
-
-        // additionally, run `-Zunpretty=expanded` and try to build it.
-        let proc_res = self.print_source(ReadFrom::Path, "expanded");
-        if !proc_res.status.success() {
-            self.fatal_proc_rec("pretty-printing (expanded) failed", &proc_res);
-        }
-
-        let ProcRes { stdout: expanded_src, .. } = proc_res;
-        let proc_res = self.typecheck_source(expanded_src);
-        if !proc_res.status.success() {
-            self.fatal_proc_rec("pretty-printed source (expanded) does not typecheck", &proc_res);
-        }
     }
 }

From 95ff642797536f055c04ae2486bc8ab3156535b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?=
 <39484203+jieyouxu@users.noreply.github.com>
Date: Tue, 26 Nov 2024 01:56:46 +0800
Subject: [PATCH 36/38] tests: remove `//@ pretty-expanded` usages

Done with

```bash
sd '//@ pretty-expanded.*\n' '' tests/ui/**/*.rs
```

and

```
sd '//@pretty-expanded.*\n' '' tests/ui/**/*.rs
```
---
 tests/ui/abi/anon-extern-mod.rs                             | 1 -
 tests/ui/abi/c-stack-as-value.rs                            | 1 -
 tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs   | 1 -
 tests/ui/abi/cross-crate/duplicated-external-mods.rs        | 1 -
 tests/ui/abi/extern/extern-pass-empty.rs                    | 1 -
 tests/ui/abi/foreign/invoke-external-foreign.rs             | 1 -
 tests/ui/alias-uninit-value.rs                              | 1 -
 tests/ui/array-slice-vec/cast-in-array-size.rs              | 1 -
 tests/ui/array-slice-vec/empty-mutable-vec.rs               | 1 -
 tests/ui/array-slice-vec/issue-15730.rs                     | 1 -
 tests/ui/array-slice-vec/issue-18425.rs                     | 1 -
 tests/ui/array-slice-vec/mut-vstore-expr.rs                 | 1 -
 tests/ui/array-slice-vec/vec-macro-with-brackets.rs         | 1 -
 tests/ui/array-slice-vec/vec-repeat-with-cast.rs            | 1 -
 tests/ui/array-slice-vec/vector-no-ann-2.rs                 | 1 -
 .../associated-types-binding-in-where-clause.rs             | 1 -
 .../associated-types-conditional-dispatch.rs                | 1 -
 .../associated-types-duplicate-binding-in-env-hrtb.rs       | 1 -
 .../associated-types-duplicate-binding-in-env.rs            | 1 -
 tests/ui/associated-types/associated-types-eq-obj.rs        | 1 -
 tests/ui/associated-types/associated-types-issue-20371.rs   | 1 -
 .../associated-types/associated-types-nested-projections.rs | 1 -
 .../associated-types-nested-projections.stderr              | 2 +-
 .../associated-types-normalize-in-bounds-binding.rs         | 1 -
 .../associated-types-normalize-in-bounds-ufcs.rs            | 1 -
 .../associated-types-normalize-in-bounds.rs                 | 1 -
 .../associated-types-projection-in-object-type.rs           | 1 -
 .../associated-types-projection-in-where-clause.rs          | 1 -
 ...-types-qualified-path-with-trait-with-type-parameters.rs | 1 -
 .../ui/associated-types/associated-types-ref-from-struct.rs | 1 -
 .../associated-types-region-erasure-issue-20582.rs          | 1 -
 .../associated-types/associated-types-resolve-lifetime.rs   | 1 -
 tests/ui/associated-types/issue-19129-1.rs                  | 1 -
 tests/ui/associated-types/issue-19129-2.rs                  | 1 -
 tests/ui/associated-types/issue-20763-1.rs                  | 1 -
 tests/ui/associated-types/issue-20763-2.rs                  | 1 -
 tests/ui/associated-types/issue-21363.rs                    | 1 -
 tests/ui/associated-types/issue-21726.rs                    | 1 -
 tests/ui/associated-types/issue-22828.rs                    | 1 -
 tests/ui/attr-start.rs                                      | 1 -
 tests/ui/attributes/attr-before-view-item.rs                | 1 -
 tests/ui/attributes/attr-before-view-item2.rs               | 1 -
 tests/ui/attributes/attr-mix-new.rs                         | 1 -
 tests/ui/attributes/method-attributes.rs                    | 1 -
 tests/ui/attributes/variant-attributes.rs                   | 1 -
 .../autoderef-and-borrow-method-receiver.rs                 | 1 -
 tests/ui/bench/issue-32062.rs                               | 1 -
 tests/ui/binding/inconsistent-lifetime-mismatch.rs          | 1 -
 tests/ui/binding/match-naked-record-expr.rs                 | 1 -
 tests/ui/binding/match-naked-record.rs                      | 1 -
 tests/ui/binding/match-path.rs                              | 1 -
 tests/ui/binding/match-pattern-simple.rs                    | 1 -
 tests/ui/binding/match-phi.rs                               | 1 -
 tests/ui/binding/match-range-static.rs                      | 1 -
 tests/ui/binding/match-value-binding-in-guard-3291.rs       | 1 -
 tests/ui/binding/nil-pattern.rs                             | 1 -
 tests/ui/binding/simple-generic-match.rs                    | 1 -
 tests/ui/borrowck/borrowck-assign-to-subfield.rs            | 1 -
 tests/ui/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs   | 1 -
 tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs       | 1 -
 tests/ui/borrowck/borrowck-lend-args.rs                     | 1 -
 tests/ui/borrowck/borrowck-static-item-in-fn.rs             | 1 -
 tests/ui/borrowck/borrowck-trait-lifetime.rs                | 1 -
 tests/ui/borrowck/borrowck-uniq-via-ref.rs                  | 1 -
 tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs          | 1 -
 tests/ui/box/new-box-syntax.rs                              | 1 -
 tests/ui/box/new.rs                                         | 1 -
 tests/ui/box/unit/unique-containing-tag.rs                  | 1 -
 tests/ui/box/unit/unique-create.rs                          | 1 -
 tests/ui/box/unit/unique-drop-complex.rs                    | 1 -
 tests/ui/box/unit/unique-generic-assign.rs                  | 1 -
 tests/ui/box/unit/unique-init.rs                            | 1 -
 tests/ui/box/unit/unique-match-discrim.rs                   | 1 -
 tests/ui/box/unit/unique-object-move.rs                     | 1 -
 .../builtin-superkinds-phantom-typaram.rs                   | 1 -
 tests/ui/builtin-superkinds/builtin-superkinds-simple2.rs   | 1 -
 tests/ui/builtin-superkinds/builtin-superkinds-typaram.rs   | 1 -
 tests/ui/can-copy-pod.rs                                    | 1 -
 tests/ui/cancel-clean-via-immediate-rvalue-ref.rs           | 1 -
 tests/ui/cfg/cfg-attr-cfg.rs                                | 1 -
 tests/ui/cfg/cfg-attr-crate.rs                              | 1 -
 tests/ui/cfg/cfg-family.rs                                  | 1 -
 tests/ui/cfg/cfg-match-arm.rs                               | 1 -
 tests/ui/cfg/cfg-target-family.rs                           | 1 -
 tests/ui/cfg/cfg_inner_static.rs                            | 1 -
 tests/ui/cfg/conditional-compile-arch.rs                    | 1 -
 tests/ui/cleanup-shortcircuit.rs                            | 1 -
 tests/ui/closures/issue-10682.rs                            | 1 -
 tests/ui/closures/issue-1460.rs                             | 1 -
 tests/ui/closures/issue-1460.stderr                         | 2 +-
 tests/ui/closures/issue-868.rs                              | 1 -
 tests/ui/codegen/init-large-type.rs                         | 1 -
 tests/ui/coercion/coerce-overloaded-autoderef.rs            | 1 -
 tests/ui/coercion/coerce-reborrow-imm-ptr-arg.rs            | 1 -
 tests/ui/coercion/coerce-reborrow-imm-vec-arg.rs            | 1 -
 tests/ui/coercion/coerce-reborrow-mut-ptr-arg.rs            | 1 -
 tests/ui/coercion/coerce-reborrow-mut-ptr-rcvr.rs           | 1 -
 tests/ui/coercion/coerce-unify-return.rs                    | 1 -
 tests/ui/coercion/coerce-unsize-subtype.rs                  | 1 -
 tests/ui/coercion/issue-14589.rs                            | 1 -
 tests/ui/coercion/issue-14589.stderr                        | 2 +-
 tests/ui/coherence/coherence-bigint-int.rs                  | 1 -
 tests/ui/coherence/coherence-bigint-vecint.rs               | 1 -
 tests/ui/coherence/coherence-blanket.rs                     | 1 -
 tests/ui/coherence/coherence-covered-type-parameter.rs      | 1 -
 tests/ui/coherence/coherence-iterator-vec-any-elem.rs       | 1 -
 tests/ui/coherence/coherence-iterator-vec.rs                | 1 -
 tests/ui/coherence/coherence-multidispatch-tuple.rs         | 1 -
 tests/ui/coherence/coherence-negative-impls-safe-rpass.rs   | 1 -
 tests/ui/consts/const-bound.rs                              | 1 -
 tests/ui/consts/const-expr-in-fixed-length-vec.rs           | 1 -
 tests/ui/consts/const-expr-in-vec-repeat.rs                 | 1 -
 tests/ui/consts/const-struct-offsets.rs                     | 1 -
 tests/ui/consts/const-unit-struct.rs                        | 1 -
 tests/ui/consts/const-vec-of-fns.rs                         | 1 -
 tests/ui/consts/const-vec-syntax.rs                         | 1 -
 tests/ui/consts/issue-13837.rs                              | 1 -
 tests/ui/crate-leading-sep.rs                               | 1 -
 tests/ui/crate-method-reexport-grrrrrrr.rs                  | 1 -
 tests/ui/crate-name-attr-used.rs                            | 1 -
 tests/ui/cross-crate/cci_capture_clause.rs                  | 1 -
 tests/ui/cross-crate/cross-crate-const-pat.rs               | 1 -
 tests/ui/cross-crate/moves-based-on-type-cross-crate.rs     | 1 -
 tests/ui/cross-crate/static-addresses.rs                    | 1 -
 tests/ui/cross-crate/trait-lifetime-param.rs                | 1 -
 tests/ui/cross-crate/unit-struct-2.rs                       | 1 -
 tests/ui/default-method-parsing.rs                          | 1 -
 tests/ui/deref.rs                                           | 1 -
 tests/ui/deriving/deriving-clone-enum.rs                    | 1 -
 tests/ui/deriving/deriving-clone-generic-enum.rs            | 1 -
 tests/ui/deriving/deriving-clone-generic-struct.rs          | 1 -
 tests/ui/deriving/deriving-clone-generic-tuple-struct.rs    | 1 -
 tests/ui/deriving/deriving-clone-struct.rs                  | 1 -
 tests/ui/deriving/deriving-clone-tuple-struct.rs            | 1 -
 tests/ui/deriving/deriving-enum-single-variant.rs           | 1 -
 tests/ui/deriving/deriving-in-macro.rs                      | 1 -
 tests/ui/deriving/deriving-meta-multiple.rs                 | 1 -
 tests/ui/deriving/deriving-meta.rs                          | 1 -
 tests/ui/deriving/deriving-via-extension-hash-struct.rs     | 1 -
 tests/ui/deriving/issue-15689-2.rs                          | 1 -
 tests/ui/deriving/issue-6341.rs                             | 1 -
 tests/ui/double-ref.rs                                      | 1 -
 tests/ui/drop/drop-on-empty-block-exit.rs                   | 1 -
 tests/ui/drop/drop-on-ret.rs                                | 1 -
 tests/ui/drop/drop-uninhabited-enum.rs                      | 1 -
 tests/ui/drop/issue-10028.rs                                | 1 -
 tests/ui/drop/issue-2734.rs                                 | 1 -
 tests/ui/drop/issue-2735.rs                                 | 1 -
 tests/ui/drop/nondrop-cycle.rs                              | 1 -
 tests/ui/drop/use_inline_dtor.rs                            | 1 -
 tests/ui/dropck/cleanup-arm-conditional.rs                  | 1 -
 tests/ui/dupe-first-attr.rs                                 | 1 -
 tests/ui/dynamically-sized-types/dst-coercions.rs           | 1 -
 tests/ui/dynamically-sized-types/dst-coercions.stderr       | 2 +-
 tests/ui/early-ret-binop-add.rs                             | 1 -
 tests/ui/empty-allocation-rvalue-non-null.rs                | 1 -
 tests/ui/enum/issue-1821.rs                                 | 1 -
 tests/ui/enum/issue-19340-1.rs                              | 1 -
 tests/ui/enum/issue-19340-2.rs                              | 1 -
 tests/ui/explicit-i-suffix.rs                               | 1 -
 tests/ui/expr/if/if-ret.rs                                  | 1 -
 tests/ui/expr/if/if-ret.stderr                              | 2 +-
 tests/ui/expr/scope.rs                                      | 1 -
 tests/ui/extern/extern-1.rs                                 | 1 -
 tests/ui/extern/extern-calling-convention-test.rs           | 1 -
 tests/ui/extern/extern-foreign-crate.rs                     | 1 -
 tests/ui/extern/extern-mod-abi.rs                           | 1 -
 tests/ui/extern/extern-mod-ordering-exe.rs                  | 1 -
 tests/ui/extern/extern-pub.rs                               | 1 -
 tests/ui/extern/extern-rust.rs                              | 1 -
 tests/ui/extern/issue-10025.rs                              | 1 -
 tests/ui/extern/issue-10763.rs                              | 1 -
 tests/ui/extern/issue-10764-rpass.rs                        | 1 -
 tests/ui/extern/issue-1251.rs                               | 1 -
 tests/ui/feature-gates/feature-gate-simd.rs                 | 2 --
 tests/ui/feature-gates/feature-gate-simd.stderr             | 2 +-
 tests/ui/filter-block-view-items.rs                         | 1 -
 tests/ui/fn/issue-1451.rs                                   | 1 -
 tests/ui/for-loop-while/break-value.rs                      | 1 -
 tests/ui/for-loop-while/issue-1257.rs                       | 1 -
 tests/ui/for-loop-while/labeled-break.rs                    | 1 -
 .../for-loop-while/liveness-assign-imm-local-after-loop.rs  | 1 -
 tests/ui/for-loop-while/liveness-move-in-loop.rs            | 1 -
 tests/ui/for-loop-while/long-while.rs                       | 1 -
 tests/ui/for-loop-while/loop-diverges.rs                    | 1 -
 tests/ui/for-loop-while/loop-label-shadowing.rs             | 1 -
 tests/ui/for-loop-while/loop-labeled-break-value.rs         | 1 -
 tests/ui/for-loop-while/loop-no-reinit-needed-post-bot.rs   | 1 -
 tests/ui/for-loop-while/while-flow-graph.rs                 | 1 -
 tests/ui/foreign/foreign-mod-unused-const.rs                | 1 -
 tests/ui/foreign/foreign2.rs                                | 1 -
 tests/ui/foreign/nil-decl-in-foreign.rs                     | 1 -
 .../functions-closures/closure-bounds-can-capture-chan.rs   | 1 -
 tests/ui/functions-closures/fn-abi.rs                       | 1 -
 tests/ui/functions-closures/fn-bare-coerce-to-block.rs      | 1 -
 tests/ui/functions-closures/fn-coerce-field.rs              | 1 -
 tests/ui/functions-closures/fn-item-type-coerce.rs          | 1 -
 tests/ui/functions-closures/fn-lval.rs                      | 1 -
 tests/ui/functions-closures/fn-type-infer.rs                | 1 -
 .../ui/generics/generic-default-type-params-cross-crate.rs  | 1 -
 tests/ui/generics/generic-fn-twice.rs                       | 1 -
 tests/ui/generics/generic-newtype-struct.rs                 | 1 -
 tests/ui/generics/generic-tag-corruption.rs                 | 1 -
 tests/ui/generics/generic-tag-local.rs                      | 1 -
 tests/ui/generics/generic-tag.rs                            | 1 -
 tests/ui/generics/generic-type-synonym.rs                   | 1 -
 tests/ui/generics/mid-path-type-params.rs                   | 1 -
 tests/ui/generics/type-params-in-for-each.rs                | 1 -
 .../trait-bounds/hrtb-binder-levels-in-object-types.rs      | 1 -
 .../trait-bounds/hrtb-debruijn-object-types-in-closures.rs  | 1 -
 tests/ui/higher-ranked/trait-bounds/hrtb-parse.rs           | 1 -
 .../trait-bounds/hrtb-precedence-of-plus-where-clause.rs    | 1 -
 .../higher-ranked/trait-bounds/hrtb-precedence-of-plus.rs   | 1 -
 .../ui/higher-ranked/trait-bounds/hrtb-resolve-lifetime.rs  | 1 -
 .../trait-bounds/hrtb-trait-object-passed-to-closure.rs     | 1 -
 tests/ui/hygiene/issue-15221.rs                             | 1 -
 tests/ui/impl-privacy-xc-1.rs                               | 1 -
 tests/ui/imports/export-glob-imports-target.rs              | 1 -
 tests/ui/imports/export-multi.rs                            | 1 -
 tests/ui/imports/import-crate-with-invalid-spans/main.rs    | 1 -
 tests/ui/imports/import-from.rs                             | 1 -
 tests/ui/imports/import-in-block.rs                         | 1 -
 tests/ui/imports/import-trailing-comma.rs                   | 1 -
 tests/ui/imports/reexport-star.rs                           | 1 -
 tests/ui/imports/use-mod.rs                                 | 1 -
 tests/ui/inference/infer-fn-tail-expr.rs                    | 1 -
 tests/ui/inference/newlambdas-ret-infer.rs                  | 1 -
 tests/ui/inference/newlambdas-ret-infer2.rs                 | 1 -
 tests/ui/issue-15924.rs                                     | 1 -
 tests/ui/issues/issue-10228.rs                              | 1 -
 tests/ui/issues/issue-10456.rs                              | 1 -
 tests/ui/issues/issue-10638.rs                              | 1 -
 tests/ui/issues/issue-10683.rs                              | 1 -
 tests/ui/issues/issue-10718.rs                              | 1 -
 tests/ui/issues/issue-10767.rs                              | 1 -
 tests/ui/issues/issue-10806.rs                              | 1 -
 tests/ui/issues/issue-10853.rs                              | 1 -
 tests/ui/issues/issue-10902.rs                              | 1 -
 tests/ui/issues/issue-11085.rs                              | 1 -
 tests/ui/issues/issue-11205.rs                              | 1 -
 tests/ui/issues/issue-11224.rs                              | 1 -
 tests/ui/issues/issue-11384.rs                              | 1 -
 tests/ui/issues/issue-11529.rs                              | 1 -
 tests/ui/issues/issue-11820.rs                              | 1 -
 tests/ui/issues/issue-11869.rs                              | 1 -
 tests/ui/issues/issue-12612.rs                              | 1 -
 tests/ui/issues/issue-12660.rs                              | 1 -
 tests/ui/issues/issue-12729.rs                              | 1 -
 tests/ui/issues/issue-12909.rs                              | 1 -
 tests/ui/issues/issue-13105.rs                              | 1 -
 tests/ui/issues/issue-13167.rs                              | 1 -
 tests/ui/issues/issue-13214.rs                              | 1 -
 tests/ui/issues/issue-13405.rs                              | 1 -
 tests/ui/issues/issue-13620.rs                              | 1 -
 tests/ui/issues/issue-13665.rs                              | 1 -
 tests/ui/issues/issue-13703.rs                              | 1 -
 tests/ui/issues/issue-13763.rs                              | 1 -
 tests/ui/issues/issue-13775.rs                              | 1 -
 tests/ui/issues/issue-13808.rs                              | 1 -
 tests/ui/issues/issue-14082.rs                              | 1 -
 tests/ui/issues/issue-14254.rs                              | 1 -
 tests/ui/issues/issue-14330.rs                              | 1 -
 tests/ui/issues/issue-14393.rs                              | 1 -
 tests/ui/issues/issue-14399.rs                              | 1 -
 tests/ui/issues/issue-14399.stderr                          | 2 +-
 tests/ui/issues/issue-14421.rs                              | 1 -
 tests/ui/issues/issue-14422.rs                              | 1 -
 tests/ui/issues/issue-14919.rs                              | 1 -
 tests/ui/issues/issue-14959.rs                              | 1 -
 tests/ui/issues/issue-15043.rs                              | 1 -
 tests/ui/issues/issue-15444.rs                              | 1 -
 tests/ui/issues/issue-15562.rs                              | 1 -
 tests/ui/issues/issue-15774.rs                              | 1 -
 tests/ui/issues/issue-16256.rs                              | 1 -
 tests/ui/issues/issue-16256.stderr                          | 2 +-
 tests/ui/issues/issue-16441.rs                              | 1 -
 tests/ui/issues/issue-16452.rs                              | 1 -
 tests/ui/issues/issue-16643.rs                              | 1 -
 tests/ui/issues/issue-16783.rs                              | 1 -
 tests/ui/issues/issue-16922-rpass.rs                        | 1 -
 tests/ui/issues/issue-17121.rs                              | 1 -
 tests/ui/issues/issue-17322.rs                              | 1 -
 tests/ui/issues/issue-17351.rs                              | 1 -
 tests/ui/issues/issue-17351.stderr                          | 2 +-
 tests/ui/issues/issue-17361.rs                              | 1 -
 tests/ui/issues/issue-17732.rs                              | 1 -
 tests/ui/issues/issue-17771.rs                              | 1 -
 tests/ui/issues/issue-17904.rs                              | 1 -
 tests/ui/issues/issue-18110.rs                              | 1 -
 tests/ui/issues/issue-18188.rs                              | 1 -
 tests/ui/issues/issue-18232.rs                              | 1 -
 tests/ui/issues/issue-18353.rs                              | 1 -
 tests/ui/issues/issue-18501.rs                              | 1 -
 tests/ui/issues/issue-18539.rs                              | 1 -
 tests/ui/issues/issue-18685.rs                              | 1 -
 tests/ui/issues/issue-18711.rs                              | 1 -
 tests/ui/issues/issue-18906.rs                              | 1 -
 tests/ui/issues/issue-19037.rs                              | 1 -
 tests/ui/issues/issue-19127.rs                              | 1 -
 tests/ui/issues/issue-19293.rs                              | 1 -
 tests/ui/issues/issue-19398.rs                              | 1 -
 tests/ui/issues/issue-19479.rs                              | 1 -
 tests/ui/issues/issue-19499.rs                              | 1 -
 tests/ui/issues/issue-19631.rs                              | 1 -
 tests/ui/issues/issue-19632.rs                              | 1 -
 tests/ui/issues/issue-19850.rs                              | 1 -
 tests/ui/issues/issue-20009.rs                              | 1 -
 tests/ui/issues/issue-20313-rpass.rs                        | 1 -
 tests/ui/issues/issue-20389.rs                              | 1 -
 tests/ui/issues/issue-20396.rs                              | 1 -
 tests/ui/issues/issue-20414.rs                              | 1 -
 tests/ui/issues/issue-20575.rs                              | 1 -
 tests/ui/issues/issue-20644.rs                              | 1 -
 tests/ui/issues/issue-2074.rs                               | 1 -
 tests/ui/issues/issue-21033.rs                              | 1 -
 tests/ui/issues/issue-21245.rs                              | 1 -
 tests/ui/issues/issue-21402.rs                              | 1 -
 tests/ui/issues/issue-2170-exe.rs                           | 1 -
 tests/ui/issues/issue-21891.rs                              | 1 -
 tests/ui/issues/issue-2190-1.rs                             | 1 -
 tests/ui/issues/issue-21909.rs                              | 1 -
 tests/ui/issues/issue-22346.rs                              | 1 -
 tests/ui/issues/issue-22356.rs                              | 1 -
 tests/ui/issues/issue-22426.rs                              | 1 -
 tests/ui/issues/issue-22577.rs                              | 1 -
 tests/ui/issues/issue-22629.rs                              | 1 -
 tests/ui/issues/issue-22777.rs                              | 1 -
 tests/ui/issues/issue-2284.rs                               | 1 -
 tests/ui/issues/issue-2311.rs                               | 1 -
 tests/ui/issues/issue-2316-c.rs                             | 1 -
 tests/ui/issues/issue-2380-b.rs                             | 1 -
 tests/ui/issues/issue-2383.rs                               | 1 -
 tests/ui/issues/issue-2414-c.rs                             | 1 -
 tests/ui/issues/issue-2445-b.rs                             | 1 -
 tests/ui/issues/issue-2445.rs                               | 1 -
 tests/ui/issues/issue-2463.rs                               | 1 -
 tests/ui/issues/issue-2472.rs                               | 1 -
 tests/ui/issues/issue-2487-a.rs                             | 1 -
 tests/ui/issues/issue-2502.rs                               | 1 -
 tests/ui/issues/issue-2526-a.rs                             | 1 -
 tests/ui/issues/issue-2550.rs                               | 1 -
 tests/ui/issues/issue-2642.rs                               | 1 -
 tests/ui/issues/issue-2708.rs                               | 1 -
 tests/ui/issues/issue-3012-2.rs                             | 1 -
 tests/ui/issues/issue-3026.rs                               | 1 -
 tests/ui/issues/issue-3037.rs                               | 1 -
 tests/ui/issues/issue-3052.rs                               | 1 -
 tests/ui/issues/issue-3136-b.rs                             | 1 -
 tests/ui/issues/issue-3149.rs                               | 1 -
 tests/ui/issues/issue-3220.rs                               | 1 -
 tests/ui/issues/issue-3429.rs                               | 1 -
 tests/ui/issues/issue-3500.rs                               | 1 -
 tests/ui/issues/issue-3656.rs                               | 1 -
 tests/ui/issues/issue-3874.rs                               | 1 -
 tests/ui/issues/issue-3888-2.rs                             | 1 -
 tests/ui/issues/issue-3979-2.rs                             | 1 -
 tests/ui/issues/issue-3991.rs                               | 1 -
 tests/ui/issues/issue-4208.rs                               | 1 -
 tests/ui/issues/issue-4228.rs                               | 1 -
 tests/ui/issues/issue-4333.rs                               | 1 -
 tests/ui/issues/issue-4387.rs                               | 1 -
 tests/ui/issues/issue-4464.rs                               | 1 -
 tests/ui/issues/issue-4542.rs                               | 1 -
 tests/ui/issues/issue-4545.rs                               | 1 -
 tests/ui/issues/issue-4735.rs                               | 1 -
 tests/ui/issues/issue-4759.rs                               | 1 -
 tests/ui/issues/issue-4830.rs                               | 1 -
 tests/ui/issues/issue-4875.rs                               | 1 -
 tests/ui/issues/issue-5192.rs                               | 1 -
 tests/ui/issues/issue-5315.rs                               | 1 -
 tests/ui/issues/issue-5518.rs                               | 1 -
 tests/ui/issues/issue-5550.rs                               | 1 -
 tests/ui/issues/issue-5554.rs                               | 1 -
 tests/ui/issues/issue-5572.rs                               | 1 -
 tests/ui/issues/issue-5718.rs                               | 1 -
 tests/ui/issues/issue-5741.rs                               | 1 -
 tests/ui/issues/issue-5754.rs                               | 1 -
 tests/ui/issues/issue-5884.rs                               | 1 -
 tests/ui/issues/issue-5900.rs                               | 1 -
 tests/ui/issues/issue-5950.rs                               | 1 -
 tests/ui/issues/issue-5988.rs                               | 1 -
 tests/ui/issues/issue-6117.rs                               | 1 -
 tests/ui/issues/issue-6318.rs                               | 1 -
 tests/ui/issues/issue-6557.rs                               | 1 -
 tests/ui/issues/issue-6898.rs                               | 1 -
 tests/ui/issues/issue-6919.rs                               | 1 -
 tests/ui/issues/issue-7178.rs                               | 1 -
 tests/ui/issues/issue-7268.rs                               | 1 -
 tests/ui/issues/issue-7344.rs                               | 1 -
 tests/ui/issues/issue-7519-match-unit-in-arg.rs             | 1 -
 tests/ui/issues/issue-7660.rs                               | 1 -
 .../issues/issue-7673-cast-generically-implemented-trait.rs | 1 -
 tests/ui/issues/issue-7899.rs                               | 1 -
 tests/ui/issues/issue-8044.rs                               | 1 -
 .../issue-8171-default-method-self-inherit-builtin-trait.rs | 1 -
 tests/ui/issues/issue-8248.rs                               | 1 -
 tests/ui/issues/issue-8248.stderr                           | 2 +-
 tests/ui/issues/issue-8249.rs                               | 1 -
 tests/ui/issues/issue-8259.rs                               | 1 -
 tests/ui/issues/issue-8398.rs                               | 1 -
 tests/ui/issues/issue-8401.rs                               | 1 -
 tests/ui/issues/issue-8506.rs                               | 1 -
 tests/ui/issues/issue-8578.rs                               | 1 -
 tests/ui/issues/issue-8783.rs                               | 1 -
 tests/ui/issues/issue-9110.rs                               | 1 -
 tests/ui/issues/issue-9123.rs                               | 1 -
 tests/ui/issues/issue-9155.rs                               | 1 -
 tests/ui/issues/issue-9249.rs                               | 1 -
 tests/ui/issues/issue-9382.rs                               | 3 ---
 tests/ui/issues/issue-9719.rs                               | 1 -
 tests/ui/issues/issue-9906.rs                               | 1 -
 tests/ui/issues/issue-9942.rs                               | 1 -
 tests/ui/issues/issue-9951.rs                               | 1 -
 tests/ui/issues/issue-9951.stderr                           | 2 +-
 tests/ui/issues/issue-9968.rs                               | 1 -
 tests/ui/item-name-overload.rs                              | 1 -
 tests/ui/iterators/into-iterator-type-inference-shift.rs    | 1 -
 tests/ui/kinds-in-metadata.rs                               | 1 -
 tests/ui/linkage-attr/issue-12133-1.rs                      | 1 -
 tests/ui/linkage-attr/issue-12133-2.rs                      | 1 -
 tests/ui/linkage-attr/issue-12133-3.rs                      | 1 -
 tests/ui/lint/dead-code/leading-underscore.rs               | 1 -
 tests/ui/lint/issue-14837.rs                                | 1 -
 tests/ui/lint/issue-1866.rs                                 | 1 -
 tests/ui/lint/issue-1866.stderr                             | 2 +-
 tests/ui/lint/issue-20343.rs                                | 1 -
 .../lint/lint-non-camel-case-with-trailing-underscores.rs   | 1 -
 .../lint-non-snake-case-no-lowercase-equivalent.rs          | 1 -
 tests/ui/lint/warn-ctypes-inhibit.rs                        | 1 -
 tests/ui/list.rs                                            | 1 -
 tests/ui/liveness/liveness-assign-imm-local-after-ret.rs    | 1 -
 tests/ui/loops/issue-1974.rs                                | 1 -
 tests/ui/macros/issue-8851.rs                               | 1 -
 tests/ui/macros/log_syntax-trace_macros-macro-locations.rs  | 1 -
 .../macro-invocation-in-count-expr-fixed-array-type.rs      | 1 -
 tests/ui/macros/macro-nt-list.rs                            | 1 -
 tests/ui/macros/macro_with_super_2.rs                       | 1 -
 tests/ui/macros/parse-complex-macro-invoc-op.rs             | 1 -
 tests/ui/macros/pub-item-inside-macro.rs                    | 1 -
 tests/ui/macros/pub-method-inside-macro.rs                  | 1 -
 tests/ui/methods/method-early-bound-lifetimes-on-self.rs    | 1 -
 tests/ui/methods/method-normalize-bounds-issue-20604.rs     | 1 -
 tests/ui/methods/method-recursive-blanket-impl.rs           | 1 -
 tests/ui/methods/method-recursive-blanket-impl.stderr       | 2 +-
 .../method-two-traits-distinguished-via-where-clause.rs     | 1 -
 .../method-two-traits-distinguished-via-where-clause.stderr | 2 +-
 tests/ui/modules/issue-13872.rs                             | 1 -
 tests/ui/modules/mod-view-items.rs                          | 1 -
 tests/ui/moves/move-nullary-fn.rs                           | 1 -
 tests/ui/multiline-comment.rs                               | 1 -
 tests/ui/mutual-recursion-group.rs                          | 1 -
 tests/ui/nested-block-comment.rs                            | 1 -
 tests/ui/never_type/expr-empty-ret.rs                       | 1 -
 tests/ui/numbers-arithmetic/int.rs                          | 1 -
 .../integer-literal-suffix-inference-2.rs                   | 1 -
 .../numbers-arithmetic/integer-literal-suffix-inference.rs  | 1 -
 tests/ui/numbers-arithmetic/uint.rs                         | 1 -
 .../object-lifetime-default-default-to-static.rs            | 1 -
 .../object-lifetime-default-from-ref-struct.rs              | 1 -
 .../object-lifetime-default-from-rptr-box.rs                | 1 -
 .../object-lifetime-default-from-rptr-mut.rs                | 1 -
 .../object-lifetime-default-from-rptr-struct.rs             | 1 -
 .../ui/object-lifetime/object-lifetime-default-from-rptr.rs | 1 -
 .../ui/object-lifetime/object-lifetime-default-inferred.rs  | 1 -
 tests/ui/output-slot-variants.rs                            | 1 -
 tests/ui/overloaded/fixup-deref-mut.rs                      | 1 -
 tests/ui/overloaded/issue-14958.rs                          | 1 -
 tests/ui/overloaded/issue-14958.stderr                      | 2 +-
 tests/ui/overloaded/overloaded-calls-param-vtables.rs       | 1 -
 tests/ui/panic-handler/weak-lang-item-2.rs                  | 1 -
 tests/ui/parser/issues/issue-21475.rs                       | 1 -
 tests/ui/parser/issues/issue-7222.rs                        | 1 -
 tests/ui/parser/parse-assoc-type-lt.rs                      | 1 -
 tests/ui/path.rs                                            | 1 -
 tests/ui/pattern/usefulness/irrefutable-unit.rs             | 1 -
 tests/ui/pattern/usefulness/nested-exhaustive-match.rs      | 1 -
 tests/ui/privacy/priv-impl-prim-ty.rs                       | 1 -
 tests/ui/privacy/privacy-ns.rs                              | 1 -
 tests/ui/privacy/privacy-reexport.rs                        | 1 -
 tests/ui/privacy/privacy1-rpass.rs                          | 1 -
 tests/ui/privacy/private-method-rpass.rs                    | 1 -
 tests/ui/privacy/pub-extern-privacy.rs                      | 1 -
 tests/ui/privacy/pub-use-xcrate.rs                          | 1 -
 tests/ui/privacy/pub_use_mods_xcrate_exe.rs                 | 1 -
 tests/ui/ptr-coercion-rpass.rs                              | 1 -
 tests/ui/reachable/issue-11225-1.rs                         | 1 -
 tests/ui/reachable/issue-11225-2.rs                         | 1 -
 tests/ui/reachable/issue-11225-3.rs                         | 1 -
 tests/ui/recursion/instantiable.rs                          | 1 -
 tests/ui/regions/issue-11612.rs                             | 1 -
 tests/ui/regions/issue-21520.rs                             | 1 -
 tests/ui/regions/issue-5243.rs                              | 1 -
 tests/ui/regions/issue-6157.rs                              | 1 -
 tests/ui/regions/owned-implies-static.rs                    | 1 -
 tests/ui/regions/regions-addr-of-interior-of-unique-box.rs  | 1 -
 tests/ui/regions/regions-assoc-type-region-bound.rs         | 1 -
 tests/ui/regions/regions-assoc-type-static-bound.rs         | 1 -
 tests/ui/regions/regions-creating-enums2.rs                 | 1 -
 tests/ui/regions/regions-creating-enums5.rs                 | 1 -
 tests/ui/regions/regions-debruijn-of-object.rs              | 1 -
 tests/ui/regions/regions-dependent-autofn.rs                | 1 -
 tests/ui/regions/regions-dependent-let-ref.rs               | 1 -
 .../ui/regions/regions-early-bound-lifetime-in-assoc-fn.rs  | 1 -
 tests/ui/regions/regions-expl-self.rs                       | 1 -
 tests/ui/regions/regions-fn-subtyping-2.rs                  | 1 -
 tests/ui/regions/regions-fn-subtyping.rs                    | 1 -
 tests/ui/regions/regions-infer-reborrow-ref-mut-recurse.rs  | 1 -
 tests/ui/regions/regions-infer-region-in-fn-but-not-type.rs | 1 -
 tests/ui/regions/regions-infer-static-from-proc.rs          | 1 -
 tests/ui/regions/regions-issue-21422.rs                     | 1 -
 tests/ui/regions/regions-issue-22246.rs                     | 1 -
 tests/ui/regions/regions-lifetime-nonfree-late-bound.rs     | 1 -
 tests/ui/regions/regions-link-fn-args.rs                    | 1 -
 tests/ui/regions/regions-mock-codegen.rs                    | 1 -
 tests/ui/regions/regions-no-bound-in-argument-cleanup.rs    | 1 -
 tests/ui/regions/regions-nullary-variant.rs                 | 1 -
 tests/ui/regions/regions-reassign-let-bound-pointer.rs      | 1 -
 tests/ui/regions/regions-reassign-match-bound-pointer.rs    | 1 -
 tests/ui/regions/regions-scope-chain-example.rs             | 1 -
 .../regions-variance-contravariant-use-contravariant.rs     | 1 -
 .../ui/regions/regions-variance-covariant-use-covariant.rs  | 1 -
 tests/ui/regions/wf-bound-region-in-object-type.rs          | 1 -
 tests/ui/resolve/blind-item-mixed-crate-use-item.rs         | 1 -
 tests/ui/resolve/blind-item-mixed-use-item.rs               | 1 -
 tests/ui/return/return-nil.rs                               | 1 -
 tests/ui/self/explicit-self-closures.rs                     | 1 -
 tests/ui/self/explicit_self_xcrate_exe.rs                   | 1 -
 tests/ui/self/self-impl-2.rs                                | 1 -
 tests/ui/self/self-type-param.rs                            | 1 -
 tests/ui/simd/array-trait.rs                                | 1 -
 tests/ui/simd/array-trait.stderr                            | 6 +++---
 tests/ui/simd/array-type.rs                                 | 1 -
 tests/ui/sized-borrowed-pointer.rs                          | 1 -
 tests/ui/sized-owned-pointer.rs                             | 1 -
 tests/ui/static/issue-1660.rs                               | 1 -
 tests/ui/statics/check-recursion-foreign.rs                 | 1 -
 tests/ui/statics/issue-15261.rs                             | 1 -
 tests/ui/statics/issue-15261.stderr                         | 2 +-
 tests/ui/statics/issue-17718-static-unsafe-interior.rs      | 1 -
 tests/ui/statics/static-fn-inline-xc.rs                     | 1 -
 tests/ui/statics/static-fn-trait-xc.rs                      | 1 -
 tests/ui/statics/static-methods-in-traits2.rs               | 1 -
 tests/ui/structs-enums/class-dtor.rs                        | 1 -
 tests/ui/structs-enums/class-str-field.rs                   | 1 -
 tests/ui/structs-enums/class-typarams.rs                    | 1 -
 tests/ui/structs-enums/classes-self-referential.rs          | 1 -
 tests/ui/structs-enums/enum-discrim-range-overflow.rs       | 1 -
 tests/ui/structs-enums/enum-export-inheritance.rs           | 1 -
 tests/ui/structs-enums/enum-variants.rs                     | 1 -
 tests/ui/structs-enums/enum-vec-initializer.rs              | 1 -
 tests/ui/structs-enums/export-abstract-tag.rs               | 1 -
 tests/ui/structs-enums/export-tag-variant.rs                | 1 -
 tests/ui/structs-enums/foreign-struct.rs                    | 1 -
 .../ui/structs-enums/module-qualified-struct-destructure.rs | 1 -
 tests/ui/structs-enums/namespaced-enum-emulate-flat-xc.rs   | 1 -
 tests/ui/structs-enums/namespaced-enum-emulate-flat.rs      | 1 -
 .../ui/structs-enums/namespaced-enum-glob-import-xcrate.rs  | 1 -
 tests/ui/structs-enums/namespaced-enum-glob-import.rs       | 1 -
 tests/ui/structs-enums/namespaced-enums-xcrate.rs           | 1 -
 tests/ui/structs-enums/namespaced-enums.rs                  | 1 -
 tests/ui/structs-enums/nested-enum-same-names.rs            | 1 -
 tests/ui/structs-enums/newtype-struct-with-dtor.rs          | 1 -
 tests/ui/structs-enums/newtype-struct-xc-2.rs               | 1 -
 tests/ui/structs-enums/newtype-struct-xc.rs                 | 1 -
 tests/ui/structs-enums/simple-generic-tag.rs                | 1 -
 tests/ui/structs-enums/struct-like-variant-construct.rs     | 1 -
 tests/ui/structs-enums/struct-variant-field-visibility.rs   | 1 -
 tests/ui/structs-enums/struct_variant_xc.rs                 | 1 -
 tests/ui/structs-enums/tag-exports.rs                       | 1 -
 tests/ui/structs-enums/tag-in-block.rs                      | 1 -
 tests/ui/structs-enums/tag-variant-disr-type-mismatch.rs    | 1 -
 tests/ui/structs-enums/tuple-struct-trivial.rs              | 1 -
 tests/ui/structs-enums/variant-structs-trivial.rs           | 1 -
 tests/ui/structs/large-records.rs                           | 1 -
 tests/ui/super.rs                                           | 1 -
 tests/ui/svh-add-nothing.rs                                 | 1 -
 tests/ui/swap-overlapping.rs                                | 1 -
 tests/ui/tail-call-arg-leak.rs                              | 1 -
 tests/ui/threads-sendsync/child-outlives-parent.rs          | 1 -
 tests/ui/threads-sendsync/send-resource.rs                  | 1 -
 tests/ui/threads-sendsync/send-type-inference.rs            | 1 -
 tests/ui/threads-sendsync/sendable-class.rs                 | 1 -
 tests/ui/threads-sendsync/std-sync-right-kind-impls.rs      | 1 -
 tests/ui/threads-sendsync/sync-send-atomics.rs              | 1 -
 tests/ui/threads-sendsync/sync-send-iterators-in-libcore.rs | 1 -
 tests/ui/threads-sendsync/task-comm-11.rs                   | 1 -
 tests/ui/threads-sendsync/task-comm-15.rs                   | 1 -
 tests/ui/threads-sendsync/task-comm-17.rs                   | 1 -
 tests/ui/threads-sendsync/task-life-0.rs                    | 1 -
 tests/ui/trailing-comma.rs                                  | 1 -
 tests/ui/traits/astconv-cycle-between-and-type.rs           | 1 -
 tests/ui/traits/bound/basic.rs                              | 1 -
 tests/ui/traits/bound/impl-comparison-duplicates.rs         | 1 -
 tests/ui/traits/bound/multiple.rs                           | 1 -
 tests/ui/traits/bound/on-structs-and-enums-rpass.rs         | 1 -
 tests/ui/traits/bound/recursion.rs                          | 1 -
 tests/ui/traits/bug-7295.rs                                 | 1 -
 tests/ui/traits/cache-issue-18209.rs                        | 1 -
 tests/ui/traits/composition-trivial.rs                      | 1 -
 tests/ui/traits/cycle-generic-bound.rs                      | 1 -
 tests/ui/traits/cycle-type-trait.rs                         | 1 -
 tests/ui/traits/default-method/mut.rs                       | 1 -
 tests/ui/traits/early-vtbl-resolution.rs                    | 1 -
 .../ui/traits/false-ambiguity-where-clause-builtin-bound.rs | 1 -
 tests/ui/traits/impl-2.rs                                   | 1 -
 tests/ui/traits/impl-implicit-trait.rs                      | 1 -
 tests/ui/traits/inheritance/num.rs                          | 1 -
 tests/ui/traits/inheritance/num0.rs                         | 1 -
 tests/ui/traits/inheritance/num1.rs                         | 1 -
 tests/ui/traits/inheritance/num5.rs                         | 1 -
 tests/ui/traits/issue-22019.rs                              | 1 -
 tests/ui/traits/issue-22110.rs                              | 1 -
 tests/ui/traits/issue-22655.rs                              | 1 -
 tests/ui/traits/issue-23003.rs                              | 1 -
 .../ui/traits/monomorphized-callees-with-ty-params-3314.rs  | 1 -
 tests/ui/traits/parameterized-with-bounds.rs                | 1 -
 tests/ui/traits/syntax-polarity.rs                          | 1 -
 tests/ui/traits/use-before-def.rs                           | 1 -
 tests/ui/traits/where-clause-vs-impl.rs                     | 1 -
 tests/ui/transmute-non-immediate-to-immediate.rs            | 1 -
 tests/ui/type-alias/issue-14933.rs                          | 1 -
 tests/ui/type-param-constraints.rs                          | 1 -
 tests/ui/type-param.rs                                      | 1 -
 tests/ui/type-ptr.rs                                        | 1 -
 tests/ui/type-use-i1-versus-i8.rs                           | 1 -
 tests/ui/type/issue-7607-2.rs                               | 1 -
 tests/ui/typeck/ufcs-type-params.rs                         | 1 -
 tests/ui/typeck/unify-return-ty.rs                          | 1 -
 tests/ui/unboxed-closures/issue-18661.rs                    | 1 -
 .../unboxed-closures/unboxed-closures-direct-sugary-call.rs | 1 -
 .../unboxed-closures-infer-arg-types-from-expected-bound.rs | 1 -
 ...ed-closures-infer-arg-types-from-expected-object-type.rs | 1 -
 ...ures-infer-arg-types-w-bound-regs-from-expected-bound.rs | 1 -
 tests/ui/unboxed-closures/unboxed-closures-move-mutable.rs  | 1 -
 .../unboxed-closures/unboxed-closures-move-mutable.stderr   | 4 ++--
 tests/ui/unboxed-closures/unboxed-closures-prelude.rs       | 1 -
 .../unboxed-closures-static-call-fn-once.rs                 | 1 -
 tests/ui/unboxed-closures/unboxed-closures-zero-args.rs     | 1 -
 tests/ui/uninit-empty-types.rs                              | 1 -
 tests/ui/unit.rs                                            | 1 -
 tests/ui/unnamed_argument_mode.rs                           | 1 -
 tests/ui/unsafe/new-unsafe-pointers.rs                      | 1 -
 tests/ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs         | 1 -
 tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs          | 1 -
 tests/ui/unused-move-capture.rs                             | 1 -
 tests/ui/unused-move.rs                                     | 1 -
 tests/ui/use-import-export.rs                               | 1 -
 tests/ui/use/use.rs                                         | 1 -
 tests/ui/where-clauses/where-clause-bounds-inconsistency.rs | 1 -
 .../ui/where-clauses/where-clause-early-bound-lifetimes.rs  | 1 -
 .../where-clauses/where-clause-early-bound-lifetimes.stderr | 2 +-
 .../where-clauses/where-clause-method-substituion-rpass.rs  | 1 -
 .../where-clause-method-substituion-rpass.stderr            | 2 +-
 tests/ui/where-clauses/where-clause-region-outlives.rs      | 1 -
 tests/ui/where-clauses/where-clauses-lifetimes.rs           | 1 -
 tests/ui/where-clauses/where-clauses-unboxed-closures.rs    | 1 -
 656 files changed, 23 insertions(+), 662 deletions(-)

diff --git a/tests/ui/abi/anon-extern-mod.rs b/tests/ui/abi/anon-extern-mod.rs
index bb3739bc4afab..134542b9cff38 100644
--- a/tests/ui/abi/anon-extern-mod.rs
+++ b/tests/ui/abi/anon-extern-mod.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #[link(name = "rust_test_helpers", kind = "static")]
 extern "C" {
diff --git a/tests/ui/abi/c-stack-as-value.rs b/tests/ui/abi/c-stack-as-value.rs
index 401bc132b6e77..10933bdb2781f 100644
--- a/tests/ui/abi/c-stack-as-value.rs
+++ b/tests/ui/abi/c-stack-as-value.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 mod rustrt {
     #[link(name = "rust_test_helpers", kind = "static")]
diff --git a/tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs b/tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs
index 95bf4df68df26..b2d06444c1367 100644
--- a/tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs
+++ b/tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 //@ aux-build:anon-extern-mod-cross-crate-1.rs
-//@ pretty-expanded FIXME #23616
 
 extern crate anonexternmod;
 
diff --git a/tests/ui/abi/cross-crate/duplicated-external-mods.rs b/tests/ui/abi/cross-crate/duplicated-external-mods.rs
index 2a3875d27734c..19a9b07d65c9f 100644
--- a/tests/ui/abi/cross-crate/duplicated-external-mods.rs
+++ b/tests/ui/abi/cross-crate/duplicated-external-mods.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:anon-extern-mod-cross-crate-1.rs
 //@ aux-build:anon-extern-mod-cross-crate-1.rs
-//@ pretty-expanded FIXME #23616
 
 extern crate anonexternmod;
 
diff --git a/tests/ui/abi/extern/extern-pass-empty.rs b/tests/ui/abi/extern/extern-pass-empty.rs
index f168f5faa1786..1ad52b128ad93 100644
--- a/tests/ui/abi/extern/extern-pass-empty.rs
+++ b/tests/ui/abi/extern/extern-pass-empty.rs
@@ -3,7 +3,6 @@
 
 // Test a foreign function that accepts empty struct.
 
-//@ pretty-expanded FIXME #23616
 //@ ignore-msvc
 //@ ignore-emscripten emcc asserts on an empty struct as an argument
 
diff --git a/tests/ui/abi/foreign/invoke-external-foreign.rs b/tests/ui/abi/foreign/invoke-external-foreign.rs
index 78cc84804bfd0..a22b12af67202 100644
--- a/tests/ui/abi/foreign/invoke-external-foreign.rs
+++ b/tests/ui/abi/foreign/invoke-external-foreign.rs
@@ -5,7 +5,6 @@
 // successfully (and safely) invoke external, cdecl
 // functions from outside the crate.
 
-//@ pretty-expanded FIXME #23616
 
 extern crate foreign_lib;
 
diff --git a/tests/ui/alias-uninit-value.rs b/tests/ui/alias-uninit-value.rs
index 3223bac18201d..0084a98e62735 100644
--- a/tests/ui/alias-uninit-value.rs
+++ b/tests/ui/alias-uninit-value.rs
@@ -7,7 +7,6 @@
 
 // Regression test for issue #374
 
-//@ pretty-expanded FIXME #23616
 
 enum sty { ty_nil, }
 
diff --git a/tests/ui/array-slice-vec/cast-in-array-size.rs b/tests/ui/array-slice-vec/cast-in-array-size.rs
index cb5072564b2e1..5276288f8199c 100644
--- a/tests/ui/array-slice-vec/cast-in-array-size.rs
+++ b/tests/ui/array-slice-vec/cast-in-array-size.rs
@@ -2,7 +2,6 @@
 
 
 // issues #10618 and #16382
-//@ pretty-expanded FIXME #23616
 
 const SIZE: isize = 25;
 
diff --git a/tests/ui/array-slice-vec/empty-mutable-vec.rs b/tests/ui/array-slice-vec/empty-mutable-vec.rs
index 663071bf61335..1785b1aa39e81 100644
--- a/tests/ui/array-slice-vec/empty-mutable-vec.rs
+++ b/tests/ui/array-slice-vec/empty-mutable-vec.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(unused_mut)]
 
diff --git a/tests/ui/array-slice-vec/issue-15730.rs b/tests/ui/array-slice-vec/issue-15730.rs
index fe9d908a1ff7c..2a69417819d95 100644
--- a/tests/ui/array-slice-vec/issue-15730.rs
+++ b/tests/ui/array-slice-vec/issue-15730.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(unused_mut)]
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     let mut array = [1, 2, 3];
diff --git a/tests/ui/array-slice-vec/issue-18425.rs b/tests/ui/array-slice-vec/issue-18425.rs
index 22345718ad8e4..e74a20de72662 100644
--- a/tests/ui/array-slice-vec/issue-18425.rs
+++ b/tests/ui/array-slice-vec/issue-18425.rs
@@ -2,7 +2,6 @@
 // Check that codegen doesn't ICE when codegenning an array repeat
 // expression with a count of 1 and a non-Copy element type.
 
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     let _ = [Box::new(1_usize); 1];
diff --git a/tests/ui/array-slice-vec/mut-vstore-expr.rs b/tests/ui/array-slice-vec/mut-vstore-expr.rs
index 809c001b0797f..9553aed9a00ea 100644
--- a/tests/ui/array-slice-vec/mut-vstore-expr.rs
+++ b/tests/ui/array-slice-vec/mut-vstore-expr.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     let _x: &mut [isize] = &mut [ 1, 2, 3 ];
diff --git a/tests/ui/array-slice-vec/vec-macro-with-brackets.rs b/tests/ui/array-slice-vec/vec-macro-with-brackets.rs
index 65ca182b61567..b62e294f9d1d6 100644
--- a/tests/ui/array-slice-vec/vec-macro-with-brackets.rs
+++ b/tests/ui/array-slice-vec/vec-macro-with-brackets.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(unused_variables)]
 
-//@ pretty-expanded FIXME #23616
 
 macro_rules! vec [
     ($($e:expr),*) => ({
diff --git a/tests/ui/array-slice-vec/vec-repeat-with-cast.rs b/tests/ui/array-slice-vec/vec-repeat-with-cast.rs
index 4af38d9cf3286..1f1fd4cd0d29c 100644
--- a/tests/ui/array-slice-vec/vec-repeat-with-cast.rs
+++ b/tests/ui/array-slice-vec/vec-repeat-with-cast.rs
@@ -1,5 +1,4 @@
 //@ run-pass
 
-//@ pretty-expanded FIXME #23616
 
 pub fn main() { let _a = [0; 1 as usize]; }
diff --git a/tests/ui/array-slice-vec/vector-no-ann-2.rs b/tests/ui/array-slice-vec/vector-no-ann-2.rs
index b130c6bc2ffb5..63828551af114 100644
--- a/tests/ui/array-slice-vec/vector-no-ann-2.rs
+++ b/tests/ui/array-slice-vec/vector-no-ann-2.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     let _quux: Box<Vec<usize>> = Box::new(Vec::new());
diff --git a/tests/ui/associated-types/associated-types-binding-in-where-clause.rs b/tests/ui/associated-types/associated-types-binding-in-where-clause.rs
index ed2cebb5f7e87..b82656945a256 100644
--- a/tests/ui/associated-types/associated-types-binding-in-where-clause.rs
+++ b/tests/ui/associated-types/associated-types-binding-in-where-clause.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 // Test equality constraints on associated types in a where clause.
 
-//@ pretty-expanded FIXME #23616
 
 pub trait Foo {
     type A;
diff --git a/tests/ui/associated-types/associated-types-conditional-dispatch.rs b/tests/ui/associated-types/associated-types-conditional-dispatch.rs
index d30ea66e9b97f..3ec835ccbc3ac 100644
--- a/tests/ui/associated-types/associated-types-conditional-dispatch.rs
+++ b/tests/ui/associated-types/associated-types-conditional-dispatch.rs
@@ -5,7 +5,6 @@
 // `Target=[A]`, then the impl marked with `(*)` is seen to conflict
 // with all the others.
 
-//@ pretty-expanded FIXME #23616
 
 use std::marker::PhantomData;
 use std::ops::Deref;
diff --git a/tests/ui/associated-types/associated-types-duplicate-binding-in-env-hrtb.rs b/tests/ui/associated-types/associated-types-duplicate-binding-in-env-hrtb.rs
index e2c13716a6948..9bf7570534c50 100644
--- a/tests/ui/associated-types/associated-types-duplicate-binding-in-env-hrtb.rs
+++ b/tests/ui/associated-types/associated-types-duplicate-binding-in-env-hrtb.rs
@@ -4,7 +4,6 @@
 // (modulo bound lifetime names) appears in the environment
 // twice. Issue #21965.
 
-//@ pretty-expanded FIXME #23616
 
 fn foo<T>(t: T) -> i32
     where T : for<'a> Fn(&'a u8) -> i32,
diff --git a/tests/ui/associated-types/associated-types-duplicate-binding-in-env.rs b/tests/ui/associated-types/associated-types-duplicate-binding-in-env.rs
index d1ff4b222b789..44c5634f4ef8a 100644
--- a/tests/ui/associated-types/associated-types-duplicate-binding-in-env.rs
+++ b/tests/ui/associated-types/associated-types-duplicate-binding-in-env.rs
@@ -3,7 +3,6 @@
 // Check that we do not report ambiguities when the same predicate
 // appears in the environment twice. Issue #21965.
 
-//@ pretty-expanded FIXME #23616
 
 trait Foo {
     type B;
diff --git a/tests/ui/associated-types/associated-types-eq-obj.rs b/tests/ui/associated-types/associated-types-eq-obj.rs
index 1236d770b95c7..c1ca8bbd7393c 100644
--- a/tests/ui/associated-types/associated-types-eq-obj.rs
+++ b/tests/ui/associated-types/associated-types-eq-obj.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 // Test equality constraints on associated types inside of an object type
 
-//@ pretty-expanded FIXME #23616
 
 pub trait Foo {
     type A;
diff --git a/tests/ui/associated-types/associated-types-issue-20371.rs b/tests/ui/associated-types/associated-types-issue-20371.rs
index 32fe1ca1c00af..d2e056a57b218 100644
--- a/tests/ui/associated-types/associated-types-issue-20371.rs
+++ b/tests/ui/associated-types/associated-types-issue-20371.rs
@@ -2,7 +2,6 @@
 // Test that we are able to have an impl that defines an associated type
 // before the actual trait.
 
-//@ pretty-expanded FIXME #23616
 
 impl X for f64 { type Y = isize; }
 trait X { type Y; }
diff --git a/tests/ui/associated-types/associated-types-nested-projections.rs b/tests/ui/associated-types/associated-types-nested-projections.rs
index 90ff170a6a711..659016b4644b7 100644
--- a/tests/ui/associated-types/associated-types-nested-projections.rs
+++ b/tests/ui/associated-types/associated-types-nested-projections.rs
@@ -2,7 +2,6 @@
 #![allow(unused_variables)]
 // Test that we can resolve nested projection types. Issue #20666.
 
-//@ pretty-expanded FIXME #23616
 
 use std::slice;
 
diff --git a/tests/ui/associated-types/associated-types-nested-projections.stderr b/tests/ui/associated-types/associated-types-nested-projections.stderr
index 97d5a7585736c..1b69fcfacf52e 100644
--- a/tests/ui/associated-types/associated-types-nested-projections.stderr
+++ b/tests/ui/associated-types/associated-types-nested-projections.stderr
@@ -1,5 +1,5 @@
 warning: method `into_iter` is never used
-  --> $DIR/associated-types-nested-projections.rs:16:8
+  --> $DIR/associated-types-nested-projections.rs:15:8
    |
 LL | trait IntoIterator {
    |       ------------ method in this trait
diff --git a/tests/ui/associated-types/associated-types-normalize-in-bounds-binding.rs b/tests/ui/associated-types/associated-types-normalize-in-bounds-binding.rs
index bd9b91b002eec..a6e426df1c920 100644
--- a/tests/ui/associated-types/associated-types-normalize-in-bounds-binding.rs
+++ b/tests/ui/associated-types/associated-types-normalize-in-bounds-binding.rs
@@ -3,7 +3,6 @@
 // Test that we normalize associated types that appear in a bound that
 // contains a binding. Issue #21664.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/associated-types/associated-types-normalize-in-bounds-ufcs.rs b/tests/ui/associated-types/associated-types-normalize-in-bounds-ufcs.rs
index 884b1a17a2cbc..f15de0d9a2898 100644
--- a/tests/ui/associated-types/associated-types-normalize-in-bounds-ufcs.rs
+++ b/tests/ui/associated-types/associated-types-normalize-in-bounds-ufcs.rs
@@ -3,7 +3,6 @@
 // Test that we normalize associated types that appear in bounds; if
 // we didn't, the call to `self.split2()` fails to type check.
 
-//@ pretty-expanded FIXME #23616
 
 use std::marker::PhantomData;
 
diff --git a/tests/ui/associated-types/associated-types-normalize-in-bounds.rs b/tests/ui/associated-types/associated-types-normalize-in-bounds.rs
index 8da60e1d9cba0..7e94d3a011f55 100644
--- a/tests/ui/associated-types/associated-types-normalize-in-bounds.rs
+++ b/tests/ui/associated-types/associated-types-normalize-in-bounds.rs
@@ -3,7 +3,6 @@
 // Test that we normalize associated types that appear in bounds; if
 // we didn't, the call to `self.split2()` fails to type check.
 
-//@ pretty-expanded FIXME #23616
 
 use std::marker::PhantomData;
 
diff --git a/tests/ui/associated-types/associated-types-projection-in-object-type.rs b/tests/ui/associated-types/associated-types-projection-in-object-type.rs
index 4cf1c256f3d3f..d5d7a294dfd79 100644
--- a/tests/ui/associated-types/associated-types-projection-in-object-type.rs
+++ b/tests/ui/associated-types/associated-types-projection-in-object-type.rs
@@ -6,7 +6,6 @@
 // appear in associated type bindings in object types, which were not
 // being properly flagged.
 
-//@ pretty-expanded FIXME #23616
 
 use std::ops::{Shl, Shr};
 use std::cell::RefCell;
diff --git a/tests/ui/associated-types/associated-types-projection-in-where-clause.rs b/tests/ui/associated-types/associated-types-projection-in-where-clause.rs
index ed8259396d11b..6f4ee8bf17772 100644
--- a/tests/ui/associated-types/associated-types-projection-in-where-clause.rs
+++ b/tests/ui/associated-types/associated-types-projection-in-where-clause.rs
@@ -3,7 +3,6 @@
 #![allow(unused_variables)]
 // Test a where clause that uses a non-normalized projection type.
 
-//@ pretty-expanded FIXME #23616
 
 trait Int
 {
diff --git a/tests/ui/associated-types/associated-types-qualified-path-with-trait-with-type-parameters.rs b/tests/ui/associated-types/associated-types-qualified-path-with-trait-with-type-parameters.rs
index f0a3432519646..c2550c930d3b1 100644
--- a/tests/ui/associated-types/associated-types-qualified-path-with-trait-with-type-parameters.rs
+++ b/tests/ui/associated-types/associated-types-qualified-path-with-trait-with-type-parameters.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 trait Foo<T> {
     type Bar;
diff --git a/tests/ui/associated-types/associated-types-ref-from-struct.rs b/tests/ui/associated-types/associated-types-ref-from-struct.rs
index c16bb8651c3c7..bdff76e86a3e2 100644
--- a/tests/ui/associated-types/associated-types-ref-from-struct.rs
+++ b/tests/ui/associated-types/associated-types-ref-from-struct.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 // Test associated type references in structure fields.
 
-//@ pretty-expanded FIXME #23616
 
 trait Test {
     type V;
diff --git a/tests/ui/associated-types/associated-types-region-erasure-issue-20582.rs b/tests/ui/associated-types/associated-types-region-erasure-issue-20582.rs
index dec3a3c924563..7c556005f2d5c 100644
--- a/tests/ui/associated-types/associated-types-region-erasure-issue-20582.rs
+++ b/tests/ui/associated-types/associated-types-region-erasure-issue-20582.rs
@@ -3,7 +3,6 @@
 // Regression test for #20582. This test caused an ICE related to
 // inconsistent region erasure in codegen.
 
-//@ pretty-expanded FIXME #23616
 
 struct Foo<'a> {
     buf: &'a[u8]
diff --git a/tests/ui/associated-types/associated-types-resolve-lifetime.rs b/tests/ui/associated-types/associated-types-resolve-lifetime.rs
index 6be2fa6f2ab49..a75488cf8436c 100644
--- a/tests/ui/associated-types/associated-types-resolve-lifetime.rs
+++ b/tests/ui/associated-types/associated-types-resolve-lifetime.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 trait Get<T> {
     fn get(&self) -> T;
diff --git a/tests/ui/associated-types/issue-19129-1.rs b/tests/ui/associated-types/issue-19129-1.rs
index 65340b413e9c5..e4d8082c05a70 100644
--- a/tests/ui/associated-types/issue-19129-1.rs
+++ b/tests/ui/associated-types/issue-19129-1.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 trait Trait<Input> {
     type Output;
diff --git a/tests/ui/associated-types/issue-19129-2.rs b/tests/ui/associated-types/issue-19129-2.rs
index 6562c54b0b7c2..15e73bfc53236 100644
--- a/tests/ui/associated-types/issue-19129-2.rs
+++ b/tests/ui/associated-types/issue-19129-2.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 trait Trait<Input> {
     type Output;
diff --git a/tests/ui/associated-types/issue-20763-1.rs b/tests/ui/associated-types/issue-20763-1.rs
index ea2e696767da7..0abd2317fa9d9 100644
--- a/tests/ui/associated-types/issue-20763-1.rs
+++ b/tests/ui/associated-types/issue-20763-1.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 trait T0 {
     type O;
diff --git a/tests/ui/associated-types/issue-20763-2.rs b/tests/ui/associated-types/issue-20763-2.rs
index 149bfcb8c99a9..9e7f3e15fe08b 100644
--- a/tests/ui/associated-types/issue-20763-2.rs
+++ b/tests/ui/associated-types/issue-20763-2.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 trait T0 {
     type O;
diff --git a/tests/ui/associated-types/issue-21363.rs b/tests/ui/associated-types/issue-21363.rs
index 0dcebafd95b05..96d4c20234911 100644
--- a/tests/ui/associated-types/issue-21363.rs
+++ b/tests/ui/associated-types/issue-21363.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 #![no_implicit_prelude]
 
diff --git a/tests/ui/associated-types/issue-21726.rs b/tests/ui/associated-types/issue-21726.rs
index f014c64478630..9611423b9f036 100644
--- a/tests/ui/associated-types/issue-21726.rs
+++ b/tests/ui/associated-types/issue-21726.rs
@@ -4,7 +4,6 @@
 // subtyping of projection types that resulted in an unconstrained
 // region, yielding region inference failures.
 
-//@ pretty-expanded FIXME #23616
 
 fn main() { }
 
diff --git a/tests/ui/associated-types/issue-22828.rs b/tests/ui/associated-types/issue-22828.rs
index 2f65f1c230386..5624b9c693b54 100644
--- a/tests/ui/associated-types/issue-22828.rs
+++ b/tests/ui/associated-types/issue-22828.rs
@@ -3,7 +3,6 @@
 // Test transitive analysis for associated types. Collected types
 // should be normalized and new obligations generated.
 
-//@ pretty-expanded FIXME #23616
 
 trait Foo {
     type A;
diff --git a/tests/ui/attr-start.rs b/tests/ui/attr-start.rs
index 27cf35601fdf7..232f50955b2ee 100644
--- a/tests/ui/attr-start.rs
+++ b/tests/ui/attr-start.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![feature(start)]
 
diff --git a/tests/ui/attributes/attr-before-view-item.rs b/tests/ui/attributes/attr-before-view-item.rs
index e0e086ea476ac..19874052e3368 100644
--- a/tests/ui/attributes/attr-before-view-item.rs
+++ b/tests/ui/attributes/attr-before-view-item.rs
@@ -1,5 +1,4 @@
 //@ build-pass (FIXME(62277): could be check-pass?)
-//@ pretty-expanded FIXME #23616
 
 #![feature(rustc_attrs)]
 #![feature(test)]
diff --git a/tests/ui/attributes/attr-before-view-item2.rs b/tests/ui/attributes/attr-before-view-item2.rs
index 8d74d73fe2ec8..e58063a13ab0a 100644
--- a/tests/ui/attributes/attr-before-view-item2.rs
+++ b/tests/ui/attributes/attr-before-view-item2.rs
@@ -1,5 +1,4 @@
 //@ build-pass (FIXME(62277): could be check-pass?)
-//@ pretty-expanded FIXME #23616
 
 #![feature(rustc_attrs)]
 #![feature(test)]
diff --git a/tests/ui/attributes/attr-mix-new.rs b/tests/ui/attributes/attr-mix-new.rs
index bb2bab8f26781..bd249a0c198ab 100644
--- a/tests/ui/attributes/attr-mix-new.rs
+++ b/tests/ui/attributes/attr-mix-new.rs
@@ -1,5 +1,4 @@
 //@ build-pass (FIXME(62277): could be check-pass?)
-//@ pretty-expanded FIXME #23616
 
 #![feature(rustc_attrs)]
 
diff --git a/tests/ui/attributes/method-attributes.rs b/tests/ui/attributes/method-attributes.rs
index 4a7f042c20a62..ded72d2457b1c 100644
--- a/tests/ui/attributes/method-attributes.rs
+++ b/tests/ui/attributes/method-attributes.rs
@@ -1,6 +1,5 @@
 //@ build-pass (FIXME(62277): could be check-pass?)
 //@ pp-exact - Make sure we print all the attributes
-//@ pretty-expanded FIXME #23616
 
 #![feature(rustc_attrs)]
 
diff --git a/tests/ui/attributes/variant-attributes.rs b/tests/ui/attributes/variant-attributes.rs
index 57423ad61b219..a08856aa278d3 100644
--- a/tests/ui/attributes/variant-attributes.rs
+++ b/tests/ui/attributes/variant-attributes.rs
@@ -1,6 +1,5 @@
 //@ build-pass (FIXME(62277): could be check-pass?)
 //@ pp-exact - Make sure we actually print the attributes
-//@ pretty-expanded FIXME #23616
 
 #![allow(non_camel_case_types)]
 #![feature(rustc_attrs)]
diff --git a/tests/ui/autoref-autoderef/autoderef-and-borrow-method-receiver.rs b/tests/ui/autoref-autoderef/autoderef-and-borrow-method-receiver.rs
index b44e2a8cd37cb..d75a2ab8bdba4 100644
--- a/tests/ui/autoref-autoderef/autoderef-and-borrow-method-receiver.rs
+++ b/tests/ui/autoref-autoderef/autoderef-and-borrow-method-receiver.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 struct Foo {
     x: isize,
diff --git a/tests/ui/bench/issue-32062.rs b/tests/ui/bench/issue-32062.rs
index 84de427a20063..a7d1f8073d46b 100644
--- a/tests/ui/bench/issue-32062.rs
+++ b/tests/ui/bench/issue-32062.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     let _ = test(Some(0).into_iter());
diff --git a/tests/ui/binding/inconsistent-lifetime-mismatch.rs b/tests/ui/binding/inconsistent-lifetime-mismatch.rs
index b45c72cd9bdc8..539f8f58a1d5e 100644
--- a/tests/ui/binding/inconsistent-lifetime-mismatch.rs
+++ b/tests/ui/binding/inconsistent-lifetime-mismatch.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 fn foo(_: &[&str]) {}
 
diff --git a/tests/ui/binding/match-naked-record-expr.rs b/tests/ui/binding/match-naked-record-expr.rs
index c6557cc10d669..57697a73ca4b2 100644
--- a/tests/ui/binding/match-naked-record-expr.rs
+++ b/tests/ui/binding/match-naked-record-expr.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 struct X { x: isize }
 
diff --git a/tests/ui/binding/match-naked-record.rs b/tests/ui/binding/match-naked-record.rs
index 24d7aec00e7b8..ce9489a00f2c6 100644
--- a/tests/ui/binding/match-naked-record.rs
+++ b/tests/ui/binding/match-naked-record.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 struct X { x: isize }
 
diff --git a/tests/ui/binding/match-path.rs b/tests/ui/binding/match-path.rs
index 9bcef9914d152..1305ac7668ea6 100644
--- a/tests/ui/binding/match-path.rs
+++ b/tests/ui/binding/match-path.rs
@@ -3,7 +3,6 @@
 #![allow(non_camel_case_types)]
 
 
-//@ pretty-expanded FIXME #23616
 
 mod m1 {
     pub enum foo { foo1, foo2, }
diff --git a/tests/ui/binding/match-pattern-simple.rs b/tests/ui/binding/match-pattern-simple.rs
index 2e43b702fae94..da22acd7f37f3 100644
--- a/tests/ui/binding/match-pattern-simple.rs
+++ b/tests/ui/binding/match-pattern-simple.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 
 
-//@ pretty-expanded FIXME #23616
 
 fn altsimple(f: isize) { match f { _x => () } }
 
diff --git a/tests/ui/binding/match-phi.rs b/tests/ui/binding/match-phi.rs
index cfef03adaa47a..128d4d618a096 100644
--- a/tests/ui/binding/match-phi.rs
+++ b/tests/ui/binding/match-phi.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(dead_code)]
 #![allow(unused_assignments)]
-//@ pretty-expanded FIXME #23616
 #![allow(non_camel_case_types)]
 #![allow(unused_variables)]
 
diff --git a/tests/ui/binding/match-range-static.rs b/tests/ui/binding/match-range-static.rs
index 478dfb3cf4149..cf4d030b66fbe 100644
--- a/tests/ui/binding/match-range-static.rs
+++ b/tests/ui/binding/match-range-static.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 #![allow(non_upper_case_globals)]
 
 const s: isize = 1;
diff --git a/tests/ui/binding/match-value-binding-in-guard-3291.rs b/tests/ui/binding/match-value-binding-in-guard-3291.rs
index a1f939cadca4e..ca8c34628b71e 100644
--- a/tests/ui/binding/match-value-binding-in-guard-3291.rs
+++ b/tests/ui/binding/match-value-binding-in-guard-3291.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn foo(x: Option<Box<isize>>, b: bool) -> isize {
     match x {
diff --git a/tests/ui/binding/nil-pattern.rs b/tests/ui/binding/nil-pattern.rs
index 757d701c15a7f..68dbfe3b45316 100644
--- a/tests/ui/binding/nil-pattern.rs
+++ b/tests/ui/binding/nil-pattern.rs
@@ -1,4 +1,3 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() { let x = (); match x { () => { } } }
diff --git a/tests/ui/binding/simple-generic-match.rs b/tests/ui/binding/simple-generic-match.rs
index 910bab03e1f53..001b469d35e3f 100644
--- a/tests/ui/binding/simple-generic-match.rs
+++ b/tests/ui/binding/simple-generic-match.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 enum clam<T> { a(#[allow(dead_code)] T), }
 
diff --git a/tests/ui/borrowck/borrowck-assign-to-subfield.rs b/tests/ui/borrowck/borrowck-assign-to-subfield.rs
index 807941d9c8547..27d9046e7b7cb 100644
--- a/tests/ui/borrowck/borrowck-assign-to-subfield.rs
+++ b/tests/ui/borrowck/borrowck-assign-to-subfield.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     struct A {
diff --git a/tests/ui/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs b/tests/ui/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs
index a815253d7147d..ef5baae450077 100644
--- a/tests/ui/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs
+++ b/tests/ui/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs
@@ -7,7 +7,6 @@
 //
 // Example from compiler/rustc_borrowck/borrowck/README.md
 
-//@ pretty-expanded FIXME #23616
 
 fn foo<'a>(mut t0: &'a mut isize,
            mut t1: &'a mut isize) {
diff --git a/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs b/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs
index d78d8a9d96666..d200ef6d6f872 100644
--- a/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs
+++ b/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs
@@ -2,7 +2,6 @@
 #![allow(unused_mut)]
 #![allow(unused_variables)]
 #![allow(dropping_copy_types)]
-//@ pretty-expanded FIXME #23616
 
 struct A { a: isize, b: Box<isize> }
 struct B { a: Box<isize>, b: Box<isize> }
diff --git a/tests/ui/borrowck/borrowck-lend-args.rs b/tests/ui/borrowck/borrowck-lend-args.rs
index 08a7aea162793..9d45730f196de 100644
--- a/tests/ui/borrowck/borrowck-lend-args.rs
+++ b/tests/ui/borrowck/borrowck-lend-args.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(dead_code)]
 
-//@ pretty-expanded FIXME #23616
 
 fn borrow(_v: &isize) {}
 
diff --git a/tests/ui/borrowck/borrowck-static-item-in-fn.rs b/tests/ui/borrowck/borrowck-static-item-in-fn.rs
index 9cdd4c891320c..3c2e7b92c9ec3 100644
--- a/tests/ui/borrowck/borrowck-static-item-in-fn.rs
+++ b/tests/ui/borrowck/borrowck-static-item-in-fn.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 // Regression test for issue #7740
 
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     static A: &'static char = &'A';
diff --git a/tests/ui/borrowck/borrowck-trait-lifetime.rs b/tests/ui/borrowck/borrowck-trait-lifetime.rs
index e43201fb10b3e..26d4cfb888754 100644
--- a/tests/ui/borrowck/borrowck-trait-lifetime.rs
+++ b/tests/ui/borrowck/borrowck-trait-lifetime.rs
@@ -3,7 +3,6 @@
 // This test verifies that casting from the same lifetime on a value
 // to the same lifetime on a trait succeeds. See issue #10766.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/borrowck/borrowck-uniq-via-ref.rs b/tests/ui/borrowck/borrowck-uniq-via-ref.rs
index d3190d66bd31b..67f908a0c076f 100644
--- a/tests/ui/borrowck/borrowck-uniq-via-ref.rs
+++ b/tests/ui/borrowck/borrowck-uniq-via-ref.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(dead_code)]
 
-//@ pretty-expanded FIXME #23616
 
 struct Rec {
     f: Box<isize>,
diff --git a/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs b/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs
index 9649f48447138..5bbac021504fa 100644
--- a/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs
+++ b/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![allow(dropping_copy_types)]
 
diff --git a/tests/ui/box/new-box-syntax.rs b/tests/ui/box/new-box-syntax.rs
index f2899ff3dde06..a0d8cb755849f 100644
--- a/tests/ui/box/new-box-syntax.rs
+++ b/tests/ui/box/new-box-syntax.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
diff --git a/tests/ui/box/new.rs b/tests/ui/box/new.rs
index 682a998ae1993..2e7525e208f2b 100644
--- a/tests/ui/box/new.rs
+++ b/tests/ui/box/new.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     let _a = Box::new(1);
diff --git a/tests/ui/box/unit/unique-containing-tag.rs b/tests/ui/box/unit/unique-containing-tag.rs
index cd88cfab4254f..a9752a64f4df0 100644
--- a/tests/ui/box/unit/unique-containing-tag.rs
+++ b/tests/ui/box/unit/unique-containing-tag.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     enum t { t1(isize), t2(isize), }
diff --git a/tests/ui/box/unit/unique-create.rs b/tests/ui/box/unit/unique-create.rs
index bf3826156b1d4..b3b72971e53c0 100644
--- a/tests/ui/box/unit/unique-create.rs
+++ b/tests/ui/box/unit/unique-create.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     let _: Box<_> = Box::new(100);
diff --git a/tests/ui/box/unit/unique-drop-complex.rs b/tests/ui/box/unit/unique-drop-complex.rs
index f23635e59cd50..6e5fb524f41e5 100644
--- a/tests/ui/box/unit/unique-drop-complex.rs
+++ b/tests/ui/box/unit/unique-drop-complex.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     let _x: Box<_> = Box::new(vec![0,0,0,0,0]);
diff --git a/tests/ui/box/unit/unique-generic-assign.rs b/tests/ui/box/unit/unique-generic-assign.rs
index ef9c34c41a393..2c5cb0c1112a3 100644
--- a/tests/ui/box/unit/unique-generic-assign.rs
+++ b/tests/ui/box/unit/unique-generic-assign.rs
@@ -3,7 +3,6 @@
 // Issue #976
 
 
-//@ pretty-expanded FIXME #23616
 
 fn f<T>(x: Box<T>) {
     let _x2 = x;
diff --git a/tests/ui/box/unit/unique-init.rs b/tests/ui/box/unit/unique-init.rs
index ad2390c2ca01b..0950c794c4804 100644
--- a/tests/ui/box/unit/unique-init.rs
+++ b/tests/ui/box/unit/unique-init.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     let _i: Box<_> = Box::new(100);
diff --git a/tests/ui/box/unit/unique-match-discrim.rs b/tests/ui/box/unit/unique-match-discrim.rs
index 97b502004f514..c1b7b15c7c41d 100644
--- a/tests/ui/box/unit/unique-match-discrim.rs
+++ b/tests/ui/box/unit/unique-match-discrim.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 // Issue #961
 
-//@ pretty-expanded FIXME #23616
 
 fn altsimple() {
     match Box::new(true) {
diff --git a/tests/ui/box/unit/unique-object-move.rs b/tests/ui/box/unit/unique-object-move.rs
index f30fc5c8e64f3..6ed2b1dc401ce 100644
--- a/tests/ui/box/unit/unique-object-move.rs
+++ b/tests/ui/box/unit/unique-object-move.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 // Issue #5192
 
-//@ pretty-expanded FIXME #23616
 
 pub trait EventLoop { fn foo(&self) {} }
 
diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-phantom-typaram.rs b/tests/ui/builtin-superkinds/builtin-superkinds-phantom-typaram.rs
index 8a2fa4685771f..ea5d3bdcfdbe6 100644
--- a/tests/ui/builtin-superkinds/builtin-superkinds-phantom-typaram.rs
+++ b/tests/ui/builtin-superkinds/builtin-superkinds-phantom-typaram.rs
@@ -5,7 +5,6 @@
 // super-builtin-kind of a trait, if the type parameter is never used,
 // the type can implement the trait anyway.
 
-//@ pretty-expanded FIXME #23616
 
 use std::marker;
 
diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-simple2.rs b/tests/ui/builtin-superkinds/builtin-superkinds-simple2.rs
index 1354b4ac18811..510ef4c158e45 100644
--- a/tests/ui/builtin-superkinds/builtin-superkinds-simple2.rs
+++ b/tests/ui/builtin-superkinds/builtin-superkinds-simple2.rs
@@ -1,7 +1,6 @@
 //@ check-pass
 // Simple test case of implementing a trait with super-builtin-kinds.
 
-//@ pretty-expanded FIXME #23616
 
 trait Foo : Send { }
 
diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-typaram.rs b/tests/ui/builtin-superkinds/builtin-superkinds-typaram.rs
index 15b867dd5e005..de2afc4a1713d 100644
--- a/tests/ui/builtin-superkinds/builtin-superkinds-typaram.rs
+++ b/tests/ui/builtin-superkinds/builtin-superkinds-typaram.rs
@@ -2,7 +2,6 @@
 // Tests correct implementation of traits with super-builtin-kinds
 // using a bounded type parameter.
 
-//@ pretty-expanded FIXME #23616
 
 trait Foo : Send { }
 
diff --git a/tests/ui/can-copy-pod.rs b/tests/ui/can-copy-pod.rs
index dd4cf54040aaf..ffb8a08fa9804 100644
--- a/tests/ui/can-copy-pod.rs
+++ b/tests/ui/can-copy-pod.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
diff --git a/tests/ui/cancel-clean-via-immediate-rvalue-ref.rs b/tests/ui/cancel-clean-via-immediate-rvalue-ref.rs
index 0575c29bffdb3..12d143bd98953 100644
--- a/tests/ui/cancel-clean-via-immediate-rvalue-ref.rs
+++ b/tests/ui/cancel-clean-via-immediate-rvalue-ref.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn foo(x: &mut Box<u8>) {
     *x = Box::new(5);
diff --git a/tests/ui/cfg/cfg-attr-cfg.rs b/tests/ui/cfg/cfg-attr-cfg.rs
index 67d97e760d778..08b9374cfd7b9 100644
--- a/tests/ui/cfg/cfg-attr-cfg.rs
+++ b/tests/ui/cfg/cfg-attr-cfg.rs
@@ -2,7 +2,6 @@
 // main is conditionally compiled, but the conditional compilation
 // is conditional too!
 
-//@ pretty-expanded FIXME #23616
 
 #[cfg_attr(FALSE, cfg(bar))]
 fn main() { }
diff --git a/tests/ui/cfg/cfg-attr-crate.rs b/tests/ui/cfg/cfg-attr-crate.rs
index 444704d132aa4..44242a6a57d2a 100644
--- a/tests/ui/cfg/cfg-attr-crate.rs
+++ b/tests/ui/cfg/cfg-attr-crate.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 // https://github.com/rust-lang/rust/issues/21833#issuecomment-72353044
 
-//@ pretty-expanded FIXME #23616
 
 #![cfg_attr(FALSE, no_core)]
 
diff --git a/tests/ui/cfg/cfg-family.rs b/tests/ui/cfg/cfg-family.rs
index caf59327f108d..a13ae7f9616bf 100644
--- a/tests/ui/cfg/cfg-family.rs
+++ b/tests/ui/cfg/cfg-family.rs
@@ -1,5 +1,4 @@
 //@ build-pass
-//@ pretty-expanded FIXME #23616
 //@ ignore-wasm32 no bare family
 //@ ignore-sgx
 
diff --git a/tests/ui/cfg/cfg-match-arm.rs b/tests/ui/cfg/cfg-match-arm.rs
index e646a63b8fbf8..f6cd52c475cfc 100644
--- a/tests/ui/cfg/cfg-match-arm.rs
+++ b/tests/ui/cfg/cfg-match-arm.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 enum Foo {
     Bar,
diff --git a/tests/ui/cfg/cfg-target-family.rs b/tests/ui/cfg/cfg-target-family.rs
index ab3be302e6400..0b1c323307a9b 100644
--- a/tests/ui/cfg/cfg-target-family.rs
+++ b/tests/ui/cfg/cfg-target-family.rs
@@ -1,7 +1,6 @@
 //@ build-pass
 //@ ignore-sgx
 
-//@ pretty-expanded FIXME #23616
 
 #[cfg(target_family = "windows")]
 pub fn main() {}
diff --git a/tests/ui/cfg/cfg_inner_static.rs b/tests/ui/cfg/cfg_inner_static.rs
index f4e2dc092f878..8d188b0aed73c 100644
--- a/tests/ui/cfg/cfg_inner_static.rs
+++ b/tests/ui/cfg/cfg_inner_static.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:cfg_inner_static.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate cfg_inner_static;
 
diff --git a/tests/ui/cfg/conditional-compile-arch.rs b/tests/ui/cfg/conditional-compile-arch.rs
index 678b32c6a4e82..594d9344561c2 100644
--- a/tests/ui/cfg/conditional-compile-arch.rs
+++ b/tests/ui/cfg/conditional-compile-arch.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #[cfg(target_arch = "x86")]
 pub fn main() { }
diff --git a/tests/ui/cleanup-shortcircuit.rs b/tests/ui/cleanup-shortcircuit.rs
index 312491fee241e..40a5dfa94e373 100644
--- a/tests/ui/cleanup-shortcircuit.rs
+++ b/tests/ui/cleanup-shortcircuit.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 // Test that cleanups for the RHS of shortcircuiting operators work.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(deref_nullptr)]
 
diff --git a/tests/ui/closures/issue-10682.rs b/tests/ui/closures/issue-10682.rs
index 25636b9063b98..265e72aaa690f 100644
--- a/tests/ui/closures/issue-10682.rs
+++ b/tests/ui/closures/issue-10682.rs
@@ -2,7 +2,6 @@
 // Regression test for issue #10682
 // Nested `proc` usage can't use outer owned data
 
-//@ pretty-expanded FIXME #23616
 
 fn work(_: Box<isize>) {}
 fn foo<F:FnOnce()>(_: F) {}
diff --git a/tests/ui/closures/issue-1460.rs b/tests/ui/closures/issue-1460.rs
index c201f026bca36..ceb030b92c8ff 100644
--- a/tests/ui/closures/issue-1460.rs
+++ b/tests/ui/closures/issue-1460.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     {|i: u32| if 1 == i { }}; //~ WARN unused closure that must be used
diff --git a/tests/ui/closures/issue-1460.stderr b/tests/ui/closures/issue-1460.stderr
index d4a8c8955e233..15eaf7a9a11ab 100644
--- a/tests/ui/closures/issue-1460.stderr
+++ b/tests/ui/closures/issue-1460.stderr
@@ -1,5 +1,5 @@
 warning: unused closure that must be used
-  --> $DIR/issue-1460.rs:6:6
+  --> $DIR/issue-1460.rs:5:6
    |
 LL |     {|i: u32| if 1 == i { }};
    |      ^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/closures/issue-868.rs b/tests/ui/closures/issue-868.rs
index 170597b4bd5ed..70debbc6c87c6 100644
--- a/tests/ui/closures/issue-868.rs
+++ b/tests/ui/closures/issue-868.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(unused_parens)]
 #![allow(unit_bindings)]
-//@ pretty-expanded FIXME #23616
 
 fn f<T, F>(g: F) -> T where F: FnOnce() -> T { g() }
 
diff --git a/tests/ui/codegen/init-large-type.rs b/tests/ui/codegen/init-large-type.rs
index b9fc6612e1687..08697198f2484 100644
--- a/tests/ui/codegen/init-large-type.rs
+++ b/tests/ui/codegen/init-large-type.rs
@@ -6,7 +6,6 @@
 // Doing it incorrectly causes massive slowdown in LLVM during
 // optimisation.
 
-//@ pretty-expanded FIXME #23616
 //@ needs-threads
 #![feature(intrinsics)]
 
diff --git a/tests/ui/coercion/coerce-overloaded-autoderef.rs b/tests/ui/coercion/coerce-overloaded-autoderef.rs
index 0605f20e9a328..03d0b0df5435d 100644
--- a/tests/ui/coercion/coerce-overloaded-autoderef.rs
+++ b/tests/ui/coercion/coerce-overloaded-autoderef.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(unused_braces)]
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 use std::rc::Rc;
 
diff --git a/tests/ui/coercion/coerce-reborrow-imm-ptr-arg.rs b/tests/ui/coercion/coerce-reborrow-imm-ptr-arg.rs
index 139c1d18d2b18..f43b6dad71d32 100644
--- a/tests/ui/coercion/coerce-reborrow-imm-ptr-arg.rs
+++ b/tests/ui/coercion/coerce-reborrow-imm-ptr-arg.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 fn negate(x: &isize) -> isize {
     -*x
diff --git a/tests/ui/coercion/coerce-reborrow-imm-vec-arg.rs b/tests/ui/coercion/coerce-reborrow-imm-vec-arg.rs
index d8edd8648c485..afcec17d55ba6 100644
--- a/tests/ui/coercion/coerce-reborrow-imm-vec-arg.rs
+++ b/tests/ui/coercion/coerce-reborrow-imm-vec-arg.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 fn sum(x: &[isize]) -> isize {
     let mut sum = 0;
diff --git a/tests/ui/coercion/coerce-reborrow-mut-ptr-arg.rs b/tests/ui/coercion/coerce-reborrow-mut-ptr-arg.rs
index 7a08e9fdbe5aa..0367e384829dc 100644
--- a/tests/ui/coercion/coerce-reborrow-mut-ptr-arg.rs
+++ b/tests/ui/coercion/coerce-reborrow-mut-ptr-arg.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 struct SpeechMaker {
     speeches: usize
diff --git a/tests/ui/coercion/coerce-reborrow-mut-ptr-rcvr.rs b/tests/ui/coercion/coerce-reborrow-mut-ptr-rcvr.rs
index fc41beb45ccdc..b9479f6bdf835 100644
--- a/tests/ui/coercion/coerce-reborrow-mut-ptr-rcvr.rs
+++ b/tests/ui/coercion/coerce-reborrow-mut-ptr-rcvr.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 struct SpeechMaker {
     speeches: usize
diff --git a/tests/ui/coercion/coerce-unify-return.rs b/tests/ui/coercion/coerce-unify-return.rs
index def42d9dc148c..54998a35382c4 100644
--- a/tests/ui/coercion/coerce-unify-return.rs
+++ b/tests/ui/coercion/coerce-unify-return.rs
@@ -2,7 +2,6 @@
 // Check that coercions unify the expected return type of a polymorphic
 // function call, instead of leaving the type variables as they were.
 
-//@ pretty-expanded FIXME #23616
 
 struct Foo;
 impl Foo {
diff --git a/tests/ui/coercion/coerce-unsize-subtype.rs b/tests/ui/coercion/coerce-unsize-subtype.rs
index 5ef9a10889217..a3e762e4c5fa1 100644
--- a/tests/ui/coercion/coerce-unsize-subtype.rs
+++ b/tests/ui/coercion/coerce-unsize-subtype.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 use std::rc::Rc;
 
diff --git a/tests/ui/coercion/issue-14589.rs b/tests/ui/coercion/issue-14589.rs
index b25ba3758e1f2..1e99cc4f6a836 100644
--- a/tests/ui/coercion/issue-14589.rs
+++ b/tests/ui/coercion/issue-14589.rs
@@ -2,7 +2,6 @@
 // All 3 expressions should work in that the argument gets
 // coerced to a trait object
 
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     send::<Box<dyn Foo>>(Box::new(Output(0)));
diff --git a/tests/ui/coercion/issue-14589.stderr b/tests/ui/coercion/issue-14589.stderr
index 37b7fce7462b3..5d7b840a8d7db 100644
--- a/tests/ui/coercion/issue-14589.stderr
+++ b/tests/ui/coercion/issue-14589.stderr
@@ -1,5 +1,5 @@
 warning: method `dummy` is never used
-  --> $DIR/issue-14589.rs:22:16
+  --> $DIR/issue-14589.rs:21:16
    |
 LL | trait Foo { fn dummy(&self) { }}
    |       ---      ^^^^^
diff --git a/tests/ui/coherence/coherence-bigint-int.rs b/tests/ui/coherence/coherence-bigint-int.rs
index 0a9ddf5e2d156..739c035cc9007 100644
--- a/tests/ui/coherence/coherence-bigint-int.rs
+++ b/tests/ui/coherence/coherence-bigint-int.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:coherence_lib.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate coherence_lib as lib;
 use lib::Remote1;
diff --git a/tests/ui/coherence/coherence-bigint-vecint.rs b/tests/ui/coherence/coherence-bigint-vecint.rs
index 6822c6c44b78f..c26defead3ff3 100644
--- a/tests/ui/coherence/coherence-bigint-vecint.rs
+++ b/tests/ui/coherence/coherence-bigint-vecint.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:coherence_lib.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate coherence_lib as lib;
 use lib::Remote1;
diff --git a/tests/ui/coherence/coherence-blanket.rs b/tests/ui/coherence/coherence-blanket.rs
index db10b8e654f5b..cc95e15a4122f 100644
--- a/tests/ui/coherence/coherence-blanket.rs
+++ b/tests/ui/coherence/coherence-blanket.rs
@@ -2,7 +2,6 @@
 #![allow(unused_imports)]
 //@ aux-build:coherence_lib.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate coherence_lib as lib;
 use lib::Remote1;
diff --git a/tests/ui/coherence/coherence-covered-type-parameter.rs b/tests/ui/coherence/coherence-covered-type-parameter.rs
index b6332a0442483..3f34934338228 100644
--- a/tests/ui/coherence/coherence-covered-type-parameter.rs
+++ b/tests/ui/coherence/coherence-covered-type-parameter.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 //@ aux-build:coherence_lib.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate coherence_lib as lib;
 use lib::Remote;
diff --git a/tests/ui/coherence/coherence-iterator-vec-any-elem.rs b/tests/ui/coherence/coherence-iterator-vec-any-elem.rs
index a406e4408a439..1e43595d1eb18 100644
--- a/tests/ui/coherence/coherence-iterator-vec-any-elem.rs
+++ b/tests/ui/coherence/coherence-iterator-vec-any-elem.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 //@ aux-build:coherence_lib.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate coherence_lib as lib;
 use lib::Remote1;
diff --git a/tests/ui/coherence/coherence-iterator-vec.rs b/tests/ui/coherence/coherence-iterator-vec.rs
index 2955348493175..02c3a9d2cee29 100644
--- a/tests/ui/coherence/coherence-iterator-vec.rs
+++ b/tests/ui/coherence/coherence-iterator-vec.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 //@ aux-build:coherence_lib.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate coherence_lib as lib;
 use lib::Remote1;
diff --git a/tests/ui/coherence/coherence-multidispatch-tuple.rs b/tests/ui/coherence/coherence-multidispatch-tuple.rs
index ac7b2578d774b..6a2de80c0ea64 100644
--- a/tests/ui/coherence/coherence-multidispatch-tuple.rs
+++ b/tests/ui/coherence/coherence-multidispatch-tuple.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(unused_imports)]
-//@ pretty-expanded FIXME #23616
 
 use std::fmt::Debug;
 use std::default::Default;
diff --git a/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs b/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs
index d69872ba8cffa..5935e972e49e8 100644
--- a/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs
+++ b/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 #![feature(negative_impls)]
 
diff --git a/tests/ui/consts/const-bound.rs b/tests/ui/consts/const-bound.rs
index 682a2dcbbc63e..00a833ba3f79e 100644
--- a/tests/ui/consts/const-bound.rs
+++ b/tests/ui/consts/const-bound.rs
@@ -3,7 +3,6 @@
 // Make sure const bounds work on things, and test that a few types
 // are const.
 
-//@ pretty-expanded FIXME #23616
 
 fn foo<T: Sync>(x: T) -> T { x }
 
diff --git a/tests/ui/consts/const-expr-in-fixed-length-vec.rs b/tests/ui/consts/const-expr-in-fixed-length-vec.rs
index 60b4895f5f97b..f4d651af11540 100644
--- a/tests/ui/consts/const-expr-in-fixed-length-vec.rs
+++ b/tests/ui/consts/const-expr-in-fixed-length-vec.rs
@@ -2,7 +2,6 @@
 // Check that constant expressions can be used for declaring the
 // type of a fixed length vector.
 
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
 
diff --git a/tests/ui/consts/const-expr-in-vec-repeat.rs b/tests/ui/consts/const-expr-in-vec-repeat.rs
index 5345a1c4c42ee..e270d4c1eb3c1 100644
--- a/tests/ui/consts/const-expr-in-vec-repeat.rs
+++ b/tests/ui/consts/const-expr-in-vec-repeat.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 // Check that constant expressions can be used in vec repeat syntax.
 
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
 
diff --git a/tests/ui/consts/const-struct-offsets.rs b/tests/ui/consts/const-struct-offsets.rs
index ee97fe3cab941..491b7095b70d9 100644
--- a/tests/ui/consts/const-struct-offsets.rs
+++ b/tests/ui/consts/const-struct-offsets.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 #![allow(non_upper_case_globals)]
 
 enum Foo {
diff --git a/tests/ui/consts/const-unit-struct.rs b/tests/ui/consts/const-unit-struct.rs
index 096cd1e83847a..2dadb000f4cae 100644
--- a/tests/ui/consts/const-unit-struct.rs
+++ b/tests/ui/consts/const-unit-struct.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 struct Foo;
 
diff --git a/tests/ui/consts/const-vec-of-fns.rs b/tests/ui/consts/const-vec-of-fns.rs
index a14cb06db6153..fa7eda789efa1 100644
--- a/tests/ui/consts/const-vec-of-fns.rs
+++ b/tests/ui/consts/const-vec-of-fns.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 #![allow(non_upper_case_globals)]
 
 /*!
diff --git a/tests/ui/consts/const-vec-syntax.rs b/tests/ui/consts/const-vec-syntax.rs
index 5537a8cec9006..d305d45a8cdaa 100644
--- a/tests/ui/consts/const-vec-syntax.rs
+++ b/tests/ui/consts/const-vec-syntax.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn f(_: &[isize]) {}
 
diff --git a/tests/ui/consts/issue-13837.rs b/tests/ui/consts/issue-13837.rs
index 305512cc41ccf..85e278539b2bc 100644
--- a/tests/ui/consts/issue-13837.rs
+++ b/tests/ui/consts/issue-13837.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 struct TestStruct {
     x: *const [isize; 2]
diff --git a/tests/ui/crate-leading-sep.rs b/tests/ui/crate-leading-sep.rs
index fbc940aed260f..6f4dd0bcfd7f1 100644
--- a/tests/ui/crate-leading-sep.rs
+++ b/tests/ui/crate-leading-sep.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![allow(dropping_copy_types)]
 
diff --git a/tests/ui/crate-method-reexport-grrrrrrr.rs b/tests/ui/crate-method-reexport-grrrrrrr.rs
index 870c6851a6616..aca399f4e2090 100644
--- a/tests/ui/crate-method-reexport-grrrrrrr.rs
+++ b/tests/ui/crate-method-reexport-grrrrrrr.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 // This is a regression test that the metadata for the
 // name_pool::methods impl in the other crate is reachable from this
diff --git a/tests/ui/crate-name-attr-used.rs b/tests/ui/crate-name-attr-used.rs
index 8e958aa0eaa31..5d5a58c32c799 100644
--- a/tests/ui/crate-name-attr-used.rs
+++ b/tests/ui/crate-name-attr-used.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ compile-flags:--crate-name crate_name_attr_used -F unused-attributes
 
-//@ pretty-expanded FIXME #23616
 
 #![crate_name = "crate_name_attr_used"]
 
diff --git a/tests/ui/cross-crate/cci_capture_clause.rs b/tests/ui/cross-crate/cci_capture_clause.rs
index 73e1020d7cfcb..22fe49c2ba081 100644
--- a/tests/ui/cross-crate/cci_capture_clause.rs
+++ b/tests/ui/cross-crate/cci_capture_clause.rs
@@ -4,7 +4,6 @@
 // This test makes sure we can do cross-crate inlining on functions
 // that use capture clauses.
 
-//@ pretty-expanded FIXME #23616
 //@ needs-threads
 
 extern crate cci_capture_clause;
diff --git a/tests/ui/cross-crate/cross-crate-const-pat.rs b/tests/ui/cross-crate/cross-crate-const-pat.rs
index 4ff55adb8042c..315210891609b 100644
--- a/tests/ui/cross-crate/cross-crate-const-pat.rs
+++ b/tests/ui/cross-crate/cross-crate-const-pat.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:cci_const.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate cci_const;
 
diff --git a/tests/ui/cross-crate/moves-based-on-type-cross-crate.rs b/tests/ui/cross-crate/moves-based-on-type-cross-crate.rs
index 640a1789cbe85..3e05717326c43 100644
--- a/tests/ui/cross-crate/moves-based-on-type-cross-crate.rs
+++ b/tests/ui/cross-crate/moves-based-on-type-cross-crate.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:moves_based_on_type_lib.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate moves_based_on_type_lib;
 use moves_based_on_type_lib::f;
diff --git a/tests/ui/cross-crate/static-addresses.rs b/tests/ui/cross-crate/static-addresses.rs
index 66ac467e9acd9..2783b44671d5e 100644
--- a/tests/ui/cross-crate/static-addresses.rs
+++ b/tests/ui/cross-crate/static-addresses.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:xcrate_static_addresses.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate xcrate_static_addresses;
 
diff --git a/tests/ui/cross-crate/trait-lifetime-param.rs b/tests/ui/cross-crate/trait-lifetime-param.rs
index 28955e62d9584..89983492fe4cb 100644
--- a/tests/ui/cross-crate/trait-lifetime-param.rs
+++ b/tests/ui/cross-crate/trait-lifetime-param.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 //@ aux-build:xcrate-trait-lifetime-param.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate xcrate_trait_lifetime_param as other;
 
diff --git a/tests/ui/cross-crate/unit-struct-2.rs b/tests/ui/cross-crate/unit-struct-2.rs
index c2e3a7611292f..2177a8800db1a 100644
--- a/tests/ui/cross-crate/unit-struct-2.rs
+++ b/tests/ui/cross-crate/unit-struct-2.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 //@ aux-build:xcrate_unit_struct.rs
-//@ pretty-expanded FIXME #23616
 #![allow(non_upper_case_globals)]
 
 extern crate xcrate_unit_struct;
diff --git a/tests/ui/default-method-parsing.rs b/tests/ui/default-method-parsing.rs
index 2580a04221fb0..84c3ab747c8ee 100644
--- a/tests/ui/default-method-parsing.rs
+++ b/tests/ui/default-method-parsing.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 trait Foo {
     fn m(&self, _:isize) { }
diff --git a/tests/ui/deref.rs b/tests/ui/deref.rs
index b491c517d94fa..0a6f3cc81f6c1 100644
--- a/tests/ui/deref.rs
+++ b/tests/ui/deref.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     let x: Box<isize> = Box::new(10);
diff --git a/tests/ui/deriving/deriving-clone-enum.rs b/tests/ui/deriving/deriving-clone-enum.rs
index 59301c1d094bd..96b9ba4f24c3e 100644
--- a/tests/ui/deriving/deriving-clone-enum.rs
+++ b/tests/ui/deriving/deriving-clone-enum.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 #[derive(Clone)]
 enum E {
diff --git a/tests/ui/deriving/deriving-clone-generic-enum.rs b/tests/ui/deriving/deriving-clone-generic-enum.rs
index 7f0dd872ffdf8..08c91c487baac 100644
--- a/tests/ui/deriving/deriving-clone-generic-enum.rs
+++ b/tests/ui/deriving/deriving-clone-generic-enum.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 #[derive(Clone)]
 enum E<T,U> {
diff --git a/tests/ui/deriving/deriving-clone-generic-struct.rs b/tests/ui/deriving/deriving-clone-generic-struct.rs
index cbdfa8a7c9a5f..f2fc6d5e4d78f 100644
--- a/tests/ui/deriving/deriving-clone-generic-struct.rs
+++ b/tests/ui/deriving/deriving-clone-generic-struct.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/deriving/deriving-clone-generic-tuple-struct.rs b/tests/ui/deriving/deriving-clone-generic-tuple-struct.rs
index f0bbce707f304..178075e273d73 100644
--- a/tests/ui/deriving/deriving-clone-generic-tuple-struct.rs
+++ b/tests/ui/deriving/deriving-clone-generic-tuple-struct.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #[derive(Clone)]
 #[allow(dead_code)]
diff --git a/tests/ui/deriving/deriving-clone-struct.rs b/tests/ui/deriving/deriving-clone-struct.rs
index b357aa82a2ac8..896ce51bf3d84 100644
--- a/tests/ui/deriving/deriving-clone-struct.rs
+++ b/tests/ui/deriving/deriving-clone-struct.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/deriving/deriving-clone-tuple-struct.rs b/tests/ui/deriving/deriving-clone-tuple-struct.rs
index 727860465fc47..622ffb7b1f49c 100644
--- a/tests/ui/deriving/deriving-clone-tuple-struct.rs
+++ b/tests/ui/deriving/deriving-clone-tuple-struct.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/deriving/deriving-enum-single-variant.rs b/tests/ui/deriving/deriving-enum-single-variant.rs
index dfdfef01298bb..43d229c442c45 100644
--- a/tests/ui/deriving/deriving-enum-single-variant.rs
+++ b/tests/ui/deriving/deriving-enum-single-variant.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 #![allow(non_camel_case_types)]
 
 pub type task_id = isize;
diff --git a/tests/ui/deriving/deriving-in-macro.rs b/tests/ui/deriving/deriving-in-macro.rs
index e86b40d30dcf0..493c1415c7fa2 100644
--- a/tests/ui/deriving/deriving-in-macro.rs
+++ b/tests/ui/deriving/deriving-in-macro.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 #![allow(non_camel_case_types)]
 
 macro_rules! define_vec {
diff --git a/tests/ui/deriving/deriving-meta-multiple.rs b/tests/ui/deriving/deriving-meta-multiple.rs
index 07dabd9e9c36b..7c2d3566fbf26 100644
--- a/tests/ui/deriving/deriving-meta-multiple.rs
+++ b/tests/ui/deriving/deriving-meta-multiple.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(unused_must_use)]
 #![allow(unused_imports)]
-//@ pretty-expanded FIXME #23616
 #![allow(deprecated)]
 
 use std::hash::{Hash, SipHasher};
diff --git a/tests/ui/deriving/deriving-meta.rs b/tests/ui/deriving/deriving-meta.rs
index 34d31d9ef9ee6..70b5821edae14 100644
--- a/tests/ui/deriving/deriving-meta.rs
+++ b/tests/ui/deriving/deriving-meta.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(unused_must_use)]
 #![allow(unused_imports)]
-//@ pretty-expanded FIXME #23616
 #![allow(deprecated)]
 
 use std::hash::{Hash, SipHasher};
diff --git a/tests/ui/deriving/deriving-via-extension-hash-struct.rs b/tests/ui/deriving/deriving-via-extension-hash-struct.rs
index ad2a84b6bf920..2b1bc9e108b13 100644
--- a/tests/ui/deriving/deriving-via-extension-hash-struct.rs
+++ b/tests/ui/deriving/deriving-via-extension-hash-struct.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 #[derive(Hash)]
 struct Foo {
diff --git a/tests/ui/deriving/issue-15689-2.rs b/tests/ui/deriving/issue-15689-2.rs
index 790c72f6d4d04..a1f66cc064388 100644
--- a/tests/ui/deriving/issue-15689-2.rs
+++ b/tests/ui/deriving/issue-15689-2.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 #[derive(Clone)]
 enum Test<'a> {
diff --git a/tests/ui/deriving/issue-6341.rs b/tests/ui/deriving/issue-6341.rs
index 5c2d0abfa8c44..83b0da9a31825 100644
--- a/tests/ui/deriving/issue-6341.rs
+++ b/tests/ui/deriving/issue-6341.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 #[derive(PartialEq)]
 struct A { x: usize }
diff --git a/tests/ui/double-ref.rs b/tests/ui/double-ref.rs
index 62591deb8689f..eecf68ff209cb 100644
--- a/tests/ui/double-ref.rs
+++ b/tests/ui/double-ref.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 fn check_expr() {
     let _:         & usize =     &1;
diff --git a/tests/ui/drop/drop-on-empty-block-exit.rs b/tests/ui/drop/drop-on-empty-block-exit.rs
index 63bc403a72145..107ea9022f86f 100644
--- a/tests/ui/drop/drop-on-empty-block-exit.rs
+++ b/tests/ui/drop/drop-on-empty-block-exit.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 #![allow(non_camel_case_types)]
 
 enum t { foo(Box<isize>), }
diff --git a/tests/ui/drop/drop-on-ret.rs b/tests/ui/drop/drop-on-ret.rs
index f8ce899adf088..4bd50e6a72d72 100644
--- a/tests/ui/drop/drop-on-ret.rs
+++ b/tests/ui/drop/drop-on-ret.rs
@@ -2,7 +2,6 @@
 
 
 
-//@ pretty-expanded FIXME #23616
 
 fn f() -> isize {
     if true {
diff --git a/tests/ui/drop/drop-uninhabited-enum.rs b/tests/ui/drop/drop-uninhabited-enum.rs
index f018ffa097747..2ac6dc8e9ea3e 100644
--- a/tests/ui/drop/drop-uninhabited-enum.rs
+++ b/tests/ui/drop/drop-uninhabited-enum.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(dead_code)]
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 enum Foo { }
 
diff --git a/tests/ui/drop/issue-10028.rs b/tests/ui/drop/issue-10028.rs
index 4191425452249..1ca1fbf504d73 100644
--- a/tests/ui/drop/issue-10028.rs
+++ b/tests/ui/drop/issue-10028.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 //@ aux-build:issue-10028.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_10028 as issue10028;
 
diff --git a/tests/ui/drop/issue-2734.rs b/tests/ui/drop/issue-2734.rs
index 028f86ebb3a90..4616ea1f0137d 100644
--- a/tests/ui/drop/issue-2734.rs
+++ b/tests/ui/drop/issue-2734.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 trait hax {
     fn dummy(&self) { }
diff --git a/tests/ui/drop/issue-2735.rs b/tests/ui/drop/issue-2735.rs
index 8fa3ac45d08f8..cd7e0b8f46109 100644
--- a/tests/ui/drop/issue-2735.rs
+++ b/tests/ui/drop/issue-2735.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 trait hax {
     fn dummy(&self) { }
diff --git a/tests/ui/drop/nondrop-cycle.rs b/tests/ui/drop/nondrop-cycle.rs
index 9b32d1319c914..fbee1be179f02 100644
--- a/tests/ui/drop/nondrop-cycle.rs
+++ b/tests/ui/drop/nondrop-cycle.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 use std::cell::Cell;
 
diff --git a/tests/ui/drop/use_inline_dtor.rs b/tests/ui/drop/use_inline_dtor.rs
index 03f476cff2a1b..9d3cbd0b8b4ec 100644
--- a/tests/ui/drop/use_inline_dtor.rs
+++ b/tests/ui/drop/use_inline_dtor.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:inline_dtor.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate inline_dtor;
 
diff --git a/tests/ui/dropck/cleanup-arm-conditional.rs b/tests/ui/dropck/cleanup-arm-conditional.rs
index 94b380801892b..31331f24d6f6b 100644
--- a/tests/ui/dropck/cleanup-arm-conditional.rs
+++ b/tests/ui/dropck/cleanup-arm-conditional.rs
@@ -5,7 +5,6 @@
 // Test that cleanup scope for temporaries created in a match
 // arm is confined to the match arm itself.
 
-//@ pretty-expanded FIXME #23616
 
 #![feature(os)]
 
diff --git a/tests/ui/dupe-first-attr.rs b/tests/ui/dupe-first-attr.rs
index ec9e354e73df3..c254df050c153 100644
--- a/tests/ui/dupe-first-attr.rs
+++ b/tests/ui/dupe-first-attr.rs
@@ -3,7 +3,6 @@
 // Regression test for a problem with the first mod attribute
 // being applied to every mod
 
-//@ pretty-expanded FIXME #23616
 
 #[cfg(target_os = "linux")]
 mod hello {}
diff --git a/tests/ui/dynamically-sized-types/dst-coercions.rs b/tests/ui/dynamically-sized-types/dst-coercions.rs
index 6b3c85cf83b06..4813dda439b53 100644
--- a/tests/ui/dynamically-sized-types/dst-coercions.rs
+++ b/tests/ui/dynamically-sized-types/dst-coercions.rs
@@ -2,7 +2,6 @@
 #![allow(unused_variables)]
 // Test coercions involving DST and/or raw pointers
 
-//@ pretty-expanded FIXME #23616
 
 struct S;
 trait T { fn dummy(&self) { } } //~ WARN method `dummy` is never used
diff --git a/tests/ui/dynamically-sized-types/dst-coercions.stderr b/tests/ui/dynamically-sized-types/dst-coercions.stderr
index e4721ce50a045..e7c48783df0ee 100644
--- a/tests/ui/dynamically-sized-types/dst-coercions.stderr
+++ b/tests/ui/dynamically-sized-types/dst-coercions.stderr
@@ -1,5 +1,5 @@
 warning: method `dummy` is never used
-  --> $DIR/dst-coercions.rs:8:14
+  --> $DIR/dst-coercions.rs:7:14
    |
 LL | trait T { fn dummy(&self) { } }
    |       -      ^^^^^
diff --git a/tests/ui/early-ret-binop-add.rs b/tests/ui/early-ret-binop-add.rs
index 5daf79c214c50..3fec66f35fb8b 100644
--- a/tests/ui/early-ret-binop-add.rs
+++ b/tests/ui/early-ret-binop-add.rs
@@ -2,7 +2,6 @@
 
 #![allow(dead_code)]
 #![allow(unreachable_code)]
-//@ pretty-expanded FIXME #23616
 
 use std::ops::Add;
 
diff --git a/tests/ui/empty-allocation-rvalue-non-null.rs b/tests/ui/empty-allocation-rvalue-non-null.rs
index 25c36679033b9..0cd4fde73eda8 100644
--- a/tests/ui/empty-allocation-rvalue-non-null.rs
+++ b/tests/ui/empty-allocation-rvalue-non-null.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     let x: () = *Box::new(());
diff --git a/tests/ui/enum/issue-1821.rs b/tests/ui/enum/issue-1821.rs
index 76d60962c38be..2cfdee566a61c 100644
--- a/tests/ui/enum/issue-1821.rs
+++ b/tests/ui/enum/issue-1821.rs
@@ -5,7 +5,6 @@
 // Issue #1821 - Don't recurse trying to typecheck this
 
 
-//@ pretty-expanded FIXME #23616
 
 enum t {
     foo(Vec<t>)
diff --git a/tests/ui/enum/issue-19340-1.rs b/tests/ui/enum/issue-19340-1.rs
index c1ba0d23b6ff6..9793692344261 100644
--- a/tests/ui/enum/issue-19340-1.rs
+++ b/tests/ui/enum/issue-19340-1.rs
@@ -2,7 +2,6 @@
 #![allow(unused_variables)]
 //@ aux-build:issue-19340-1.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_19340_1 as lib;
 
diff --git a/tests/ui/enum/issue-19340-2.rs b/tests/ui/enum/issue-19340-2.rs
index dd1bda78a9795..0930cd5da09ae 100644
--- a/tests/ui/enum/issue-19340-2.rs
+++ b/tests/ui/enum/issue-19340-2.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 enum Homura {
     Madoka {
diff --git a/tests/ui/explicit-i-suffix.rs b/tests/ui/explicit-i-suffix.rs
index 29c7391521e2f..0a6ed49ae2704 100644
--- a/tests/ui/explicit-i-suffix.rs
+++ b/tests/ui/explicit-i-suffix.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 
 #![allow(unused_must_use)]
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     let x: isize = 8;
diff --git a/tests/ui/expr/if/if-ret.rs b/tests/ui/expr/if/if-ret.rs
index 3aad21d34a2ff..2698c5bbf6eaa 100644
--- a/tests/ui/expr/if/if-ret.rs
+++ b/tests/ui/expr/if/if-ret.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 
 #![allow(unused_parens)]
-//@ pretty-expanded FIXME #23616
 
 fn foo() { if (return) { } } //~ WARNING unreachable block in `if`
 
diff --git a/tests/ui/expr/if/if-ret.stderr b/tests/ui/expr/if/if-ret.stderr
index 8ced271aabc2b..e5464affd2f15 100644
--- a/tests/ui/expr/if/if-ret.stderr
+++ b/tests/ui/expr/if/if-ret.stderr
@@ -1,5 +1,5 @@
 warning: unreachable block in `if` or `while` expression
-  --> $DIR/if-ret.rs:6:24
+  --> $DIR/if-ret.rs:5:24
    |
 LL | fn foo() { if (return) { } }
    |               -------- ^^^ unreachable block in `if` or `while` expression
diff --git a/tests/ui/expr/scope.rs b/tests/ui/expr/scope.rs
index 57321ce2aa015..3a1c8b87da8fa 100644
--- a/tests/ui/expr/scope.rs
+++ b/tests/ui/expr/scope.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 // Regression test for issue #762
 
-//@ pretty-expanded FIXME #23616
 
 pub fn f() { }
 pub fn main() { return ::f(); }
diff --git a/tests/ui/extern/extern-1.rs b/tests/ui/extern/extern-1.rs
index c0f770ab9f2f3..226bc1effb176 100644
--- a/tests/ui/extern/extern-1.rs
+++ b/tests/ui/extern/extern-1.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 extern "C" fn f() {
 }
diff --git a/tests/ui/extern/extern-calling-convention-test.rs b/tests/ui/extern/extern-calling-convention-test.rs
index 7c533df1986ed..68315ed093470 100644
--- a/tests/ui/extern/extern-calling-convention-test.rs
+++ b/tests/ui/extern/extern-calling-convention-test.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:extern_calling_convention.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate extern_calling_convention;
 
diff --git a/tests/ui/extern/extern-foreign-crate.rs b/tests/ui/extern/extern-foreign-crate.rs
index 939090ab5fc82..690a650136846 100644
--- a/tests/ui/extern/extern-foreign-crate.rs
+++ b/tests/ui/extern/extern-foreign-crate.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 extern crate std as mystd;
 
diff --git a/tests/ui/extern/extern-mod-abi.rs b/tests/ui/extern/extern-mod-abi.rs
index 8700a379d2911..29892c468dd3b 100644
--- a/tests/ui/extern/extern-mod-abi.rs
+++ b/tests/ui/extern/extern-mod-abi.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 extern "C" {
     fn pow(x: f64, y: f64) -> f64;
diff --git a/tests/ui/extern/extern-mod-ordering-exe.rs b/tests/ui/extern/extern-mod-ordering-exe.rs
index c735f6bae7a50..9f5e52e33955c 100644
--- a/tests/ui/extern/extern-mod-ordering-exe.rs
+++ b/tests/ui/extern/extern-mod-ordering-exe.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:extern_mod_ordering_lib.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate extern_mod_ordering_lib;
 
diff --git a/tests/ui/extern/extern-pub.rs b/tests/ui/extern/extern-pub.rs
index 80f1e295d4d40..b272bc5359fd0 100644
--- a/tests/ui/extern/extern-pub.rs
+++ b/tests/ui/extern/extern-pub.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 extern "C" {
     pub fn free(p: *const u8);
diff --git a/tests/ui/extern/extern-rust.rs b/tests/ui/extern/extern-rust.rs
index bacdc7aeecb4c..b4a4a49810e66 100644
--- a/tests/ui/extern/extern-rust.rs
+++ b/tests/ui/extern/extern-rust.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #[repr(C)]
 pub struct Foo(u32);
diff --git a/tests/ui/extern/issue-10025.rs b/tests/ui/extern/issue-10025.rs
index 0bdcf7c5c5875..140012f4a1613 100644
--- a/tests/ui/extern/issue-10025.rs
+++ b/tests/ui/extern/issue-10025.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 #![allow(dead_code)]
 
 unsafe extern fn foo() {}
diff --git a/tests/ui/extern/issue-10763.rs b/tests/ui/extern/issue-10763.rs
index 2381f22f162f2..6966f5571df74 100644
--- a/tests/ui/extern/issue-10763.rs
+++ b/tests/ui/extern/issue-10763.rs
@@ -1,6 +1,5 @@
 //@ build-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 extern "Rust" fn foo() {}
 
diff --git a/tests/ui/extern/issue-10764-rpass.rs b/tests/ui/extern/issue-10764-rpass.rs
index 4de387e3d661d..761bf4e28b775 100644
--- a/tests/ui/extern/issue-10764-rpass.rs
+++ b/tests/ui/extern/issue-10764-rpass.rs
@@ -1,4 +1,3 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 extern "Rust" fn main() {}
diff --git a/tests/ui/extern/issue-1251.rs b/tests/ui/extern/issue-1251.rs
index 5581bddaddc16..ba42fef298c08 100644
--- a/tests/ui/extern/issue-1251.rs
+++ b/tests/ui/extern/issue-1251.rs
@@ -1,7 +1,6 @@
 //@ build-pass
 #![allow(unused_attributes)]
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 mod rustrt {
     extern "C" {
diff --git a/tests/ui/feature-gates/feature-gate-simd.rs b/tests/ui/feature-gates/feature-gate-simd.rs
index e7aef5a97f2ee..9a27cb73f0072 100644
--- a/tests/ui/feature-gates/feature-gate-simd.rs
+++ b/tests/ui/feature-gates/feature-gate-simd.rs
@@ -1,5 +1,3 @@
-//@ pretty-expanded FIXME #23616
-
 #[repr(simd)] //~ ERROR SIMD types are experimental
 struct RGBA {
     rgba: [f32; 4],
diff --git a/tests/ui/feature-gates/feature-gate-simd.stderr b/tests/ui/feature-gates/feature-gate-simd.stderr
index b020db35a51ca..834baa0a564ea 100644
--- a/tests/ui/feature-gates/feature-gate-simd.stderr
+++ b/tests/ui/feature-gates/feature-gate-simd.stderr
@@ -1,5 +1,5 @@
 error[E0658]: SIMD types are experimental and possibly buggy
-  --> $DIR/feature-gate-simd.rs:3:1
+  --> $DIR/feature-gate-simd.rs:1:1
    |
 LL | #[repr(simd)]
    | ^^^^^^^^^^^^^
diff --git a/tests/ui/filter-block-view-items.rs b/tests/ui/filter-block-view-items.rs
index f582c51a3a64f..975ab19ddf25f 100644
--- a/tests/ui/filter-block-view-items.rs
+++ b/tests/ui/filter-block-view-items.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     // Make sure that this view item is filtered out because otherwise it would
diff --git a/tests/ui/fn/issue-1451.rs b/tests/ui/fn/issue-1451.rs
index 735b766bd0cf2..40b107ca7cc56 100644
--- a/tests/ui/fn/issue-1451.rs
+++ b/tests/ui/fn/issue-1451.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 #![allow(non_snake_case)]
 #![allow(unused_variables)]
 
diff --git a/tests/ui/for-loop-while/break-value.rs b/tests/ui/for-loop-while/break-value.rs
index 1289231fc30ff..eb9ccb21203ba 100644
--- a/tests/ui/for-loop-while/break-value.rs
+++ b/tests/ui/for-loop-while/break-value.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(unreachable_code)]
-//@ pretty-expanded FIXME #23616
 
 fn int_id(x: isize) -> isize { return x; }
 
diff --git a/tests/ui/for-loop-while/issue-1257.rs b/tests/ui/for-loop-while/issue-1257.rs
index cdd4c806358dc..369302f9f12e7 100644
--- a/tests/ui/for-loop-while/issue-1257.rs
+++ b/tests/ui/for-loop-while/issue-1257.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main () {
   let mut line = "".to_string();
diff --git a/tests/ui/for-loop-while/labeled-break.rs b/tests/ui/for-loop-while/labeled-break.rs
index 0dfbdc02f5b5b..9c53350f22765 100644
--- a/tests/ui/for-loop-while/labeled-break.rs
+++ b/tests/ui/for-loop-while/labeled-break.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     'foo: loop {
diff --git a/tests/ui/for-loop-while/liveness-assign-imm-local-after-loop.rs b/tests/ui/for-loop-while/liveness-assign-imm-local-after-loop.rs
index be6dc33c8bea7..31f2ecf2affa9 100644
--- a/tests/ui/for-loop-while/liveness-assign-imm-local-after-loop.rs
+++ b/tests/ui/for-loop-while/liveness-assign-imm-local-after-loop.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(dead_code)]
 #![allow(unused_assignments)]
-//@ pretty-expanded FIXME #23616
 
 #![allow(unreachable_code)]
 #![allow(unused_variables)]
diff --git a/tests/ui/for-loop-while/liveness-move-in-loop.rs b/tests/ui/for-loop-while/liveness-move-in-loop.rs
index 0ae92a78a04dd..0c35479cf12b1 100644
--- a/tests/ui/for-loop-while/liveness-move-in-loop.rs
+++ b/tests/ui/for-loop-while/liveness-move-in-loop.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(dead_code)]
 
-//@ pretty-expanded FIXME #23616
 
 fn take(x: isize) -> isize {x}
 
diff --git a/tests/ui/for-loop-while/long-while.rs b/tests/ui/for-loop-while/long-while.rs
index 6db06baa8738b..5b9fbb104533a 100644
--- a/tests/ui/for-loop-while/long-while.rs
+++ b/tests/ui/for-loop-while/long-while.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![allow(unused_variables)]
 
diff --git a/tests/ui/for-loop-while/loop-diverges.rs b/tests/ui/for-loop-while/loop-diverges.rs
index fdf46387795ff..77d15e3c32192 100644
--- a/tests/ui/for-loop-while/loop-diverges.rs
+++ b/tests/ui/for-loop-while/loop-diverges.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(unused_parens)]
-//@ pretty-expanded FIXME #23616
 
 /* Make sure a loop{} can be the tailexpr in the body
 of a diverging function */
diff --git a/tests/ui/for-loop-while/loop-label-shadowing.rs b/tests/ui/for-loop-while/loop-label-shadowing.rs
index e3dfbe65d8cf0..030da69cbb79c 100644
--- a/tests/ui/for-loop-while/loop-label-shadowing.rs
+++ b/tests/ui/for-loop-while/loop-label-shadowing.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 // Issue #12512.
 
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     let mut foo = Vec::new();
diff --git a/tests/ui/for-loop-while/loop-labeled-break-value.rs b/tests/ui/for-loop-while/loop-labeled-break-value.rs
index 0ab07ffd7e22a..702bda1b90a2b 100644
--- a/tests/ui/for-loop-while/loop-labeled-break-value.rs
+++ b/tests/ui/for-loop-while/loop-labeled-break-value.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     'outer: loop {
diff --git a/tests/ui/for-loop-while/loop-no-reinit-needed-post-bot.rs b/tests/ui/for-loop-while/loop-no-reinit-needed-post-bot.rs
index 531c3dc377d75..cf4474d815bf7 100644
--- a/tests/ui/for-loop-while/loop-no-reinit-needed-post-bot.rs
+++ b/tests/ui/for-loop-while/loop-no-reinit-needed-post-bot.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 struct S;
 // Ensure S is moved, not copied, on assignment.
diff --git a/tests/ui/for-loop-while/while-flow-graph.rs b/tests/ui/for-loop-while/while-flow-graph.rs
index 9148b42a6061a..e964d0195885c 100644
--- a/tests/ui/for-loop-while/while-flow-graph.rs
+++ b/tests/ui/for-loop-while/while-flow-graph.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 
 
-//@ pretty-expanded FIXME #23616
 
 pub fn main() { let x: isize = 10; while x == 10 && x == 11 { let _y = 0xf00_usize; } }
diff --git a/tests/ui/foreign/foreign-mod-unused-const.rs b/tests/ui/foreign/foreign-mod-unused-const.rs
index 2cc0a4f601838..4e40f92fdd415 100644
--- a/tests/ui/foreign/foreign-mod-unused-const.rs
+++ b/tests/ui/foreign/foreign-mod-unused-const.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 mod foo {
     extern "C" {
diff --git a/tests/ui/foreign/foreign2.rs b/tests/ui/foreign/foreign2.rs
index 178a04255ccee..a2f8385c8454a 100644
--- a/tests/ui/foreign/foreign2.rs
+++ b/tests/ui/foreign/foreign2.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 #![feature(rustc_private)]
diff --git a/tests/ui/foreign/nil-decl-in-foreign.rs b/tests/ui/foreign/nil-decl-in-foreign.rs
index 355278d99da5d..6adf08246e74a 100644
--- a/tests/ui/foreign/nil-decl-in-foreign.rs
+++ b/tests/ui/foreign/nil-decl-in-foreign.rs
@@ -3,7 +3,6 @@
 #![allow(improper_ctypes)]
 #![allow(dead_code)]
 // Issue #901
-//@ pretty-expanded FIXME #23616
 
 mod libc {
     extern "C" {
diff --git a/tests/ui/functions-closures/closure-bounds-can-capture-chan.rs b/tests/ui/functions-closures/closure-bounds-can-capture-chan.rs
index 4f38ea02d9cc3..318ca54ffd63f 100644
--- a/tests/ui/functions-closures/closure-bounds-can-capture-chan.rs
+++ b/tests/ui/functions-closures/closure-bounds-can-capture-chan.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 use std::sync::mpsc::channel;
 
diff --git a/tests/ui/functions-closures/fn-abi.rs b/tests/ui/functions-closures/fn-abi.rs
index d33158e89175c..350132f0f552d 100644
--- a/tests/ui/functions-closures/fn-abi.rs
+++ b/tests/ui/functions-closures/fn-abi.rs
@@ -2,7 +2,6 @@
 // Ensure that declarations and types which use `extern fn` both have the same
 // ABI (#9309).
 
-//@ pretty-expanded FIXME #23616
 //@ aux-build:fn-abi.rs
 
 extern crate fn_abi;
diff --git a/tests/ui/functions-closures/fn-bare-coerce-to-block.rs b/tests/ui/functions-closures/fn-bare-coerce-to-block.rs
index 18015a41564e2..9c80463d59ed4 100644
--- a/tests/ui/functions-closures/fn-bare-coerce-to-block.rs
+++ b/tests/ui/functions-closures/fn-bare-coerce-to-block.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn bare() {}
 
diff --git a/tests/ui/functions-closures/fn-coerce-field.rs b/tests/ui/functions-closures/fn-coerce-field.rs
index dd7be374c8428..7a9e1e5e82c39 100644
--- a/tests/ui/functions-closures/fn-coerce-field.rs
+++ b/tests/ui/functions-closures/fn-coerce-field.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 #![allow(non_camel_case_types)]
 
 struct r<F> where F: FnOnce() {
diff --git a/tests/ui/functions-closures/fn-item-type-coerce.rs b/tests/ui/functions-closures/fn-item-type-coerce.rs
index e858f9e9e196f..a5a0a4995bf47 100644
--- a/tests/ui/functions-closures/fn-item-type-coerce.rs
+++ b/tests/ui/functions-closures/fn-item-type-coerce.rs
@@ -2,7 +2,6 @@
 #![allow(unused_variables)]
 // Test implicit coercions from a fn item type to a fn pointer type.
 
-//@ pretty-expanded FIXME #23616
 
 fn foo(x: isize) -> isize { x * 2 }
 fn bar(x: isize) -> isize { x * 4 }
diff --git a/tests/ui/functions-closures/fn-lval.rs b/tests/ui/functions-closures/fn-lval.rs
index aa080f6b985f3..7b5e4d6651763 100644
--- a/tests/ui/functions-closures/fn-lval.rs
+++ b/tests/ui/functions-closures/fn-lval.rs
@@ -2,7 +2,6 @@
 
 
 
-//@ pretty-expanded FIXME #23616
 
 fn foo(_f: fn(isize) -> isize) { }
 
diff --git a/tests/ui/functions-closures/fn-type-infer.rs b/tests/ui/functions-closures/fn-type-infer.rs
index b1624e476ef16..eb9e5b1046794 100644
--- a/tests/ui/functions-closures/fn-type-infer.rs
+++ b/tests/ui/functions-closures/fn-type-infer.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![allow(unused_variables)]
 
diff --git a/tests/ui/generics/generic-default-type-params-cross-crate.rs b/tests/ui/generics/generic-default-type-params-cross-crate.rs
index 7da61572501ac..1b21e4cd191ad 100644
--- a/tests/ui/generics/generic-default-type-params-cross-crate.rs
+++ b/tests/ui/generics/generic-default-type-params-cross-crate.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:default_type_params_xc.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate default_type_params_xc;
 
diff --git a/tests/ui/generics/generic-fn-twice.rs b/tests/ui/generics/generic-fn-twice.rs
index f9e08401c6d4c..26d6f750c80f8 100644
--- a/tests/ui/generics/generic-fn-twice.rs
+++ b/tests/ui/generics/generic-fn-twice.rs
@@ -2,7 +2,6 @@
 
 
 
-//@ pretty-expanded FIXME #23616
 
 mod foomod {
     pub fn foo<T>() { }
diff --git a/tests/ui/generics/generic-newtype-struct.rs b/tests/ui/generics/generic-newtype-struct.rs
index a1d539c8c22e2..4cb481044f203 100644
--- a/tests/ui/generics/generic-newtype-struct.rs
+++ b/tests/ui/generics/generic-newtype-struct.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 struct S<T>(#[allow(dead_code)] T);
 
diff --git a/tests/ui/generics/generic-tag-corruption.rs b/tests/ui/generics/generic-tag-corruption.rs
index 78fdfe4ac7f2c..b7fd66a052394 100644
--- a/tests/ui/generics/generic-tag-corruption.rs
+++ b/tests/ui/generics/generic-tag-corruption.rs
@@ -3,7 +3,6 @@
 
 
 // This used to cause memory corruption in stage 0.
-//@ pretty-expanded FIXME #23616
 
 enum thing<K> { some(#[allow(dead_code)] K), }
 
diff --git a/tests/ui/generics/generic-tag-local.rs b/tests/ui/generics/generic-tag-local.rs
index e7c394efa0922..025827783c3e4 100644
--- a/tests/ui/generics/generic-tag-local.rs
+++ b/tests/ui/generics/generic-tag-local.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 enum clam<T> { a(#[allow(dead_code)] T), }
 
diff --git a/tests/ui/generics/generic-tag.rs b/tests/ui/generics/generic-tag.rs
index cb46c3155a305..98350e93ecebd 100644
--- a/tests/ui/generics/generic-tag.rs
+++ b/tests/ui/generics/generic-tag.rs
@@ -2,7 +2,6 @@
 #![allow(unused_assignments)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(unused_variables)]
 
diff --git a/tests/ui/generics/generic-type-synonym.rs b/tests/ui/generics/generic-type-synonym.rs
index 879bd91cab50e..a8a946d5ed2ad 100644
--- a/tests/ui/generics/generic-type-synonym.rs
+++ b/tests/ui/generics/generic-type-synonym.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 
 
-//@ pretty-expanded FIXME #23616
 
 struct Foo<T> {
     a: T
diff --git a/tests/ui/generics/mid-path-type-params.rs b/tests/ui/generics/mid-path-type-params.rs
index f7dbd7890793c..5100e8e73531e 100644
--- a/tests/ui/generics/mid-path-type-params.rs
+++ b/tests/ui/generics/mid-path-type-params.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 struct S<T> {
     contents: T,
diff --git a/tests/ui/generics/type-params-in-for-each.rs b/tests/ui/generics/type-params-in-for-each.rs
index e98f7bbb66bc7..004b775488768 100644
--- a/tests/ui/generics/type-params-in-for-each.rs
+++ b/tests/ui/generics/type-params-in-for-each.rs
@@ -2,7 +2,6 @@
 
 #![allow(dead_code)]
 
-//@ pretty-expanded FIXME #23616
 
 struct S<T> {
     a: T,
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-binder-levels-in-object-types.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-binder-levels-in-object-types.rs
index 5dec55d561228..09f3f7845d950 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-binder-levels-in-object-types.rs
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-binder-levels-in-object-types.rs
@@ -6,7 +6,6 @@
 // `&Typer<'tcx>` was getting an incorrect binder level, yielding
 // weird compilation ICEs and so forth.
 
-//@ pretty-expanded FIXME #23616
 
 trait Typer<'tcx> {
     fn method(&self, data: &'tcx isize) -> &'tcx isize { data }
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-debruijn-object-types-in-closures.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-debruijn-object-types-in-closures.rs
index f28b0776fdaf7..745a2fcc4f030 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-debruijn-object-types-in-closures.rs
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-debruijn-object-types-in-closures.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 trait Typer<'tcx> {
     fn method(&self, data: &'tcx isize) -> &'tcx isize { data }
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-parse.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-parse.rs
index 0edddf9423e49..7ecba7301ef0b 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-parse.rs
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-parse.rs
@@ -2,7 +2,6 @@
 // Test that we can parse all the various places that a `for` keyword
 // can appear representing universal quantification.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(unused_variables)]
 #![allow(dead_code)]
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus-where-clause.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus-where-clause.rs
index b49c69d90cf57..8c63dff87825e 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus-where-clause.rs
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus-where-clause.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(dead_code)]
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 // Test that `F : Fn(isize) -> isize + Send` is interpreted as two
 // distinct bounds on `F`.
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus.rs
index d50fd8cb8f338..2c8d3ac0d41ca 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus.rs
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 // Test that `Fn(isize) -> isize + 'static` parses as `(Fn(isize) -> isize) +
 // 'static` and not `Fn(isize) -> (isize + 'static)`. The latter would
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-resolve-lifetime.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-resolve-lifetime.rs
index 4a0b8362d4b04..271eedae89a16 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-resolve-lifetime.rs
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-resolve-lifetime.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 // A basic test of using a higher-ranked trait bound.
 
-//@ pretty-expanded FIXME #23616
 
 trait FnLike<A,R> {
     fn call(&self, arg: A) -> R;
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-passed-to-closure.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-passed-to-closure.rs
index 255e5d68e50fc..7a75218da3aa9 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-passed-to-closure.rs
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-passed-to-closure.rs
@@ -4,7 +4,6 @@
 // PrinterSupport<'b>`, gets properly expanded when it appears in a
 // closure type. This used to result in messed up De Bruijn indices.
 
-//@ pretty-expanded FIXME #23616
 
 trait PrinterSupport<'ast> {
     fn ast_map(&self) -> Option<&'ast usize> { None }
diff --git a/tests/ui/hygiene/issue-15221.rs b/tests/ui/hygiene/issue-15221.rs
index ebb1a234051aa..7703cb2de4e81 100644
--- a/tests/ui/hygiene/issue-15221.rs
+++ b/tests/ui/hygiene/issue-15221.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(path_statements)]
-//@ pretty-expanded FIXME #23616
 
 macro_rules! inner {
     ($e:pat ) => ($e)
diff --git a/tests/ui/impl-privacy-xc-1.rs b/tests/ui/impl-privacy-xc-1.rs
index 1a2af8098f59e..6a10986739cd2 100644
--- a/tests/ui/impl-privacy-xc-1.rs
+++ b/tests/ui/impl-privacy-xc-1.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:impl_privacy_xc_1.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate impl_privacy_xc_1;
 
diff --git a/tests/ui/imports/export-glob-imports-target.rs b/tests/ui/imports/export-glob-imports-target.rs
index 0133e8a94b516..6fde9fef0b67d 100644
--- a/tests/ui/imports/export-glob-imports-target.rs
+++ b/tests/ui/imports/export-glob-imports-target.rs
@@ -7,7 +7,6 @@
 
 // Modified to not use export since it's going away. --pcw
 
-//@ pretty-expanded FIXME #23616
 
 mod foo {
     use foo::bar::*;
diff --git a/tests/ui/imports/export-multi.rs b/tests/ui/imports/export-multi.rs
index b52e952f33c4a..4f7f7d3a6c035 100644
--- a/tests/ui/imports/export-multi.rs
+++ b/tests/ui/imports/export-multi.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 use m::f;
 use m::g;
diff --git a/tests/ui/imports/import-crate-with-invalid-spans/main.rs b/tests/ui/imports/import-crate-with-invalid-spans/main.rs
index 3234cf304f740..ed042f74f3f71 100644
--- a/tests/ui/imports/import-crate-with-invalid-spans/main.rs
+++ b/tests/ui/imports/import-crate-with-invalid-spans/main.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:crate_with_invalid_spans.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate crate_with_invalid_spans;
 
diff --git a/tests/ui/imports/import-from.rs b/tests/ui/imports/import-from.rs
index c5ff4b3abc618..128002e0e2abc 100644
--- a/tests/ui/imports/import-from.rs
+++ b/tests/ui/imports/import-from.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 use spam::{ham, eggs};
 
diff --git a/tests/ui/imports/import-in-block.rs b/tests/ui/imports/import-in-block.rs
index c17e2cffa51b5..2588ea7702363 100644
--- a/tests/ui/imports/import-in-block.rs
+++ b/tests/ui/imports/import-in-block.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     use std::mem::replace;
diff --git a/tests/ui/imports/import-trailing-comma.rs b/tests/ui/imports/import-trailing-comma.rs
index 3803b56487f81..4147357a22b09 100644
--- a/tests/ui/imports/import-trailing-comma.rs
+++ b/tests/ui/imports/import-trailing-comma.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 use foo::bar::{baz, quux,};
 
diff --git a/tests/ui/imports/reexport-star.rs b/tests/ui/imports/reexport-star.rs
index 3e41f12fa2d87..461dc23b4dcde 100644
--- a/tests/ui/imports/reexport-star.rs
+++ b/tests/ui/imports/reexport-star.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 mod a {
     pub fn f() {}
diff --git a/tests/ui/imports/use-mod.rs b/tests/ui/imports/use-mod.rs
index 065079b21e529..cabea16e725d7 100644
--- a/tests/ui/imports/use-mod.rs
+++ b/tests/ui/imports/use-mod.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 
 #![allow(unused_imports)]
-//@ pretty-expanded FIXME #23616
 
 pub use foo::bar::{self, First};
 use self::bar::Second;
diff --git a/tests/ui/inference/infer-fn-tail-expr.rs b/tests/ui/inference/infer-fn-tail-expr.rs
index 31b71e49bd6f7..e97522ed526c0 100644
--- a/tests/ui/inference/infer-fn-tail-expr.rs
+++ b/tests/ui/inference/infer-fn-tail-expr.rs
@@ -4,7 +4,6 @@
 // issue #680
 
 
-//@ pretty-expanded FIXME #23616
 
 fn f() -> Vec<isize> { Vec::new() }
 
diff --git a/tests/ui/inference/newlambdas-ret-infer.rs b/tests/ui/inference/newlambdas-ret-infer.rs
index 893b62e967ddb..980a2fdd905f6 100644
--- a/tests/ui/inference/newlambdas-ret-infer.rs
+++ b/tests/ui/inference/newlambdas-ret-infer.rs
@@ -4,7 +4,6 @@
 // Test that the lambda kind is inferred correctly as a return
 // expression
 
-//@ pretty-expanded FIXME #23616
 
 fn unique() -> Box<dyn FnMut()+'static> { return Box::new(|| ()); }
 
diff --git a/tests/ui/inference/newlambdas-ret-infer2.rs b/tests/ui/inference/newlambdas-ret-infer2.rs
index cad8b02910b1a..40d45d3569c1b 100644
--- a/tests/ui/inference/newlambdas-ret-infer2.rs
+++ b/tests/ui/inference/newlambdas-ret-infer2.rs
@@ -4,7 +4,6 @@
 // Test that the lambda kind is inferred correctly as a return
 // expression
 
-//@ pretty-expanded FIXME #23616
 
 fn unique() -> Box<dyn FnMut()+'static> { Box::new(|| ()) }
 
diff --git a/tests/ui/issue-15924.rs b/tests/ui/issue-15924.rs
index 77e1ae697c579..eb2aef9cee12b 100644
--- a/tests/ui/issue-15924.rs
+++ b/tests/ui/issue-15924.rs
@@ -2,7 +2,6 @@
 
 #![allow(unused_imports)]
 #![allow(unused_must_use)]
-//@ pretty-expanded FIXME #23616
 
 use std::fmt;
 use std::marker::PhantomData;
diff --git a/tests/ui/issues/issue-10228.rs b/tests/ui/issues/issue-10228.rs
index 7934afc7b9b3f..a59ccf926f9c2 100644
--- a/tests/ui/issues/issue-10228.rs
+++ b/tests/ui/issues/issue-10228.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(dead_code)]
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 enum StdioContainer {
     CreatePipe(bool)
diff --git a/tests/ui/issues/issue-10456.rs b/tests/ui/issues/issue-10456.rs
index a43cc5d36f1e2..51c740fd72937 100644
--- a/tests/ui/issues/issue-10456.rs
+++ b/tests/ui/issues/issue-10456.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 pub struct Foo;
 
diff --git a/tests/ui/issues/issue-10638.rs b/tests/ui/issues/issue-10638.rs
index f82023f2da558..c6c6939bda539 100644
--- a/tests/ui/issues/issue-10638.rs
+++ b/tests/ui/issues/issue-10638.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     //// I am not a doc comment!
diff --git a/tests/ui/issues/issue-10683.rs b/tests/ui/issues/issue-10683.rs
index 675a8323fc42f..5657ec1864b2e 100644
--- a/tests/ui/issues/issue-10683.rs
+++ b/tests/ui/issues/issue-10683.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 static NAME: &'static str = "hello world";
 
diff --git a/tests/ui/issues/issue-10718.rs b/tests/ui/issues/issue-10718.rs
index 5d3cf2621acd1..68ac0bbe49fbc 100644
--- a/tests/ui/issues/issue-10718.rs
+++ b/tests/ui/issues/issue-10718.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn f<F:FnOnce()>(p: F) {
     p();
diff --git a/tests/ui/issues/issue-10767.rs b/tests/ui/issues/issue-10767.rs
index 7d74f1e901721..2060d15b4c787 100644
--- a/tests/ui/issues/issue-10767.rs
+++ b/tests/ui/issues/issue-10767.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     fn f() {
diff --git a/tests/ui/issues/issue-10806.rs b/tests/ui/issues/issue-10806.rs
index 731edc8335d6e..72d99ae3a795e 100644
--- a/tests/ui/issues/issue-10806.rs
+++ b/tests/ui/issues/issue-10806.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(unused_imports)]
 
-//@ pretty-expanded FIXME #23616
 
 pub fn foo() -> isize {
     3
diff --git a/tests/ui/issues/issue-10853.rs b/tests/ui/issues/issue-10853.rs
index 0b0bcb710ade1..4c22393d9c0a3 100644
--- a/tests/ui/issues/issue-10853.rs
+++ b/tests/ui/issues/issue-10853.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 #![deny(missing_docs)]
 #![doc="module"]
diff --git a/tests/ui/issues/issue-10902.rs b/tests/ui/issues/issue-10902.rs
index 72f08ec3f9489..7cdf8808aa028 100644
--- a/tests/ui/issues/issue-10902.rs
+++ b/tests/ui/issues/issue-10902.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 pub mod two_tuple {
     pub trait T { fn dummy(&self) { } }
diff --git a/tests/ui/issues/issue-11085.rs b/tests/ui/issues/issue-11085.rs
index f646ba35cbfae..d0703b0639542 100644
--- a/tests/ui/issues/issue-11085.rs
+++ b/tests/ui/issues/issue-11085.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/issues/issue-11205.rs b/tests/ui/issues/issue-11205.rs
index f21a52050ffde..8530514f0edf7 100644
--- a/tests/ui/issues/issue-11205.rs
+++ b/tests/ui/issues/issue-11205.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/issues/issue-11224.rs b/tests/ui/issues/issue-11224.rs
index 3a504604b6a9d..a7255e6299f98 100644
--- a/tests/ui/issues/issue-11224.rs
+++ b/tests/ui/issues/issue-11224.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-11224.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_11224 as unused;
 
diff --git a/tests/ui/issues/issue-11384.rs b/tests/ui/issues/issue-11384.rs
index 0d1cce71958e3..ad0affa4b0d25 100644
--- a/tests/ui/issues/issue-11384.rs
+++ b/tests/ui/issues/issue-11384.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 trait Common { fn dummy(&self) { } }
 
diff --git a/tests/ui/issues/issue-11529.rs b/tests/ui/issues/issue-11529.rs
index db7ff85d46b0f..73940c22be4ce 100644
--- a/tests/ui/issues/issue-11529.rs
+++ b/tests/ui/issues/issue-11529.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-11529.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_11529 as a;
 
diff --git a/tests/ui/issues/issue-11820.rs b/tests/ui/issues/issue-11820.rs
index 372ce2c2a1616..ada844f8ee121 100644
--- a/tests/ui/issues/issue-11820.rs
+++ b/tests/ui/issues/issue-11820.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![allow(noop_method_call)]
 
diff --git a/tests/ui/issues/issue-11869.rs b/tests/ui/issues/issue-11869.rs
index 606a0c7b9d9f4..dd752227bbec7 100644
--- a/tests/ui/issues/issue-11869.rs
+++ b/tests/ui/issues/issue-11869.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 struct A {
     a: String
diff --git a/tests/ui/issues/issue-12612.rs b/tests/ui/issues/issue-12612.rs
index 0ffe7422fb310..ec0f3926aa5d3 100644
--- a/tests/ui/issues/issue-12612.rs
+++ b/tests/ui/issues/issue-12612.rs
@@ -3,7 +3,6 @@
 //@ aux-build:issue-12612-1.rs
 //@ aux-build:issue-12612-2.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_12612_1 as foo;
 extern crate issue_12612_2 as bar;
diff --git a/tests/ui/issues/issue-12660.rs b/tests/ui/issues/issue-12660.rs
index 997c10ae5cf8f..3aa3426519afc 100644
--- a/tests/ui/issues/issue-12660.rs
+++ b/tests/ui/issues/issue-12660.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-12660-aux.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue12660aux;
 
diff --git a/tests/ui/issues/issue-12729.rs b/tests/ui/issues/issue-12729.rs
index 43e692b895ade..74014981df5de 100644
--- a/tests/ui/issues/issue-12729.rs
+++ b/tests/ui/issues/issue-12729.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 pub struct Foo;
 
diff --git a/tests/ui/issues/issue-12909.rs b/tests/ui/issues/issue-12909.rs
index 3af8c07d7a76e..f2c33806aae88 100644
--- a/tests/ui/issues/issue-12909.rs
+++ b/tests/ui/issues/issue-12909.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 use std::collections::HashMap;
 
diff --git a/tests/ui/issues/issue-13105.rs b/tests/ui/issues/issue-13105.rs
index 1ef9a6b7e33c3..0dd78372a2690 100644
--- a/tests/ui/issues/issue-13105.rs
+++ b/tests/ui/issues/issue-13105.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 trait Foo {
     #[allow(anonymous_parameters)]
diff --git a/tests/ui/issues/issue-13167.rs b/tests/ui/issues/issue-13167.rs
index 15ee02b9cd458..5f733e8594888 100644
--- a/tests/ui/issues/issue-13167.rs
+++ b/tests/ui/issues/issue-13167.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 //@ revisions: current next
 //@ ignore-compare-mode-next-solver (explicit revisions)
 //@[next] compile-flags: -Znext-solver
diff --git a/tests/ui/issues/issue-13214.rs b/tests/ui/issues/issue-13214.rs
index 7144094d8c25c..8140ec943a01f 100644
--- a/tests/ui/issues/issue-13214.rs
+++ b/tests/ui/issues/issue-13214.rs
@@ -3,7 +3,6 @@
 // defining static with struct that contains enum
 // with &'static str variant used to cause ICE
 
-//@ pretty-expanded FIXME #23616
 
 pub enum Foo {
     Bar,
diff --git a/tests/ui/issues/issue-13405.rs b/tests/ui/issues/issue-13405.rs
index b2b26ab39c57b..80b298d2f37aa 100644
--- a/tests/ui/issues/issue-13405.rs
+++ b/tests/ui/issues/issue-13405.rs
@@ -1,7 +1,6 @@
 //@ check-pass
 #![allow(dead_code)]
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 struct Foo<'a> {
     i: &'a bool,
diff --git a/tests/ui/issues/issue-13620.rs b/tests/ui/issues/issue-13620.rs
index 0225114e6c38b..4d9db3aa7ceda 100644
--- a/tests/ui/issues/issue-13620.rs
+++ b/tests/ui/issues/issue-13620.rs
@@ -2,7 +2,6 @@
 //@ aux-build:issue-13620-1.rs
 //@ aux-build:issue-13620-2.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_13620_2 as crate2;
 
diff --git a/tests/ui/issues/issue-13665.rs b/tests/ui/issues/issue-13665.rs
index 3d5cffa98552c..e1d8be16f4500 100644
--- a/tests/ui/issues/issue-13665.rs
+++ b/tests/ui/issues/issue-13665.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn foo<'r>() {
   let maybe_value_ref: Option<&'r u8> = None;
diff --git a/tests/ui/issues/issue-13703.rs b/tests/ui/issues/issue-13703.rs
index 9748ab3719ef5..b385e6b9d2efd 100644
--- a/tests/ui/issues/issue-13703.rs
+++ b/tests/ui/issues/issue-13703.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 pub struct Foo<'a, 'b: 'a> { foo: &'a &'b isize }
 pub fn foo<'a, 'b>(x: Foo<'a, 'b>, _o: Option<&   &   ()>) { let _y = x.foo; }
diff --git a/tests/ui/issues/issue-13763.rs b/tests/ui/issues/issue-13763.rs
index 3044c671169c1..67b9bdc5f038a 100644
--- a/tests/ui/issues/issue-13763.rs
+++ b/tests/ui/issues/issue-13763.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 mod u8 {
     pub const BITS: usize = 8;
diff --git a/tests/ui/issues/issue-13775.rs b/tests/ui/issues/issue-13775.rs
index 1d7a40b72d331..500ec6782a8b1 100644
--- a/tests/ui/issues/issue-13775.rs
+++ b/tests/ui/issues/issue-13775.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 trait Foo {
     #[allow(anonymous_parameters)]
diff --git a/tests/ui/issues/issue-13808.rs b/tests/ui/issues/issue-13808.rs
index 91b771c6a68c2..d2961b35f2e76 100644
--- a/tests/ui/issues/issue-13808.rs
+++ b/tests/ui/issues/issue-13808.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(dead_code)]
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 struct Foo<'a> {
     listener: Box<dyn FnMut() + 'a>,
diff --git a/tests/ui/issues/issue-14082.rs b/tests/ui/issues/issue-14082.rs
index 116002415dfa6..16556e1d26003 100644
--- a/tests/ui/issues/issue-14082.rs
+++ b/tests/ui/issues/issue-14082.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 #![allow(unused_imports, dead_code)]
 
diff --git a/tests/ui/issues/issue-14254.rs b/tests/ui/issues/issue-14254.rs
index 9175ac8f92e05..90ad375c262ab 100644
--- a/tests/ui/issues/issue-14254.rs
+++ b/tests/ui/issues/issue-14254.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 trait Foo: Sized {
     fn bar(&self);
diff --git a/tests/ui/issues/issue-14330.rs b/tests/ui/issues/issue-14330.rs
index f6461c834a5e4..11199db5901f3 100644
--- a/tests/ui/issues/issue-14330.rs
+++ b/tests/ui/issues/issue-14330.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(unused_imports)]
-//@ pretty-expanded FIXME #23616
 
 #[macro_use] extern crate std as std2;
 
diff --git a/tests/ui/issues/issue-14393.rs b/tests/ui/issues/issue-14393.rs
index b7e64d6dca6ab..69c3fc15d3141 100644
--- a/tests/ui/issues/issue-14393.rs
+++ b/tests/ui/issues/issue-14393.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     match ("", 1_usize) {
diff --git a/tests/ui/issues/issue-14399.rs b/tests/ui/issues/issue-14399.rs
index cb768f63baaae..a539e270fb011 100644
--- a/tests/ui/issues/issue-14399.rs
+++ b/tests/ui/issues/issue-14399.rs
@@ -4,7 +4,6 @@
 // value was coerced to a trait object. (v.clone() returns Box<B1>
 // which is coerced to Box<A>).
 
-//@ pretty-expanded FIXME #23616
 
 #[derive(Clone)]
 struct B1;
diff --git a/tests/ui/issues/issue-14399.stderr b/tests/ui/issues/issue-14399.stderr
index d226ece6fb0b6..5821c3cc3899a 100644
--- a/tests/ui/issues/issue-14399.stderr
+++ b/tests/ui/issues/issue-14399.stderr
@@ -1,5 +1,5 @@
 warning: method `foo` is never used
-  --> $DIR/issue-14399.rs:12:14
+  --> $DIR/issue-14399.rs:11:14
    |
 LL | trait A { fn foo(&self) {} }
    |       -      ^^^
diff --git a/tests/ui/issues/issue-14421.rs b/tests/ui/issues/issue-14421.rs
index 4acbce66b6f1d..b7038584fcea6 100644
--- a/tests/ui/issues/issue-14421.rs
+++ b/tests/ui/issues/issue-14421.rs
@@ -3,7 +3,6 @@
 
 //@ aux-build:issue-14421.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_14421 as bug_lib;
 
diff --git a/tests/ui/issues/issue-14422.rs b/tests/ui/issues/issue-14422.rs
index ed9e72390c55a..b7bb2caa7f088 100644
--- a/tests/ui/issues/issue-14422.rs
+++ b/tests/ui/issues/issue-14422.rs
@@ -3,7 +3,6 @@
 
 //@ aux-build:issue-14422.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_14422 as bug_lib;
 
diff --git a/tests/ui/issues/issue-14919.rs b/tests/ui/issues/issue-14919.rs
index 8a8324e57eabf..3a834b13d07c0 100644
--- a/tests/ui/issues/issue-14919.rs
+++ b/tests/ui/issues/issue-14919.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(unused_must_use)]
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 trait Matcher {
     fn next_match(&mut self) -> Option<(usize, usize)>;
diff --git a/tests/ui/issues/issue-14959.rs b/tests/ui/issues/issue-14959.rs
index 401bd82ded352..57af1207ff9c7 100644
--- a/tests/ui/issues/issue-14959.rs
+++ b/tests/ui/issues/issue-14959.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 #![feature(fn_traits, unboxed_closures)]
 
diff --git a/tests/ui/issues/issue-15043.rs b/tests/ui/issues/issue-15043.rs
index b00c878086dca..a9bb46b649b00 100644
--- a/tests/ui/issues/issue-15043.rs
+++ b/tests/ui/issues/issue-15043.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![allow(warnings)]
 
diff --git a/tests/ui/issues/issue-15444.rs b/tests/ui/issues/issue-15444.rs
index a9a33bd5de458..14708c7733c64 100644
--- a/tests/ui/issues/issue-15444.rs
+++ b/tests/ui/issues/issue-15444.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 trait MyTrait {
     fn foo(&self);
diff --git a/tests/ui/issues/issue-15562.rs b/tests/ui/issues/issue-15562.rs
index faa46cd5ece59..d3a8f24c51b7e 100644
--- a/tests/ui/issues/issue-15562.rs
+++ b/tests/ui/issues/issue-15562.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-15562.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_15562 as i;
 
diff --git a/tests/ui/issues/issue-15774.rs b/tests/ui/issues/issue-15774.rs
index 383003b2dd78b..8eb327a0d5e7a 100644
--- a/tests/ui/issues/issue-15774.rs
+++ b/tests/ui/issues/issue-15774.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![deny(warnings)]
 #![allow(unused_imports)]
diff --git a/tests/ui/issues/issue-16256.rs b/tests/ui/issues/issue-16256.rs
index f5873331c2d28..1024e4511d639 100644
--- a/tests/ui/issues/issue-16256.rs
+++ b/tests/ui/issues/issue-16256.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     let mut buf = Vec::new();
diff --git a/tests/ui/issues/issue-16256.stderr b/tests/ui/issues/issue-16256.stderr
index d920530b57c69..75c3ec1bd1c7f 100644
--- a/tests/ui/issues/issue-16256.stderr
+++ b/tests/ui/issues/issue-16256.stderr
@@ -1,5 +1,5 @@
 warning: unused closure that must be used
-  --> $DIR/issue-16256.rs:6:5
+  --> $DIR/issue-16256.rs:5:5
    |
 LL |     |c: u8| buf.push(c);
    |     ^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/issues/issue-16441.rs b/tests/ui/issues/issue-16441.rs
index 21608cf04c31d..58cfb3892975b 100644
--- a/tests/ui/issues/issue-16441.rs
+++ b/tests/ui/issues/issue-16441.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 struct Empty;
 
diff --git a/tests/ui/issues/issue-16452.rs b/tests/ui/issues/issue-16452.rs
index 07dbf4729e6f7..4ab74f0905976 100644
--- a/tests/ui/issues/issue-16452.rs
+++ b/tests/ui/issues/issue-16452.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     if true { return }
diff --git a/tests/ui/issues/issue-16643.rs b/tests/ui/issues/issue-16643.rs
index e00978ce66aae..6cef11ffa8761 100644
--- a/tests/ui/issues/issue-16643.rs
+++ b/tests/ui/issues/issue-16643.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-16643.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_16643 as i;
 
diff --git a/tests/ui/issues/issue-16783.rs b/tests/ui/issues/issue-16783.rs
index a69ecb353bb3c..2ecc42b579d50 100644
--- a/tests/ui/issues/issue-16783.rs
+++ b/tests/ui/issues/issue-16783.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     let x = [1, 2, 3];
diff --git a/tests/ui/issues/issue-16922-rpass.rs b/tests/ui/issues/issue-16922-rpass.rs
index 6cce4179b7cd7..f7ffcfb1d94e3 100644
--- a/tests/ui/issues/issue-16922-rpass.rs
+++ b/tests/ui/issues/issue-16922-rpass.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 use std::any::Any;
 
diff --git a/tests/ui/issues/issue-17121.rs b/tests/ui/issues/issue-17121.rs
index 0a788b317cdb9..6bb89a4aa7b43 100644
--- a/tests/ui/issues/issue-17121.rs
+++ b/tests/ui/issues/issue-17121.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 use std::fs::File;
 use std::io::{self, BufReader, Read};
diff --git a/tests/ui/issues/issue-17322.rs b/tests/ui/issues/issue-17322.rs
index 71ff38a01453d..014e6b718f149 100644
--- a/tests/ui/issues/issue-17322.rs
+++ b/tests/ui/issues/issue-17322.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 use std::io::{self, Write};
 
diff --git a/tests/ui/issues/issue-17351.rs b/tests/ui/issues/issue-17351.rs
index 15bff07f6e541..86049377198c1 100644
--- a/tests/ui/issues/issue-17351.rs
+++ b/tests/ui/issues/issue-17351.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 trait Str { fn foo(&self) {} } //~ WARN method `foo` is never used
 impl Str for str {}
diff --git a/tests/ui/issues/issue-17351.stderr b/tests/ui/issues/issue-17351.stderr
index 3242d578dabce..e4c84ab9315ab 100644
--- a/tests/ui/issues/issue-17351.stderr
+++ b/tests/ui/issues/issue-17351.stderr
@@ -1,5 +1,5 @@
 warning: method `foo` is never used
-  --> $DIR/issue-17351.rs:4:16
+  --> $DIR/issue-17351.rs:3:16
    |
 LL | trait Str { fn foo(&self) {} }
    |       ---      ^^^
diff --git a/tests/ui/issues/issue-17361.rs b/tests/ui/issues/issue-17361.rs
index 1b1eeb5a25243..6f6fc42db3835 100644
--- a/tests/ui/issues/issue-17361.rs
+++ b/tests/ui/issues/issue-17361.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 // Test that HIR ty lowering doesn't forget about mutability of `&mut str`.
 
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     fn foo<T: ?Sized>(_: &mut T) {}
diff --git a/tests/ui/issues/issue-17732.rs b/tests/ui/issues/issue-17732.rs
index 4bf7ee286e156..e093ed7f41fb0 100644
--- a/tests/ui/issues/issue-17732.rs
+++ b/tests/ui/issues/issue-17732.rs
@@ -1,7 +1,6 @@
 //@ check-pass
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
-//@ pretty-expanded FIXME #23616
 
 trait Person {
     type string;
diff --git a/tests/ui/issues/issue-17771.rs b/tests/ui/issues/issue-17771.rs
index d7c0ea3eb2a6f..2e27cfceb8c35 100644
--- a/tests/ui/issues/issue-17771.rs
+++ b/tests/ui/issues/issue-17771.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 trait Aaa { fn dummy(&self) { } }
 
diff --git a/tests/ui/issues/issue-17904.rs b/tests/ui/issues/issue-17904.rs
index 5eaa306e80ef0..fba71f70dd98e 100644
--- a/tests/ui/issues/issue-17904.rs
+++ b/tests/ui/issues/issue-17904.rs
@@ -3,7 +3,6 @@
 // Test that we can parse where clauses on various forms of tuple
 // structs.
 
-//@ pretty-expanded FIXME #23616
 
 struct Bar<T>(T) where T: Copy;
 struct Bleh<T, U>(T, U) where T: Copy, U: Sized;
diff --git a/tests/ui/issues/issue-18110.rs b/tests/ui/issues/issue-18110.rs
index 8ab9be1953124..6d563a5bae1c9 100644
--- a/tests/ui/issues/issue-18110.rs
+++ b/tests/ui/issues/issue-18110.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(unreachable_code)]
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     ({return},);
diff --git a/tests/ui/issues/issue-18188.rs b/tests/ui/issues/issue-18188.rs
index b99e6aea6bd75..b3b008229a53a 100644
--- a/tests/ui/issues/issue-18188.rs
+++ b/tests/ui/issues/issue-18188.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 pub trait Promisable: Send + Sync {}
 impl<T: Send + Sync> Promisable for T {}
diff --git a/tests/ui/issues/issue-18232.rs b/tests/ui/issues/issue-18232.rs
index 5ace22311928f..d526a67950cf6 100644
--- a/tests/ui/issues/issue-18232.rs
+++ b/tests/ui/issues/issue-18232.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 struct Cursor<'a>(::std::marker::PhantomData<&'a ()>);
 
diff --git a/tests/ui/issues/issue-18353.rs b/tests/ui/issues/issue-18353.rs
index a9c0b3bcdbd5e..378caa9f36976 100644
--- a/tests/ui/issues/issue-18353.rs
+++ b/tests/ui/issues/issue-18353.rs
@@ -3,7 +3,6 @@
 // Test that wrapping an unsized struct in an enum which gets optimised does
 // not ICE.
 
-//@ pretty-expanded FIXME #23616
 
 struct Str {
     f: [u8]
diff --git a/tests/ui/issues/issue-18501.rs b/tests/ui/issues/issue-18501.rs
index 559428d4d08dc..54e53e434c465 100644
--- a/tests/ui/issues/issue-18501.rs
+++ b/tests/ui/issues/issue-18501.rs
@@ -4,7 +4,6 @@
 // translating the def ID of the trait during AST decoding.
 
 //@ aux-build:issue-18501.rs
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_18501 as issue;
 
diff --git a/tests/ui/issues/issue-18539.rs b/tests/ui/issues/issue-18539.rs
index eaf8294aa478a..66f0dabb73a25 100644
--- a/tests/ui/issues/issue-18539.rs
+++ b/tests/ui/issues/issue-18539.rs
@@ -2,7 +2,6 @@
 // Test that coercing bare fn's that return a zero sized type to
 // a closure doesn't cause an LLVM ERROR
 
-//@ pretty-expanded FIXME #23616
 
 struct Foo;
 
diff --git a/tests/ui/issues/issue-18685.rs b/tests/ui/issues/issue-18685.rs
index cea60e6f4f254..3dab341f615c7 100644
--- a/tests/ui/issues/issue-18685.rs
+++ b/tests/ui/issues/issue-18685.rs
@@ -2,7 +2,6 @@
 // Test that the self param space is not used in a conflicting
 // manner by unboxed closures within a default method on a trait
 
-//@ pretty-expanded FIXME #23616
 
 trait Tr {
     fn foo(&self);
diff --git a/tests/ui/issues/issue-18711.rs b/tests/ui/issues/issue-18711.rs
index c62f83004ae51..1d5e3349a6d42 100644
--- a/tests/ui/issues/issue-18711.rs
+++ b/tests/ui/issues/issue-18711.rs
@@ -2,7 +2,6 @@
 // Test that we don't panic on a RefCell borrow conflict in certain
 // code paths involving unboxed closures.
 
-//@ pretty-expanded FIXME #23616
 
 //@ aux-build:issue-18711.rs
 extern crate issue_18711 as issue;
diff --git a/tests/ui/issues/issue-18906.rs b/tests/ui/issues/issue-18906.rs
index 95ad8073955e9..84b0f5a178825 100644
--- a/tests/ui/issues/issue-18906.rs
+++ b/tests/ui/issues/issue-18906.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 pub trait Borrow<Borrowed: ?Sized> {
         fn borrow(&self) -> &Borrowed;
diff --git a/tests/ui/issues/issue-19037.rs b/tests/ui/issues/issue-19037.rs
index 961ef69a3b96d..7f88a89a65702 100644
--- a/tests/ui/issues/issue-19037.rs
+++ b/tests/ui/issues/issue-19037.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 struct Str([u8]);
 
diff --git a/tests/ui/issues/issue-19127.rs b/tests/ui/issues/issue-19127.rs
index dd0526592e48f..2172c631b841d 100644
--- a/tests/ui/issues/issue-19127.rs
+++ b/tests/ui/issues/issue-19127.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 fn foo<T, F: FnOnce(T) -> T>(f: F) {}
 fn id<'a>(input: &'a u8) -> &'a u8 { input }
diff --git a/tests/ui/issues/issue-19293.rs b/tests/ui/issues/issue-19293.rs
index 7a971a59c3d84..42effe303d036 100644
--- a/tests/ui/issues/issue-19293.rs
+++ b/tests/ui/issues/issue-19293.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 //@ aux-build:issue-19293.rs
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_19293;
 use issue_19293::{Foo, MyEnum};
diff --git a/tests/ui/issues/issue-19398.rs b/tests/ui/issues/issue-19398.rs
index 751fffb174487..473e43650c2c5 100644
--- a/tests/ui/issues/issue-19398.rs
+++ b/tests/ui/issues/issue-19398.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 trait T {
     unsafe extern "Rust" fn foo(&self);
diff --git a/tests/ui/issues/issue-19479.rs b/tests/ui/issues/issue-19479.rs
index 2818be310be05..ed586b7655028 100644
--- a/tests/ui/issues/issue-19479.rs
+++ b/tests/ui/issues/issue-19479.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 trait Base {
     fn dummy(&self) { }
diff --git a/tests/ui/issues/issue-19499.rs b/tests/ui/issues/issue-19499.rs
index 0bd70865211a2..d2a6862e05c4f 100644
--- a/tests/ui/issues/issue-19499.rs
+++ b/tests/ui/issues/issue-19499.rs
@@ -7,7 +7,6 @@
 // reasonable examples) let to ambiguity errors about not being able
 // to infer sufficient type information.
 
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     let n = 0;
diff --git a/tests/ui/issues/issue-19631.rs b/tests/ui/issues/issue-19631.rs
index a20df9c9d4cd1..d13ac216e36ea 100644
--- a/tests/ui/issues/issue-19631.rs
+++ b/tests/ui/issues/issue-19631.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 trait PoolManager {
     type C;
diff --git a/tests/ui/issues/issue-19632.rs b/tests/ui/issues/issue-19632.rs
index 53e25112ecc42..a99ab5f5ebe1d 100644
--- a/tests/ui/issues/issue-19632.rs
+++ b/tests/ui/issues/issue-19632.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 trait PoolManager {
     type C;
diff --git a/tests/ui/issues/issue-19850.rs b/tests/ui/issues/issue-19850.rs
index 5e8ba2d4881f2..485b1a763900b 100644
--- a/tests/ui/issues/issue-19850.rs
+++ b/tests/ui/issues/issue-19850.rs
@@ -3,7 +3,6 @@
 // Test that `<Type as Trait>::Output` and `Self::Output` are accepted as type annotations in let
 // bindings
 
-//@ pretty-expanded FIXME #23616
 
 trait Int {
     fn one() -> Self;
diff --git a/tests/ui/issues/issue-20009.rs b/tests/ui/issues/issue-20009.rs
index ed884d1283420..4d091f3a962c6 100644
--- a/tests/ui/issues/issue-20009.rs
+++ b/tests/ui/issues/issue-20009.rs
@@ -1,7 +1,6 @@
 //@ check-pass
 // Check that associated types are `Sized`
 
-//@ pretty-expanded FIXME #23616
 
 trait Trait {
     type Output;
diff --git a/tests/ui/issues/issue-20313-rpass.rs b/tests/ui/issues/issue-20313-rpass.rs
index 66ba97b1074f0..a9cd0cbd88ed4 100644
--- a/tests/ui/issues/issue-20313-rpass.rs
+++ b/tests/ui/issues/issue-20313-rpass.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 #![feature(link_llvm_intrinsics)]
 
 extern "C" {
diff --git a/tests/ui/issues/issue-20389.rs b/tests/ui/issues/issue-20389.rs
index 7d3b49ee25f4c..e201663afc522 100644
--- a/tests/ui/issues/issue-20389.rs
+++ b/tests/ui/issues/issue-20389.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 //@ aux-build:issue-20389.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_20389;
 
diff --git a/tests/ui/issues/issue-20396.rs b/tests/ui/issues/issue-20396.rs
index 46a06bb8e3c71..4a7b57903b5ae 100644
--- a/tests/ui/issues/issue-20396.rs
+++ b/tests/ui/issues/issue-20396.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/issues/issue-20414.rs b/tests/ui/issues/issue-20414.rs
index ea086c2fbebb8..070e0f451a57b 100644
--- a/tests/ui/issues/issue-20414.rs
+++ b/tests/ui/issues/issue-20414.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 trait Trait {
         fn method(self) -> isize;
diff --git a/tests/ui/issues/issue-20575.rs b/tests/ui/issues/issue-20575.rs
index f8ff8b7d23d9b..b213b79d37cab 100644
--- a/tests/ui/issues/issue-20575.rs
+++ b/tests/ui/issues/issue-20575.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 // Test that overloaded calls work with zero arity closures
 
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     let functions: [Box<dyn Fn() -> Option<()>>; 1] = [Box::new(|| None)];
diff --git a/tests/ui/issues/issue-20644.rs b/tests/ui/issues/issue-20644.rs
index f71e1a5ba8f9a..5f7e4054f7765 100644
--- a/tests/ui/issues/issue-20644.rs
+++ b/tests/ui/issues/issue-20644.rs
@@ -6,7 +6,6 @@
 // A reduced version of the rustbook ice. The problem this encountered
 // had to do with codegen ignoring binders.
 
-//@ pretty-expanded FIXME #23616
 
 #![feature(os)]
 
diff --git a/tests/ui/issues/issue-2074.rs b/tests/ui/issues/issue-2074.rs
index ebf0de4348cac..b6e3fb1fa23aa 100644
--- a/tests/ui/issues/issue-2074.rs
+++ b/tests/ui/issues/issue-2074.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![allow(non_camel_case_types)]
 
diff --git a/tests/ui/issues/issue-21033.rs b/tests/ui/issues/issue-21033.rs
index 4ddc7a1db5800..e6b13eb3f4b01 100644
--- a/tests/ui/issues/issue-21033.rs
+++ b/tests/ui/issues/issue-21033.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(unused_mut)]
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 #![feature(box_patterns)]
 
diff --git a/tests/ui/issues/issue-21245.rs b/tests/ui/issues/issue-21245.rs
index f25ebf718b16b..b7c694763c6c2 100644
--- a/tests/ui/issues/issue-21245.rs
+++ b/tests/ui/issues/issue-21245.rs
@@ -5,7 +5,6 @@
 // insufficient type propagation caused the type of the iterator to be
 // incorrectly unified with the `*const` type to which it is coerced.
 
-//@ pretty-expanded FIXME #23616
 
 use std::ptr;
 
diff --git a/tests/ui/issues/issue-21402.rs b/tests/ui/issues/issue-21402.rs
index 28d1e1a0d7739..fa0ece3ec3b18 100644
--- a/tests/ui/issues/issue-21402.rs
+++ b/tests/ui/issues/issue-21402.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 #[derive(Hash)]
 struct Foo {
diff --git a/tests/ui/issues/issue-2170-exe.rs b/tests/ui/issues/issue-2170-exe.rs
index 9e3586afbbc97..b66843d48cad6 100644
--- a/tests/ui/issues/issue-2170-exe.rs
+++ b/tests/ui/issues/issue-2170-exe.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 //@ aux-build:issue-2170-lib.rs
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_2170_lib;
 
diff --git a/tests/ui/issues/issue-21891.rs b/tests/ui/issues/issue-21891.rs
index 1feb0daa2d175..0da6071cdac4b 100644
--- a/tests/ui/issues/issue-21891.rs
+++ b/tests/ui/issues/issue-21891.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_upper_case_globals)]
 
-//@ pretty-expanded FIXME #23616
 
 static foo: [usize; 3] = [1, 2, 3];
 
diff --git a/tests/ui/issues/issue-2190-1.rs b/tests/ui/issues/issue-2190-1.rs
index 5b2890c89fbcf..8db4a84aac860 100644
--- a/tests/ui/issues/issue-2190-1.rs
+++ b/tests/ui/issues/issue-2190-1.rs
@@ -2,7 +2,6 @@
 #![allow(unused_must_use)]
 #![allow(non_upper_case_globals)]
 
-//@ pretty-expanded FIXME #23616
 //@ ignore-emscripten no threads
 
 use std::thread::Builder;
diff --git a/tests/ui/issues/issue-21909.rs b/tests/ui/issues/issue-21909.rs
index bbf654cb2088e..ffc75f1f08cdd 100644
--- a/tests/ui/issues/issue-21909.rs
+++ b/tests/ui/issues/issue-21909.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 trait A<X> {
     fn dummy(&self, arg: X);
diff --git a/tests/ui/issues/issue-22346.rs b/tests/ui/issues/issue-22346.rs
index 42280a7ddb630..710dc0acda7e9 100644
--- a/tests/ui/issues/issue-22346.rs
+++ b/tests/ui/issues/issue-22346.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 // This used to cause an ICE because the retslot for the "return" had the wrong type
 fn testcase<'a>() -> Box<dyn Iterator<Item=usize> + 'a> {
diff --git a/tests/ui/issues/issue-22356.rs b/tests/ui/issues/issue-22356.rs
index 6b0024ee0ee6f..b7c5c2a59327e 100644
--- a/tests/ui/issues/issue-22356.rs
+++ b/tests/ui/issues/issue-22356.rs
@@ -1,7 +1,6 @@
 //@ check-pass
 #![allow(type_alias_bounds)]
 
-//@ pretty-expanded FIXME #23616
 
 use std::marker::PhantomData;
 
diff --git a/tests/ui/issues/issue-22426.rs b/tests/ui/issues/issue-22426.rs
index d5254528a1283..0857ac9dfb4d1 100644
--- a/tests/ui/issues/issue-22426.rs
+++ b/tests/ui/issues/issue-22426.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn main() {
   match 42 {
diff --git a/tests/ui/issues/issue-22577.rs b/tests/ui/issues/issue-22577.rs
index 09857c95e1ba6..0fa284cc7c0c2 100644
--- a/tests/ui/issues/issue-22577.rs
+++ b/tests/ui/issues/issue-22577.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 use std::{fs, net};
 
diff --git a/tests/ui/issues/issue-22629.rs b/tests/ui/issues/issue-22629.rs
index 0a75d3dd15203..22da414650f85 100644
--- a/tests/ui/issues/issue-22629.rs
+++ b/tests/ui/issues/issue-22629.rs
@@ -3,7 +3,6 @@
 // Test transitive analysis for associated types. Collected types
 // should be normalized and new obligations generated.
 
-//@ pretty-expanded FIXME #23616
 
 use std::borrow::{ToOwned, Cow};
 
diff --git a/tests/ui/issues/issue-22777.rs b/tests/ui/issues/issue-22777.rs
index 56b385a16919c..c95bb9cc3bb99 100644
--- a/tests/ui/issues/issue-22777.rs
+++ b/tests/ui/issues/issue-22777.rs
@@ -3,7 +3,6 @@
 // can successfully deal with a "deep" structure, which the drop-check
 // was hitting a recursion limit on at one point.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(non_camel_case_types)]
 
diff --git a/tests/ui/issues/issue-2284.rs b/tests/ui/issues/issue-2284.rs
index 281dce913ad20..358331ecd9a4c 100644
--- a/tests/ui/issues/issue-2284.rs
+++ b/tests/ui/issues/issue-2284.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 trait Send {
     fn f(&self);
diff --git a/tests/ui/issues/issue-2311.rs b/tests/ui/issues/issue-2311.rs
index dc2fb394f83ca..5388e634c096f 100644
--- a/tests/ui/issues/issue-2311.rs
+++ b/tests/ui/issues/issue-2311.rs
@@ -1,7 +1,6 @@
 //@ check-pass
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 trait clam<A> { fn get(self) -> A; }
 trait foo<A> {
diff --git a/tests/ui/issues/issue-2316-c.rs b/tests/ui/issues/issue-2316-c.rs
index 52e2995ec5871..f800d4723ffd2 100644
--- a/tests/ui/issues/issue-2316-c.rs
+++ b/tests/ui/issues/issue-2316-c.rs
@@ -2,7 +2,6 @@
 //@ aux-build:issue-2316-a.rs
 //@ aux-build:issue-2316-b.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_2316_b;
 use issue_2316_b::cloth;
diff --git a/tests/ui/issues/issue-2380-b.rs b/tests/ui/issues/issue-2380-b.rs
index 722b463de09f6..503698f88c620 100644
--- a/tests/ui/issues/issue-2380-b.rs
+++ b/tests/ui/issues/issue-2380-b.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-2380.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate a;
 
diff --git a/tests/ui/issues/issue-2383.rs b/tests/ui/issues/issue-2383.rs
index eecbaa2562e89..5d60018ae673b 100644
--- a/tests/ui/issues/issue-2383.rs
+++ b/tests/ui/issues/issue-2383.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 use std::collections::VecDeque;
 
diff --git a/tests/ui/issues/issue-2414-c.rs b/tests/ui/issues/issue-2414-c.rs
index 1437a4199dc22..ac75c5c51051c 100644
--- a/tests/ui/issues/issue-2414-c.rs
+++ b/tests/ui/issues/issue-2414-c.rs
@@ -2,7 +2,6 @@
 //@ aux-build:issue-2414-a.rs
 //@ aux-build:issue-2414-b.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate b;
 
diff --git a/tests/ui/issues/issue-2445-b.rs b/tests/ui/issues/issue-2445-b.rs
index 8f52c0f47a594..3a54c62a771b3 100644
--- a/tests/ui/issues/issue-2445-b.rs
+++ b/tests/ui/issues/issue-2445-b.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 struct c1<T> {
     x: T,
diff --git a/tests/ui/issues/issue-2445.rs b/tests/ui/issues/issue-2445.rs
index da82a489c1e57..e6c33a8fd0160 100644
--- a/tests/ui/issues/issue-2445.rs
+++ b/tests/ui/issues/issue-2445.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 struct c1<T> {
     x: T,
diff --git a/tests/ui/issues/issue-2463.rs b/tests/ui/issues/issue-2463.rs
index 7650da845e34d..8fff9763bd9e2 100644
--- a/tests/ui/issues/issue-2463.rs
+++ b/tests/ui/issues/issue-2463.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 struct Pair { f: isize, g: isize }
 
diff --git a/tests/ui/issues/issue-2472.rs b/tests/ui/issues/issue-2472.rs
index afebc7b16e5cb..f8f539ed1d19d 100644
--- a/tests/ui/issues/issue-2472.rs
+++ b/tests/ui/issues/issue-2472.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-2472-b.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_2472_b;
 
diff --git a/tests/ui/issues/issue-2487-a.rs b/tests/ui/issues/issue-2487-a.rs
index 6cdb9f2afe25a..d38616929faeb 100644
--- a/tests/ui/issues/issue-2487-a.rs
+++ b/tests/ui/issues/issue-2487-a.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 struct socket {
     sock: isize,
diff --git a/tests/ui/issues/issue-2502.rs b/tests/ui/issues/issue-2502.rs
index d857099e7b9c4..dfc0995104ea6 100644
--- a/tests/ui/issues/issue-2502.rs
+++ b/tests/ui/issues/issue-2502.rs
@@ -3,7 +3,6 @@
 #![allow(non_camel_case_types)]
 
 
-//@ pretty-expanded FIXME #23616
 
 struct font<'a> {
     fontbuf: &'a Vec<u8> ,
diff --git a/tests/ui/issues/issue-2526-a.rs b/tests/ui/issues/issue-2526-a.rs
index 62e687f7f3faa..379146d02b3de 100644
--- a/tests/ui/issues/issue-2526-a.rs
+++ b/tests/ui/issues/issue-2526-a.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-2526.rs
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(unused_imports)]
 
diff --git a/tests/ui/issues/issue-2550.rs b/tests/ui/issues/issue-2550.rs
index 4fc5ba1f7b284..450db9be627e0 100644
--- a/tests/ui/issues/issue-2550.rs
+++ b/tests/ui/issues/issue-2550.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_snake_case)]
 
-//@ pretty-expanded FIXME #23616
 
 struct C {
     x: usize,
diff --git a/tests/ui/issues/issue-2642.rs b/tests/ui/issues/issue-2642.rs
index d7d97b847999e..ad5721495090f 100644
--- a/tests/ui/issues/issue-2642.rs
+++ b/tests/ui/issues/issue-2642.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 fn f() {
    let _x: usize = loop { loop { break; } };
diff --git a/tests/ui/issues/issue-2708.rs b/tests/ui/issues/issue-2708.rs
index 68ac4bc343c3f..09d19f87aa647 100644
--- a/tests/ui/issues/issue-2708.rs
+++ b/tests/ui/issues/issue-2708.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_snake_case)]
 
-//@ pretty-expanded FIXME #23616
 
 
 
diff --git a/tests/ui/issues/issue-3012-2.rs b/tests/ui/issues/issue-3012-2.rs
index 913f92fa8e204..fd090d5e7b50e 100644
--- a/tests/ui/issues/issue-3012-2.rs
+++ b/tests/ui/issues/issue-3012-2.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-3012-1.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate socketlib;
 
diff --git a/tests/ui/issues/issue-3026.rs b/tests/ui/issues/issue-3026.rs
index 9d1c0f5a34122..05dc46c3cc096 100644
--- a/tests/ui/issues/issue-3026.rs
+++ b/tests/ui/issues/issue-3026.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 use std::collections::HashMap;
 
diff --git a/tests/ui/issues/issue-3037.rs b/tests/ui/issues/issue-3037.rs
index 166f4b91cbc39..933b450ac8ea7 100644
--- a/tests/ui/issues/issue-3037.rs
+++ b/tests/ui/issues/issue-3037.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 #![allow(non_camel_case_types)]
 
 enum what { }
diff --git a/tests/ui/issues/issue-3052.rs b/tests/ui/issues/issue-3052.rs
index 4aa785e797f34..ab3519fe7147b 100644
--- a/tests/ui/issues/issue-3052.rs
+++ b/tests/ui/issues/issue-3052.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 type Connection = Box<dyn FnMut(Vec<u8>) + 'static>;
 
diff --git a/tests/ui/issues/issue-3136-b.rs b/tests/ui/issues/issue-3136-b.rs
index 2995c96ebb911..bd6ea732643f1 100644
--- a/tests/ui/issues/issue-3136-b.rs
+++ b/tests/ui/issues/issue-3136-b.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-3136-a.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_3136_a;
 
diff --git a/tests/ui/issues/issue-3149.rs b/tests/ui/issues/issue-3149.rs
index b0abd5996b1e9..76744213d51da 100644
--- a/tests/ui/issues/issue-3149.rs
+++ b/tests/ui/issues/issue-3149.rs
@@ -1,7 +1,6 @@
 //@ check-pass
 #![allow(dead_code)]
 #![allow(non_snake_case)]
-//@ pretty-expanded FIXME #23616
 
 fn Matrix4<T>(m11: T, m12: T, m13: T, m14: T,
               m21: T, m22: T, m23: T, m24: T,
diff --git a/tests/ui/issues/issue-3220.rs b/tests/ui/issues/issue-3220.rs
index 62a979b47c7f8..2f5ca82b2fac3 100644
--- a/tests/ui/issues/issue-3220.rs
+++ b/tests/ui/issues/issue-3220.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
-//@ pretty-expanded FIXME #23616
 
 struct thing { x: isize, }
 
diff --git a/tests/ui/issues/issue-3429.rs b/tests/ui/issues/issue-3429.rs
index 38ea7df1aa030..39d657573db76 100644
--- a/tests/ui/issues/issue-3429.rs
+++ b/tests/ui/issues/issue-3429.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
   let x = 1_usize;
diff --git a/tests/ui/issues/issue-3500.rs b/tests/ui/issues/issue-3500.rs
index 038707ef1ecc7..0860d0f592600 100644
--- a/tests/ui/issues/issue-3500.rs
+++ b/tests/ui/issues/issue-3500.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     let x = &Some(1);
diff --git a/tests/ui/issues/issue-3656.rs b/tests/ui/issues/issue-3656.rs
index 975695e497f5b..15ad3232555bb 100644
--- a/tests/ui/issues/issue-3656.rs
+++ b/tests/ui/issues/issue-3656.rs
@@ -5,7 +5,6 @@
 // Incorrect struct size computation in the FFI, because of not taking
 // the alignment of elements into account.
 
-//@ pretty-expanded FIXME #23616
 
 use std::ffi::{c_uint, c_void};
 
diff --git a/tests/ui/issues/issue-3874.rs b/tests/ui/issues/issue-3874.rs
index 737f2c69e1edc..251e8e1da6d34 100644
--- a/tests/ui/issues/issue-3874.rs
+++ b/tests/ui/issues/issue-3874.rs
@@ -1,6 +1,5 @@
 //@ build-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 enum PureCounter { PureCounterVariant(usize) }
 
diff --git a/tests/ui/issues/issue-3888-2.rs b/tests/ui/issues/issue-3888-2.rs
index c06d20961c2a5..39b7126f06926 100644
--- a/tests/ui/issues/issue-3888-2.rs
+++ b/tests/ui/issues/issue-3888-2.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 fn vec_peek<'r, T>(v: &'r [T]) -> &'r [T] {
     &v[1..5]
diff --git a/tests/ui/issues/issue-3979-2.rs b/tests/ui/issues/issue-3979-2.rs
index 620090bc3ecd4..98b6e85225db5 100644
--- a/tests/ui/issues/issue-3979-2.rs
+++ b/tests/ui/issues/issue-3979-2.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 trait A {
     fn a_method(&self);
diff --git a/tests/ui/issues/issue-3991.rs b/tests/ui/issues/issue-3991.rs
index 97bddb9250a06..e69c693ed49ea 100644
--- a/tests/ui/issues/issue-3991.rs
+++ b/tests/ui/issues/issue-3991.rs
@@ -1,7 +1,6 @@
 //@ check-pass
 #![allow(dead_code)]
 
-//@ pretty-expanded FIXME #23616
 
 struct HasNested {
     nest: Vec<Vec<isize> > ,
diff --git a/tests/ui/issues/issue-4208.rs b/tests/ui/issues/issue-4208.rs
index 1691bec980b26..84938bea022d1 100644
--- a/tests/ui/issues/issue-4208.rs
+++ b/tests/ui/issues/issue-4208.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 //@ aux-build:issue-4208-cc.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate numeric;
 use numeric::{sin, Angle};
diff --git a/tests/ui/issues/issue-4228.rs b/tests/ui/issues/issue-4228.rs
index 8ae8a84dac972..362d5925c7085 100644
--- a/tests/ui/issues/issue-4228.rs
+++ b/tests/ui/issues/issue-4228.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 struct Foo;
 
diff --git a/tests/ui/issues/issue-4333.rs b/tests/ui/issues/issue-4333.rs
index 9b45e1665beac..dccaa6f68bd03 100644
--- a/tests/ui/issues/issue-4333.rs
+++ b/tests/ui/issues/issue-4333.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(unused_must_use)]
-//@ pretty-expanded FIXME #23616
 
 use std::io;
 
diff --git a/tests/ui/issues/issue-4387.rs b/tests/ui/issues/issue-4387.rs
index 1299c4fcc3a8d..10f607aacbd2d 100644
--- a/tests/ui/issues/issue-4387.rs
+++ b/tests/ui/issues/issue-4387.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     let _foo = [0; 2*4];
diff --git a/tests/ui/issues/issue-4464.rs b/tests/ui/issues/issue-4464.rs
index a2d6ed718c298..7b3df9af223e5 100644
--- a/tests/ui/issues/issue-4464.rs
+++ b/tests/ui/issues/issue-4464.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 fn broken(v: &[u8], i: usize, j: usize) -> &[u8] { &v[i..j] }
 
diff --git a/tests/ui/issues/issue-4542.rs b/tests/ui/issues/issue-4542.rs
index bd63246fa33a3..15fd31d92d297 100644
--- a/tests/ui/issues/issue-4542.rs
+++ b/tests/ui/issues/issue-4542.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 use std::env;
 
diff --git a/tests/ui/issues/issue-4545.rs b/tests/ui/issues/issue-4545.rs
index 6a2f04e4511a0..dfb89136cbd22 100644
--- a/tests/ui/issues/issue-4545.rs
+++ b/tests/ui/issues/issue-4545.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-4545.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_4545 as somelib;
 pub fn main() { somelib::mk::<isize>(); }
diff --git a/tests/ui/issues/issue-4735.rs b/tests/ui/issues/issue-4735.rs
index 1223e15b2d9e8..1ca145bae420d 100644
--- a/tests/ui/issues/issue-4735.rs
+++ b/tests/ui/issues/issue-4735.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 use std::mem::transmute;
 
diff --git a/tests/ui/issues/issue-4759.rs b/tests/ui/issues/issue-4759.rs
index 49fe5f9275948..4b49442b4010f 100644
--- a/tests/ui/issues/issue-4759.rs
+++ b/tests/ui/issues/issue-4759.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 #![allow(non_shorthand_field_patterns)]
 
 struct T { a: Box<isize> }
diff --git a/tests/ui/issues/issue-4830.rs b/tests/ui/issues/issue-4830.rs
index 364def61da846..d48c13fd10b1d 100644
--- a/tests/ui/issues/issue-4830.rs
+++ b/tests/ui/issues/issue-4830.rs
@@ -1,7 +1,6 @@
 //@ check-pass
 #![allow(dead_code)]
 
-//@ pretty-expanded FIXME #23616
 
 pub struct Scheduler {
     /// The event loop used to drive the scheduler and perform I/O
diff --git a/tests/ui/issues/issue-4875.rs b/tests/ui/issues/issue-4875.rs
index 3b09331873cce..5068399ff0db7 100644
--- a/tests/ui/issues/issue-4875.rs
+++ b/tests/ui/issues/issue-4875.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 // regression test for issue 4875
 
-//@ pretty-expanded FIXME #23616
 
 pub struct Foo<T> {
     data: T,
diff --git a/tests/ui/issues/issue-5192.rs b/tests/ui/issues/issue-5192.rs
index 8911e7a733b14..be5d70f09b3c0 100644
--- a/tests/ui/issues/issue-5192.rs
+++ b/tests/ui/issues/issue-5192.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 pub trait EventLoop {
     fn dummy(&self) { }
diff --git a/tests/ui/issues/issue-5315.rs b/tests/ui/issues/issue-5315.rs
index 64a48b9e84234..29a6f8f2934a1 100644
--- a/tests/ui/issues/issue-5315.rs
+++ b/tests/ui/issues/issue-5315.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 struct A(#[allow(dead_code)] bool);
 
diff --git a/tests/ui/issues/issue-5518.rs b/tests/ui/issues/issue-5518.rs
index 4e1049f02fbc3..333185c482fe4 100644
--- a/tests/ui/issues/issue-5518.rs
+++ b/tests/ui/issues/issue-5518.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-5518.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_5518 as other;
 
diff --git a/tests/ui/issues/issue-5550.rs b/tests/ui/issues/issue-5550.rs
index e967590c65057..41de8ee5d32c9 100644
--- a/tests/ui/issues/issue-5550.rs
+++ b/tests/ui/issues/issue-5550.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(unused_assignments)]
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     let s: String = "foobar".to_string();
diff --git a/tests/ui/issues/issue-5554.rs b/tests/ui/issues/issue-5554.rs
index 532d1b4092e70..7d219a0df7093 100644
--- a/tests/ui/issues/issue-5554.rs
+++ b/tests/ui/issues/issue-5554.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 
 pub struct X<T> {
diff --git a/tests/ui/issues/issue-5572.rs b/tests/ui/issues/issue-5572.rs
index 8a4c867f58514..f27744ef0ac7a 100644
--- a/tests/ui/issues/issue-5572.rs
+++ b/tests/ui/issues/issue-5572.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 fn foo<T: ::std::cmp::PartialEq>(_t: T) { }
 
diff --git a/tests/ui/issues/issue-5718.rs b/tests/ui/issues/issue-5718.rs
index c30061298d179..234fb2e222278 100644
--- a/tests/ui/issues/issue-5718.rs
+++ b/tests/ui/issues/issue-5718.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 struct Element;
 
diff --git a/tests/ui/issues/issue-5741.rs b/tests/ui/issues/issue-5741.rs
index dad16dd39e235..af4702ec22ca9 100644
--- a/tests/ui/issues/issue-5741.rs
+++ b/tests/ui/issues/issue-5741.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 #![allow(while_true)]
 #![allow(unreachable_code)]
 
diff --git a/tests/ui/issues/issue-5754.rs b/tests/ui/issues/issue-5754.rs
index 2b61da02c3045..0aa0988295948 100644
--- a/tests/ui/issues/issue-5754.rs
+++ b/tests/ui/issues/issue-5754.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(improper_ctypes)]
 
-//@ pretty-expanded FIXME #23616
 
 struct TwoDoubles {
     r: f64,
diff --git a/tests/ui/issues/issue-5884.rs b/tests/ui/issues/issue-5884.rs
index 17cb4133632ab..559b897395d02 100644
--- a/tests/ui/issues/issue-5884.rs
+++ b/tests/ui/issues/issue-5884.rs
@@ -1,6 +1,5 @@
 //@ build-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 pub struct Foo {
     a: isize,
diff --git a/tests/ui/issues/issue-5900.rs b/tests/ui/issues/issue-5900.rs
index 986a8233ef2aa..14b7b8f815a01 100644
--- a/tests/ui/issues/issue-5900.rs
+++ b/tests/ui/issues/issue-5900.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 pub mod foo {
     use super::Bar;
diff --git a/tests/ui/issues/issue-5950.rs b/tests/ui/issues/issue-5950.rs
index a0822459ad148..6015560fcf8a9 100644
--- a/tests/ui/issues/issue-5950.rs
+++ b/tests/ui/issues/issue-5950.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 
-//@ pretty-expanded FIXME #23616
 
 pub use local as local_alias;
 
diff --git a/tests/ui/issues/issue-5988.rs b/tests/ui/issues/issue-5988.rs
index 801a5edca08f3..b7527d9bea803 100644
--- a/tests/ui/issues/issue-5988.rs
+++ b/tests/ui/issues/issue-5988.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 trait B {
     fn f(&self);
diff --git a/tests/ui/issues/issue-6117.rs b/tests/ui/issues/issue-6117.rs
index 4fa99d955c935..3ccf67b031991 100644
--- a/tests/ui/issues/issue-6117.rs
+++ b/tests/ui/issues/issue-6117.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 enum Either<T, U> { Left(T), Right(U) }
 
diff --git a/tests/ui/issues/issue-6318.rs b/tests/ui/issues/issue-6318.rs
index 3b17754ffdc36..d3f08285a93b3 100644
--- a/tests/ui/issues/issue-6318.rs
+++ b/tests/ui/issues/issue-6318.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub enum Thing {
     A(Box<dyn Foo+'static>)
diff --git a/tests/ui/issues/issue-6557.rs b/tests/ui/issues/issue-6557.rs
index 89ebb0610dd37..64a025a294f68 100644
--- a/tests/ui/issues/issue-6557.rs
+++ b/tests/ui/issues/issue-6557.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 #![feature(box_patterns)]
 
diff --git a/tests/ui/issues/issue-6898.rs b/tests/ui/issues/issue-6898.rs
index cc0fe35fc8839..c810acaf61baa 100644
--- a/tests/ui/issues/issue-6898.rs
+++ b/tests/ui/issues/issue-6898.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 use std::mem;
 
diff --git a/tests/ui/issues/issue-6919.rs b/tests/ui/issues/issue-6919.rs
index 3aa66882c1920..7fb8a2f33bc9c 100644
--- a/tests/ui/issues/issue-6919.rs
+++ b/tests/ui/issues/issue-6919.rs
@@ -2,7 +2,6 @@
 #![allow(unused_attributes)]
 //@ aux-build:iss.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue6919_3;
 
diff --git a/tests/ui/issues/issue-7178.rs b/tests/ui/issues/issue-7178.rs
index 153ce2cf05711..408ce0b03eb82 100644
--- a/tests/ui/issues/issue-7178.rs
+++ b/tests/ui/issues/issue-7178.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-7178.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_7178 as cross_crate_self;
 
diff --git a/tests/ui/issues/issue-7268.rs b/tests/ui/issues/issue-7268.rs
index 99b780bcf5c49..a3bc1bc344626 100644
--- a/tests/ui/issues/issue-7268.rs
+++ b/tests/ui/issues/issue-7268.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 fn foo<T: 'static>(_: T) {}
 
diff --git a/tests/ui/issues/issue-7344.rs b/tests/ui/issues/issue-7344.rs
index 9503037723e5b..406b24634f55e 100644
--- a/tests/ui/issues/issue-7344.rs
+++ b/tests/ui/issues/issue-7344.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(unused_must_use)]
-//@ pretty-expanded FIXME #23616
 
 #![allow(unreachable_code)]
 
diff --git a/tests/ui/issues/issue-7519-match-unit-in-arg.rs b/tests/ui/issues/issue-7519-match-unit-in-arg.rs
index 2b5f1b7f16959..a7cea577b2248 100644
--- a/tests/ui/issues/issue-7519-match-unit-in-arg.rs
+++ b/tests/ui/issues/issue-7519-match-unit-in-arg.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 /*
 #7519 ICE pattern matching unit in function argument
diff --git a/tests/ui/issues/issue-7660.rs b/tests/ui/issues/issue-7660.rs
index 4b0f7d84b75e5..104cdad8f7bb7 100644
--- a/tests/ui/issues/issue-7660.rs
+++ b/tests/ui/issues/issue-7660.rs
@@ -3,7 +3,6 @@
 // Regression test for issue 7660
 // rvalue lifetime too short when equivalent `match` works
 
-//@ pretty-expanded FIXME #23616
 
 use std::collections::HashMap;
 
diff --git a/tests/ui/issues/issue-7673-cast-generically-implemented-trait.rs b/tests/ui/issues/issue-7673-cast-generically-implemented-trait.rs
index 742152b6c8162..edba3284e3175 100644
--- a/tests/ui/issues/issue-7673-cast-generically-implemented-trait.rs
+++ b/tests/ui/issues/issue-7673-cast-generically-implemented-trait.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 /*
 
diff --git a/tests/ui/issues/issue-7899.rs b/tests/ui/issues/issue-7899.rs
index a2aee240da7a3..4b69f3e3d89aa 100644
--- a/tests/ui/issues/issue-7899.rs
+++ b/tests/ui/issues/issue-7899.rs
@@ -2,7 +2,6 @@
 #![allow(unused_variables)]
 //@ aux-build:issue-7899.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_7899 as testcrate;
 
diff --git a/tests/ui/issues/issue-8044.rs b/tests/ui/issues/issue-8044.rs
index b965e0bbb1077..3c10bbca6342b 100644
--- a/tests/ui/issues/issue-8044.rs
+++ b/tests/ui/issues/issue-8044.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-8044.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_8044 as minimal;
 use minimal::{BTree, leaf};
diff --git a/tests/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs b/tests/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs
index 88d56185f6bda..6a03404cdca71 100644
--- a/tests/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs
+++ b/tests/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 /*
 
diff --git a/tests/ui/issues/issue-8248.rs b/tests/ui/issues/issue-8248.rs
index c34575df368c9..95f626658cc67 100644
--- a/tests/ui/issues/issue-8248.rs
+++ b/tests/ui/issues/issue-8248.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 trait A {
     fn dummy(&self) { } //~ WARN method `dummy` is never used
diff --git a/tests/ui/issues/issue-8248.stderr b/tests/ui/issues/issue-8248.stderr
index a0098bcb771ae..8570bfaefadbe 100644
--- a/tests/ui/issues/issue-8248.stderr
+++ b/tests/ui/issues/issue-8248.stderr
@@ -1,5 +1,5 @@
 warning: method `dummy` is never used
-  --> $DIR/issue-8248.rs:5:8
+  --> $DIR/issue-8248.rs:4:8
    |
 LL | trait A {
    |       - method in this trait
diff --git a/tests/ui/issues/issue-8249.rs b/tests/ui/issues/issue-8249.rs
index 67a42619316cc..2364fc14d31ac 100644
--- a/tests/ui/issues/issue-8249.rs
+++ b/tests/ui/issues/issue-8249.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 trait A {
     fn dummy(&self) { }
diff --git a/tests/ui/issues/issue-8259.rs b/tests/ui/issues/issue-8259.rs
index f790e1a2155df..e843f7f9c5083 100644
--- a/tests/ui/issues/issue-8259.rs
+++ b/tests/ui/issues/issue-8259.rs
@@ -4,7 +4,6 @@
 
 //@ aux-build:issue-8259.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_8259 as other;
 static a: other::Foo<'static> = other::Foo::A;
diff --git a/tests/ui/issues/issue-8398.rs b/tests/ui/issues/issue-8398.rs
index 6f91b1dbb28ae..7d100b855fd1a 100644
--- a/tests/ui/issues/issue-8398.rs
+++ b/tests/ui/issues/issue-8398.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 pub trait Writer {
     fn write(&mut self, b: &[u8]) -> Result<(), ()>;
diff --git a/tests/ui/issues/issue-8401.rs b/tests/ui/issues/issue-8401.rs
index b72616bb28f24..1df63516fb0be 100644
--- a/tests/ui/issues/issue-8401.rs
+++ b/tests/ui/issues/issue-8401.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-8401.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_8401;
 
diff --git a/tests/ui/issues/issue-8506.rs b/tests/ui/issues/issue-8506.rs
index 48abd7efc7b91..30a789a3e27bf 100644
--- a/tests/ui/issues/issue-8506.rs
+++ b/tests/ui/issues/issue-8506.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 #![allow(non_upper_case_globals)]
 
 #![allow(dead_code)]
diff --git a/tests/ui/issues/issue-8578.rs b/tests/ui/issues/issue-8578.rs
index e081d7a541521..9baa2f70a02db 100644
--- a/tests/ui/issues/issue-8578.rs
+++ b/tests/ui/issues/issue-8578.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 #![allow(non_upper_case_globals)]
-//@ pretty-expanded FIXME #23616
 
 pub struct UninterpretedOption_NamePart {
     name_part: Option<String>,
diff --git a/tests/ui/issues/issue-8783.rs b/tests/ui/issues/issue-8783.rs
index a7c96b69b1893..d0ff79f8ac800 100644
--- a/tests/ui/issues/issue-8783.rs
+++ b/tests/ui/issues/issue-8783.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 struct X { pub x: usize }
 impl Default for X {
diff --git a/tests/ui/issues/issue-9110.rs b/tests/ui/issues/issue-9110.rs
index 9aeda7d5b1b90..47533dc43b594 100644
--- a/tests/ui/issues/issue-9110.rs
+++ b/tests/ui/issues/issue-9110.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 #![allow(non_snake_case)]
 
 macro_rules! silly_macro {
diff --git a/tests/ui/issues/issue-9123.rs b/tests/ui/issues/issue-9123.rs
index e554a8c8ff29f..bbf6c13341c27 100644
--- a/tests/ui/issues/issue-9123.rs
+++ b/tests/ui/issues/issue-9123.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-9123.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_9123;
 
diff --git a/tests/ui/issues/issue-9155.rs b/tests/ui/issues/issue-9155.rs
index e177c5978005c..dfd9dea20090a 100644
--- a/tests/ui/issues/issue-9155.rs
+++ b/tests/ui/issues/issue-9155.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-9155.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_9155;
 
diff --git a/tests/ui/issues/issue-9249.rs b/tests/ui/issues/issue-9249.rs
index 893d01637de30..b98ba050521aa 100644
--- a/tests/ui/issues/issue-9249.rs
+++ b/tests/ui/issues/issue-9249.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 static DATA:&'static [&'static str] = &["my string"];
 fn main() { }
diff --git a/tests/ui/issues/issue-9382.rs b/tests/ui/issues/issue-9382.rs
index 4b37e5b381f53..27f9ab577437f 100644
--- a/tests/ui/issues/issue-9382.rs
+++ b/tests/ui/issues/issue-9382.rs
@@ -1,6 +1,3 @@
-//@ pretty-expanded FIXME #23616
-
-
 //@ run-pass
 #![allow(dead_code)]
 
diff --git a/tests/ui/issues/issue-9719.rs b/tests/ui/issues/issue-9719.rs
index e48c020328a8a..904768c934144 100644
--- a/tests/ui/issues/issue-9719.rs
+++ b/tests/ui/issues/issue-9719.rs
@@ -1,6 +1,5 @@
 //@ build-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 mod a {
     pub enum Enum<T> {
diff --git a/tests/ui/issues/issue-9906.rs b/tests/ui/issues/issue-9906.rs
index b425df4975f1c..50417d3e45613 100644
--- a/tests/ui/issues/issue-9906.rs
+++ b/tests/ui/issues/issue-9906.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-9906.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_9906 as testmod;
 
diff --git a/tests/ui/issues/issue-9942.rs b/tests/ui/issues/issue-9942.rs
index 76c9090330669..6332d9b3e080a 100644
--- a/tests/ui/issues/issue-9942.rs
+++ b/tests/ui/issues/issue-9942.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     const S: usize = 23 as usize; [0; S]; ()
diff --git a/tests/ui/issues/issue-9951.rs b/tests/ui/issues/issue-9951.rs
index 42a65c701f76c..2cd7cd4f4302b 100644
--- a/tests/ui/issues/issue-9951.rs
+++ b/tests/ui/issues/issue-9951.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![allow(unused_variables)]
 
diff --git a/tests/ui/issues/issue-9951.stderr b/tests/ui/issues/issue-9951.stderr
index 475f2817914d3..62ed9f3e0cc07 100644
--- a/tests/ui/issues/issue-9951.stderr
+++ b/tests/ui/issues/issue-9951.stderr
@@ -1,5 +1,5 @@
 warning: method `noop` is never used
-  --> $DIR/issue-9951.rs:7:6
+  --> $DIR/issue-9951.rs:6:6
    |
 LL | trait Bar {
    |       --- method in this trait
diff --git a/tests/ui/issues/issue-9968.rs b/tests/ui/issues/issue-9968.rs
index 5ceea056634a1..89e60ba5ac7fe 100644
--- a/tests/ui/issues/issue-9968.rs
+++ b/tests/ui/issues/issue-9968.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-9968.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_9968 as lib;
 
diff --git a/tests/ui/item-name-overload.rs b/tests/ui/item-name-overload.rs
index 54aa470e59ea1..dd2925aa53fe4 100644
--- a/tests/ui/item-name-overload.rs
+++ b/tests/ui/item-name-overload.rs
@@ -4,7 +4,6 @@
 
 
 
-//@ pretty-expanded FIXME #23616
 
 mod foo {
     pub fn baz() { }
diff --git a/tests/ui/iterators/into-iterator-type-inference-shift.rs b/tests/ui/iterators/into-iterator-type-inference-shift.rs
index b550dc27f5c60..6b07a6bcb0a7a 100644
--- a/tests/ui/iterators/into-iterator-type-inference-shift.rs
+++ b/tests/ui/iterators/into-iterator-type-inference-shift.rs
@@ -8,7 +8,6 @@
 // propagation yet, and so we just saw a type variable, yielding an
 // error.
 
-//@ pretty-expanded FIXME #23616
 
 trait IntoIterator {
     type Iter: Iterator;
diff --git a/tests/ui/kinds-in-metadata.rs b/tests/ui/kinds-in-metadata.rs
index d557f949c763c..58dffba861d57 100644
--- a/tests/ui/kinds-in-metadata.rs
+++ b/tests/ui/kinds-in-metadata.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:kinds_in_metadata.rs
 
-//@ pretty-expanded FIXME #23616
 
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
diff --git a/tests/ui/linkage-attr/issue-12133-1.rs b/tests/ui/linkage-attr/issue-12133-1.rs
index dc3f7f33da145..f545db67e9244 100644
--- a/tests/ui/linkage-attr/issue-12133-1.rs
+++ b/tests/ui/linkage-attr/issue-12133-1.rs
@@ -2,7 +2,6 @@
 //@ aux-build:issue-12133-rlib.rs
 //@ aux-build:issue-12133-dylib.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_12133_rlib as a;
 extern crate issue_12133_dylib as b;
diff --git a/tests/ui/linkage-attr/issue-12133-2.rs b/tests/ui/linkage-attr/issue-12133-2.rs
index 55742a1b3838d..bc2dd84e0f7b9 100644
--- a/tests/ui/linkage-attr/issue-12133-2.rs
+++ b/tests/ui/linkage-attr/issue-12133-2.rs
@@ -3,7 +3,6 @@
 //@ aux-build:issue-12133-dylib.rs
 //@ no-prefer-dynamic
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_12133_rlib as a;
 extern crate issue_12133_dylib as b;
diff --git a/tests/ui/linkage-attr/issue-12133-3.rs b/tests/ui/linkage-attr/issue-12133-3.rs
index a34c075d64dae..473d5774c162f 100644
--- a/tests/ui/linkage-attr/issue-12133-3.rs
+++ b/tests/ui/linkage-attr/issue-12133-3.rs
@@ -6,7 +6,6 @@
 //@ ignore-musl
 //@ needs-dynamic-linking
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_12133_dylib2 as other;
 
diff --git a/tests/ui/lint/dead-code/leading-underscore.rs b/tests/ui/lint/dead-code/leading-underscore.rs
index 0ef123efc2405..0c5fecb27a841 100644
--- a/tests/ui/lint/dead-code/leading-underscore.rs
+++ b/tests/ui/lint/dead-code/leading-underscore.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![deny(dead_code)]
 
diff --git a/tests/ui/lint/issue-14837.rs b/tests/ui/lint/issue-14837.rs
index 73c63cde2baa8..829df15ae5157 100644
--- a/tests/ui/lint/issue-14837.rs
+++ b/tests/ui/lint/issue-14837.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 #[deny(dead_code)]
 pub enum Foo {
diff --git a/tests/ui/lint/issue-1866.rs b/tests/ui/lint/issue-1866.rs
index 386aeeb6ad015..4a571fbeb024d 100644
--- a/tests/ui/lint/issue-1866.rs
+++ b/tests/ui/lint/issue-1866.rs
@@ -3,7 +3,6 @@
 #![allow(non_camel_case_types)]
 #![warn(clashing_extern_declarations)]
 
-//@ pretty-expanded FIXME #23616
 
 mod a {
     pub type rust_task = usize;
diff --git a/tests/ui/lint/issue-1866.stderr b/tests/ui/lint/issue-1866.stderr
index d19a134966831..3ea9d2096586f 100644
--- a/tests/ui/lint/issue-1866.stderr
+++ b/tests/ui/lint/issue-1866.stderr
@@ -1,5 +1,5 @@
 warning: `rust_task_is_unwinding` redeclared with a different signature
-  --> $DIR/issue-1866.rs:23:13
+  --> $DIR/issue-1866.rs:22:13
    |
 LL |             pub fn rust_task_is_unwinding(rt: *const rust_task) -> bool;
    |             ------------------------------------------------------------ `rust_task_is_unwinding` previously declared here
diff --git a/tests/ui/lint/issue-20343.rs b/tests/ui/lint/issue-20343.rs
index 24e8062b1f37f..da353c985c9a0 100644
--- a/tests/ui/lint/issue-20343.rs
+++ b/tests/ui/lint/issue-20343.rs
@@ -2,7 +2,6 @@
 #![allow(unused_variables)]
 // Regression test for Issue #20343.
 
-//@ pretty-expanded FIXME #23616
 
 #![deny(dead_code)]
 
diff --git a/tests/ui/lint/lint-non-camel-case-with-trailing-underscores.rs b/tests/ui/lint/lint-non-camel-case-with-trailing-underscores.rs
index 30091253f4d56..178ee0e6663ed 100644
--- a/tests/ui/lint/lint-non-camel-case-with-trailing-underscores.rs
+++ b/tests/ui/lint/lint-non-camel-case-with-trailing-underscores.rs
@@ -3,7 +3,6 @@
 #![allow(dead_code)]
 // This is ok because we often use the trailing underscore to mean 'prime'
 
-//@ pretty-expanded FIXME #23616
 
 #[forbid(non_camel_case_types)]
 type Foo_ = isize;
diff --git a/tests/ui/lint/non-snake-case/lint-non-snake-case-no-lowercase-equivalent.rs b/tests/ui/lint/non-snake-case/lint-non-snake-case-no-lowercase-equivalent.rs
index a43d2974ff3ff..7622f8b0454db 100644
--- a/tests/ui/lint/non-snake-case/lint-non-snake-case-no-lowercase-equivalent.rs
+++ b/tests/ui/lint/non-snake-case/lint-non-snake-case-no-lowercase-equivalent.rs
@@ -1,7 +1,6 @@
 //@ check-pass
 
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 #![deny(non_snake_case)]
 
diff --git a/tests/ui/lint/warn-ctypes-inhibit.rs b/tests/ui/lint/warn-ctypes-inhibit.rs
index e3952dd00492a..0f401150adf64 100644
--- a/tests/ui/lint/warn-ctypes-inhibit.rs
+++ b/tests/ui/lint/warn-ctypes-inhibit.rs
@@ -3,7 +3,6 @@
 #![allow(dead_code)]
 //@ compile-flags:-D improper-ctypes
 
-//@ pretty-expanded FIXME #23616
 #![allow(improper_ctypes)]
 
 mod libc {
diff --git a/tests/ui/list.rs b/tests/ui/list.rs
index 7e5c2d8548b50..443c4c9f28f88 100644
--- a/tests/ui/list.rs
+++ b/tests/ui/list.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 
 #![allow(non_camel_case_types)]
-//@ pretty-expanded FIXME #23616
 
 enum list { #[allow(dead_code)] cons(isize, Box<list>), nil, }
 
diff --git a/tests/ui/liveness/liveness-assign-imm-local-after-ret.rs b/tests/ui/liveness/liveness-assign-imm-local-after-ret.rs
index 298181e5529d9..ebdb5658537d2 100644
--- a/tests/ui/liveness/liveness-assign-imm-local-after-ret.rs
+++ b/tests/ui/liveness/liveness-assign-imm-local-after-ret.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 
 #![allow(unreachable_code)]
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/loops/issue-1974.rs b/tests/ui/loops/issue-1974.rs
index ea67b2541de8c..9416f09c6e3dc 100644
--- a/tests/ui/loops/issue-1974.rs
+++ b/tests/ui/loops/issue-1974.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 // Issue 1974
 // Don't double free the condition allocation
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     let s = "hej".to_string();
diff --git a/tests/ui/macros/issue-8851.rs b/tests/ui/macros/issue-8851.rs
index 4a398d15997f6..0198f3f358e0e 100644
--- a/tests/ui/macros/issue-8851.rs
+++ b/tests/ui/macros/issue-8851.rs
@@ -5,7 +5,6 @@
 // doesn't cause capture. Making this macro hygienic (as I've done)
 // could very well make this test case completely pointless....
 
-//@ pretty-expanded FIXME #23616
 
 enum T {
     A(isize),
diff --git a/tests/ui/macros/log_syntax-trace_macros-macro-locations.rs b/tests/ui/macros/log_syntax-trace_macros-macro-locations.rs
index 85a65300eaf6d..adf5448ffc09d 100644
--- a/tests/ui/macros/log_syntax-trace_macros-macro-locations.rs
+++ b/tests/ui/macros/log_syntax-trace_macros-macro-locations.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![feature(trace_macros, log_syntax)]
 
diff --git a/tests/ui/macros/macro-invocation-in-count-expr-fixed-array-type.rs b/tests/ui/macros/macro-invocation-in-count-expr-fixed-array-type.rs
index 08fe2c928302e..e80c712b03dc5 100644
--- a/tests/ui/macros/macro-invocation-in-count-expr-fixed-array-type.rs
+++ b/tests/ui/macros/macro-invocation-in-count-expr-fixed-array-type.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 macro_rules! four {
     () => (4)
diff --git a/tests/ui/macros/macro-nt-list.rs b/tests/ui/macros/macro-nt-list.rs
index 7a6bc6a8d73df..b7b260c5398cb 100644
--- a/tests/ui/macros/macro-nt-list.rs
+++ b/tests/ui/macros/macro-nt-list.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 macro_rules! list {
     ( ($($id:ident),*) ) => (());
diff --git a/tests/ui/macros/macro_with_super_2.rs b/tests/ui/macros/macro_with_super_2.rs
index 5353405ca578e..5e7ec2515497d 100644
--- a/tests/ui/macros/macro_with_super_2.rs
+++ b/tests/ui/macros/macro_with_super_2.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:macro_with_super_1.rs
 
-//@ pretty-expanded FIXME #23616
 
 #[macro_use]
 extern crate macro_with_super_1;
diff --git a/tests/ui/macros/parse-complex-macro-invoc-op.rs b/tests/ui/macros/parse-complex-macro-invoc-op.rs
index bbb9b0270f260..27ead36f69d8c 100644
--- a/tests/ui/macros/parse-complex-macro-invoc-op.rs
+++ b/tests/ui/macros/parse-complex-macro-invoc-op.rs
@@ -8,7 +8,6 @@
 
 // Test parsing binary operators after macro invocations.
 
-//@ pretty-expanded FIXME #23616
 
 #![feature(macro_rules)]
 
diff --git a/tests/ui/macros/pub-item-inside-macro.rs b/tests/ui/macros/pub-item-inside-macro.rs
index b05d8539d5849..c37945a2d672a 100644
--- a/tests/ui/macros/pub-item-inside-macro.rs
+++ b/tests/ui/macros/pub-item-inside-macro.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 // Issue #14660
 
-//@ pretty-expanded FIXME #23616
 
 mod bleh {
     macro_rules! foo {
diff --git a/tests/ui/macros/pub-method-inside-macro.rs b/tests/ui/macros/pub-method-inside-macro.rs
index c4f9acc637d3c..dd4e6fda8be9b 100644
--- a/tests/ui/macros/pub-method-inside-macro.rs
+++ b/tests/ui/macros/pub-method-inside-macro.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 // Issue #17436
 
-//@ pretty-expanded FIXME #23616
 
 mod bleh {
     macro_rules! foo {
diff --git a/tests/ui/methods/method-early-bound-lifetimes-on-self.rs b/tests/ui/methods/method-early-bound-lifetimes-on-self.rs
index 8721dd85ac785..ec7abe1280d85 100644
--- a/tests/ui/methods/method-early-bound-lifetimes-on-self.rs
+++ b/tests/ui/methods/method-early-bound-lifetimes-on-self.rs
@@ -2,7 +2,6 @@
 // Check that we successfully handle methods where the `self` type has
 // an early-bound lifetime. Issue #18208.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/methods/method-normalize-bounds-issue-20604.rs b/tests/ui/methods/method-normalize-bounds-issue-20604.rs
index b3979e75b6120..ea18fe14d157a 100644
--- a/tests/ui/methods/method-normalize-bounds-issue-20604.rs
+++ b/tests/ui/methods/method-normalize-bounds-issue-20604.rs
@@ -9,7 +9,6 @@
 // winnowing stage of method resolution failed to handle an associated
 // type projection.
 
-//@ pretty-expanded FIXME #23616
 
 #![feature(associated_types)]
 
diff --git a/tests/ui/methods/method-recursive-blanket-impl.rs b/tests/ui/methods/method-recursive-blanket-impl.rs
index 09bbfffcd5533..547e57885e036 100644
--- a/tests/ui/methods/method-recursive-blanket-impl.rs
+++ b/tests/ui/methods/method-recursive-blanket-impl.rs
@@ -6,7 +6,6 @@
 // know not to stop at the blanket, we have to recursively evaluate
 // the `T:Foo` bound.
 
-//@ pretty-expanded FIXME #23616
 
 use std::marker::Sized;
 
diff --git a/tests/ui/methods/method-recursive-blanket-impl.stderr b/tests/ui/methods/method-recursive-blanket-impl.stderr
index 9797a8f6c8308..e358f80d3ff50 100644
--- a/tests/ui/methods/method-recursive-blanket-impl.stderr
+++ b/tests/ui/methods/method-recursive-blanket-impl.stderr
@@ -1,5 +1,5 @@
 warning: trait `Foo` is never used
-  --> $DIR/method-recursive-blanket-impl.rs:14:7
+  --> $DIR/method-recursive-blanket-impl.rs:13:7
    |
 LL | trait Foo<A> {
    |       ^^^
diff --git a/tests/ui/methods/method-two-traits-distinguished-via-where-clause.rs b/tests/ui/methods/method-two-traits-distinguished-via-where-clause.rs
index 373439d255957..2ef2848c21641 100644
--- a/tests/ui/methods/method-two-traits-distinguished-via-where-clause.rs
+++ b/tests/ui/methods/method-two-traits-distinguished-via-where-clause.rs
@@ -2,7 +2,6 @@
 // Test that we select between traits A and B. To do that, we must
 // consider the `Sized` bound.
 
-//@ pretty-expanded FIXME #23616
 
 trait A { //~ WARN trait `A` is never used
     fn foo(self);
diff --git a/tests/ui/methods/method-two-traits-distinguished-via-where-clause.stderr b/tests/ui/methods/method-two-traits-distinguished-via-where-clause.stderr
index 0a60c6242bb2d..fa87ce5cc49ff 100644
--- a/tests/ui/methods/method-two-traits-distinguished-via-where-clause.stderr
+++ b/tests/ui/methods/method-two-traits-distinguished-via-where-clause.stderr
@@ -1,5 +1,5 @@
 warning: trait `A` is never used
-  --> $DIR/method-two-traits-distinguished-via-where-clause.rs:7:7
+  --> $DIR/method-two-traits-distinguished-via-where-clause.rs:6:7
    |
 LL | trait A {
    |       ^
diff --git a/tests/ui/modules/issue-13872.rs b/tests/ui/modules/issue-13872.rs
index 5589d2d4f68c1..a29f378c844cb 100644
--- a/tests/ui/modules/issue-13872.rs
+++ b/tests/ui/modules/issue-13872.rs
@@ -3,7 +3,6 @@
 //@ aux-build:issue-13872-2.rs
 //@ aux-build:issue-13872-3.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_13872_3 as other;
 
diff --git a/tests/ui/modules/mod-view-items.rs b/tests/ui/modules/mod-view-items.rs
index 462071b7b126e..2d25c83f36237 100644
--- a/tests/ui/modules/mod-view-items.rs
+++ b/tests/ui/modules/mod-view-items.rs
@@ -5,7 +5,6 @@
 // pretty-print such view items. If that happens again, this should
 // begin failing.
 
-//@ pretty-expanded FIXME #23616
 
 mod m {
     pub fn f() -> Vec<isize> { Vec::new() }
diff --git a/tests/ui/moves/move-nullary-fn.rs b/tests/ui/moves/move-nullary-fn.rs
index 8c7bcf395e7ac..0480d2b10454e 100644
--- a/tests/ui/moves/move-nullary-fn.rs
+++ b/tests/ui/moves/move-nullary-fn.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 // Issue #922
-//@ pretty-expanded FIXME #23616
 
 fn f2<F>(_thing: F) where F: FnOnce() { }
 
diff --git a/tests/ui/multiline-comment.rs b/tests/ui/multiline-comment.rs
index bf86250c1f897..9817488203221 100644
--- a/tests/ui/multiline-comment.rs
+++ b/tests/ui/multiline-comment.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 /*
  * This is a multi-line oldcomment.
diff --git a/tests/ui/mutual-recursion-group.rs b/tests/ui/mutual-recursion-group.rs
index dc6d216f8d9ba..f83150af7dc85 100644
--- a/tests/ui/mutual-recursion-group.rs
+++ b/tests/ui/mutual-recursion-group.rs
@@ -3,7 +3,6 @@
 #![allow(non_camel_case_types)]
 #![allow(dead_code)]
 
-//@ pretty-expanded FIXME #23616
 
 enum colour { red, green, blue, }
 
diff --git a/tests/ui/nested-block-comment.rs b/tests/ui/nested-block-comment.rs
index 07414345c38ec..008df27e0e2a2 100644
--- a/tests/ui/nested-block-comment.rs
+++ b/tests/ui/nested-block-comment.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 /* This test checks that nested comments are supported
 
diff --git a/tests/ui/never_type/expr-empty-ret.rs b/tests/ui/never_type/expr-empty-ret.rs
index 5d315934e0049..e6af5bd3153f7 100644
--- a/tests/ui/never_type/expr-empty-ret.rs
+++ b/tests/ui/never_type/expr-empty-ret.rs
@@ -3,7 +3,6 @@
 #![allow(dead_code)]
 // Issue #521
 
-//@ pretty-expanded FIXME #23616
 
 fn f() {
     let _x = match true {
diff --git a/tests/ui/numbers-arithmetic/int.rs b/tests/ui/numbers-arithmetic/int.rs
index edc7f72944405..42f8e50d6efaf 100644
--- a/tests/ui/numbers-arithmetic/int.rs
+++ b/tests/ui/numbers-arithmetic/int.rs
@@ -2,6 +2,5 @@
 
 
 
-//@ pretty-expanded FIXME #23616
 
 pub fn main() { let _x: isize = 10; }
diff --git a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-2.rs b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-2.rs
index 406ed4704581b..2cbbdfc6479f1 100644
--- a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-2.rs
+++ b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-2.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn foo(_: *const ()) {}
 
diff --git a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs
index 97c10bc3c560b..ed59bba119606 100644
--- a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs
+++ b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     fn id_i8(n: i8) -> i8 { n }
diff --git a/tests/ui/numbers-arithmetic/uint.rs b/tests/ui/numbers-arithmetic/uint.rs
index c64361c2726c7..c2087b5a06c63 100644
--- a/tests/ui/numbers-arithmetic/uint.rs
+++ b/tests/ui/numbers-arithmetic/uint.rs
@@ -2,6 +2,5 @@
 
 
 
-//@ pretty-expanded FIXME #23616
 
 pub fn main() { let _x: usize = 10 as usize; }
diff --git a/tests/ui/object-lifetime/object-lifetime-default-default-to-static.rs b/tests/ui/object-lifetime/object-lifetime-default-default-to-static.rs
index edbd9f35d4dfa..23e5852335611 100644
--- a/tests/ui/object-lifetime/object-lifetime-default-default-to-static.rs
+++ b/tests/ui/object-lifetime/object-lifetime-default-default-to-static.rs
@@ -2,7 +2,6 @@
 // Test that `Box<Test>` is equivalent to `Box<Test+'static>`, both in
 // fields and fn arguments.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/object-lifetime/object-lifetime-default-from-ref-struct.rs b/tests/ui/object-lifetime/object-lifetime-default-from-ref-struct.rs
index 986fc83679934..040ac1f891326 100644
--- a/tests/ui/object-lifetime/object-lifetime-default-from-ref-struct.rs
+++ b/tests/ui/object-lifetime/object-lifetime-default-from-ref-struct.rs
@@ -2,7 +2,6 @@
 // Test that the lifetime of the enclosing `&` is used for the object
 // lifetime bound.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box.rs b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box.rs
index 3c88f2b9f3765..c3f3101155cf1 100644
--- a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box.rs
+++ b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box.rs
@@ -2,7 +2,6 @@
 // Test that the lifetime from the enclosing `&` is "inherited"
 // through the `Box` struct.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-mut.rs b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-mut.rs
index 412695f708670..db4f9a40235d4 100644
--- a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-mut.rs
+++ b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-mut.rs
@@ -2,7 +2,6 @@
 // Test that the lifetime of the enclosing `&` is used for the object
 // lifetime bound.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-struct.rs b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-struct.rs
index 591f843a284a2..5163ff1c2455a 100644
--- a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-struct.rs
+++ b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-struct.rs
@@ -2,7 +2,6 @@
 // Test that the lifetime from the enclosing `&` is "inherited"
 // through the `MyBox` struct.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/object-lifetime/object-lifetime-default-from-rptr.rs b/tests/ui/object-lifetime/object-lifetime-default-from-rptr.rs
index bc47b8d46a11e..556bde784152d 100644
--- a/tests/ui/object-lifetime/object-lifetime-default-from-rptr.rs
+++ b/tests/ui/object-lifetime/object-lifetime-default-from-rptr.rs
@@ -2,7 +2,6 @@
 // Test that the lifetime of the enclosing `&` is used for the object
 // lifetime bound.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/object-lifetime/object-lifetime-default-inferred.rs b/tests/ui/object-lifetime/object-lifetime-default-inferred.rs
index 53b9c4886450e..5abe09e272920 100644
--- a/tests/ui/object-lifetime/object-lifetime-default-inferred.rs
+++ b/tests/ui/object-lifetime/object-lifetime-default-inferred.rs
@@ -2,7 +2,6 @@
 // Test that even with prior inferred parameters, object lifetimes of objects after are still
 // valid.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 #![feature(generic_arg_infer)]
diff --git a/tests/ui/output-slot-variants.rs b/tests/ui/output-slot-variants.rs
index c545b2504cb8f..97757e74fc4ea 100644
--- a/tests/ui/output-slot-variants.rs
+++ b/tests/ui/output-slot-variants.rs
@@ -3,7 +3,6 @@
 #![allow(dead_code)]
 #![allow(unused_assignments)]
 #![allow(unknown_lints)]
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_assignment)]
 #![allow(unused_variables)]
diff --git a/tests/ui/overloaded/fixup-deref-mut.rs b/tests/ui/overloaded/fixup-deref-mut.rs
index 2879554bb94be..f8d3e678f0c0b 100644
--- a/tests/ui/overloaded/fixup-deref-mut.rs
+++ b/tests/ui/overloaded/fixup-deref-mut.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 use std::ops::{Deref, DerefMut};
 
diff --git a/tests/ui/overloaded/issue-14958.rs b/tests/ui/overloaded/issue-14958.rs
index 3df4732d9ada9..a4e5c8e3562e4 100644
--- a/tests/ui/overloaded/issue-14958.rs
+++ b/tests/ui/overloaded/issue-14958.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![feature(fn_traits, unboxed_closures)]
 
diff --git a/tests/ui/overloaded/issue-14958.stderr b/tests/ui/overloaded/issue-14958.stderr
index cc97730239c30..e4f527319e7af 100644
--- a/tests/ui/overloaded/issue-14958.stderr
+++ b/tests/ui/overloaded/issue-14958.stderr
@@ -1,5 +1,5 @@
 warning: method `dummy` is never used
-  --> $DIR/issue-14958.rs:6:16
+  --> $DIR/issue-14958.rs:5:16
    |
 LL | trait Foo { fn dummy(&self) { }}
    |       ---      ^^^^^
diff --git a/tests/ui/overloaded/overloaded-calls-param-vtables.rs b/tests/ui/overloaded/overloaded-calls-param-vtables.rs
index 7b89b45eb9b95..b82e2ab05bedf 100644
--- a/tests/ui/overloaded/overloaded-calls-param-vtables.rs
+++ b/tests/ui/overloaded/overloaded-calls-param-vtables.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 // Tests that nested vtables work with overloaded calls.
 
-//@ pretty-expanded FIXME #23616
 
 #![feature(unboxed_closures, fn_traits)]
 
diff --git a/tests/ui/panic-handler/weak-lang-item-2.rs b/tests/ui/panic-handler/weak-lang-item-2.rs
index 2acaff3ab7127..5291f3c440335 100644
--- a/tests/ui/panic-handler/weak-lang-item-2.rs
+++ b/tests/ui/panic-handler/weak-lang-item-2.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:weak-lang-items.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate weak_lang_items as other;
 
diff --git a/tests/ui/parser/issues/issue-21475.rs b/tests/ui/parser/issues/issue-21475.rs
index 27248179ef4a0..43dc7c53a7085 100644
--- a/tests/ui/parser/issues/issue-21475.rs
+++ b/tests/ui/parser/issues/issue-21475.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(unused_imports, overlapping_range_endpoints)]
-//@ pretty-expanded FIXME #23616
 
 use m::{START, END};
 
diff --git a/tests/ui/parser/issues/issue-7222.rs b/tests/ui/parser/issues/issue-7222.rs
index 6f6b34f4f4867..d601731dc7734 100644
--- a/tests/ui/parser/issues/issue-7222.rs
+++ b/tests/ui/parser/issues/issue-7222.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     const FOO: f64 = 10.0;
diff --git a/tests/ui/parser/parse-assoc-type-lt.rs b/tests/ui/parser/parse-assoc-type-lt.rs
index f1823ce96b932..48e1423023ecc 100644
--- a/tests/ui/parser/parse-assoc-type-lt.rs
+++ b/tests/ui/parser/parse-assoc-type-lt.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 trait Foo {
     type T;
diff --git a/tests/ui/path.rs b/tests/ui/path.rs
index cd6962ac3e0c7..bd7b99ac01ad5 100644
--- a/tests/ui/path.rs
+++ b/tests/ui/path.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 mod foo {
     pub fn bar(_offset: usize) { }
diff --git a/tests/ui/pattern/usefulness/irrefutable-unit.rs b/tests/ui/pattern/usefulness/irrefutable-unit.rs
index b4e72c0aa2ac4..9a48b1a8679b7 100644
--- a/tests/ui/pattern/usefulness/irrefutable-unit.rs
+++ b/tests/ui/pattern/usefulness/irrefutable-unit.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     let ((),()) = ((),());
diff --git a/tests/ui/pattern/usefulness/nested-exhaustive-match.rs b/tests/ui/pattern/usefulness/nested-exhaustive-match.rs
index 51b05c9a1116e..23782a49b5bbe 100644
--- a/tests/ui/pattern/usefulness/nested-exhaustive-match.rs
+++ b/tests/ui/pattern/usefulness/nested-exhaustive-match.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 struct Foo { foo: bool, bar: Option<isize>, baz: isize }
 
diff --git a/tests/ui/privacy/priv-impl-prim-ty.rs b/tests/ui/privacy/priv-impl-prim-ty.rs
index f4c4973f61baf..ea1145f3c3473 100644
--- a/tests/ui/privacy/priv-impl-prim-ty.rs
+++ b/tests/ui/privacy/priv-impl-prim-ty.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:priv-impl-prim-ty.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate priv_impl_prim_ty as bar;
 
diff --git a/tests/ui/privacy/privacy-ns.rs b/tests/ui/privacy/privacy-ns.rs
index 10d5e7222177b..ab3d79e40f918 100644
--- a/tests/ui/privacy/privacy-ns.rs
+++ b/tests/ui/privacy/privacy-ns.rs
@@ -5,7 +5,6 @@
 // Check we do the correct privacy checks when we import a name and there is an
 // item with that name in both the value and type namespaces.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 #![allow(unused_imports)]
diff --git a/tests/ui/privacy/privacy-reexport.rs b/tests/ui/privacy/privacy-reexport.rs
index df642a57372e0..74ac7cdce94fe 100644
--- a/tests/ui/privacy/privacy-reexport.rs
+++ b/tests/ui/privacy/privacy-reexport.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:privacy_reexport.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate privacy_reexport;
 
diff --git a/tests/ui/privacy/privacy1-rpass.rs b/tests/ui/privacy/privacy1-rpass.rs
index 10bc2492bc807..546492c870947 100644
--- a/tests/ui/privacy/privacy1-rpass.rs
+++ b/tests/ui/privacy/privacy1-rpass.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 pub mod test2 {
     // This used to generate an ICE (make sure that default functions are
diff --git a/tests/ui/privacy/private-method-rpass.rs b/tests/ui/privacy/private-method-rpass.rs
index 2ec29327d462f..f62dd682d2bc4 100644
--- a/tests/ui/privacy/private-method-rpass.rs
+++ b/tests/ui/privacy/private-method-rpass.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 struct cat {
     meows : usize,
diff --git a/tests/ui/privacy/pub-extern-privacy.rs b/tests/ui/privacy/pub-extern-privacy.rs
index dc5e8951bfc00..0f9131685b0e2 100644
--- a/tests/ui/privacy/pub-extern-privacy.rs
+++ b/tests/ui/privacy/pub-extern-privacy.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 
-//@ pretty-expanded FIXME #23616
 
 use std::mem::transmute;
 
diff --git a/tests/ui/privacy/pub-use-xcrate.rs b/tests/ui/privacy/pub-use-xcrate.rs
index 96c650d0c6843..76891161aed75 100644
--- a/tests/ui/privacy/pub-use-xcrate.rs
+++ b/tests/ui/privacy/pub-use-xcrate.rs
@@ -2,7 +2,6 @@
 //@ aux-build:pub_use_xcrate1.rs
 //@ aux-build:pub_use_xcrate2.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate pub_use_xcrate2;
 
diff --git a/tests/ui/privacy/pub_use_mods_xcrate_exe.rs b/tests/ui/privacy/pub_use_mods_xcrate_exe.rs
index 12b16c8cec8ec..f986bfb76e117 100644
--- a/tests/ui/privacy/pub_use_mods_xcrate_exe.rs
+++ b/tests/ui/privacy/pub_use_mods_xcrate_exe.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:pub_use_mods_xcrate.rs
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(unused_imports)]
 
diff --git a/tests/ui/ptr-coercion-rpass.rs b/tests/ui/ptr-coercion-rpass.rs
index 5d9b907f0e4a9..8cc4120328e45 100644
--- a/tests/ui/ptr-coercion-rpass.rs
+++ b/tests/ui/ptr-coercion-rpass.rs
@@ -3,7 +3,6 @@
 #![allow(unused_variables)]
 // Test coercions between pointers which don't do anything fancy like unsizing.
 
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     // &mut -> &
diff --git a/tests/ui/reachable/issue-11225-1.rs b/tests/ui/reachable/issue-11225-1.rs
index 6af270555c3dc..c87dd0d819bd0 100644
--- a/tests/ui/reachable/issue-11225-1.rs
+++ b/tests/ui/reachable/issue-11225-1.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-11225-1.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_11225_1 as foo;
 
diff --git a/tests/ui/reachable/issue-11225-2.rs b/tests/ui/reachable/issue-11225-2.rs
index d9449564e7fd8..2f2ca47aa0417 100644
--- a/tests/ui/reachable/issue-11225-2.rs
+++ b/tests/ui/reachable/issue-11225-2.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-11225-2.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_11225_2 as foo;
 
diff --git a/tests/ui/reachable/issue-11225-3.rs b/tests/ui/reachable/issue-11225-3.rs
index 6f2d7dafdf614..0d2911bde8bde 100644
--- a/tests/ui/reachable/issue-11225-3.rs
+++ b/tests/ui/reachable/issue-11225-3.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-11225-3.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate issue_11225_3;
 
diff --git a/tests/ui/recursion/instantiable.rs b/tests/ui/recursion/instantiable.rs
index 9bbae7dfca076..3fe50e8d011e9 100644
--- a/tests/ui/recursion/instantiable.rs
+++ b/tests/ui/recursion/instantiable.rs
@@ -2,7 +2,6 @@
 
 #![allow(non_camel_case_types)]
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 use std::ptr;
 
diff --git a/tests/ui/regions/issue-11612.rs b/tests/ui/regions/issue-11612.rs
index b95229ffa4a00..af0071e10889f 100644
--- a/tests/ui/regions/issue-11612.rs
+++ b/tests/ui/regions/issue-11612.rs
@@ -4,7 +4,6 @@
 // We weren't updating the auto adjustments with all the resolved
 // type information after type check.
 
-//@ pretty-expanded FIXME #23616
 
 trait A { fn dummy(&self) { } }
 
diff --git a/tests/ui/regions/issue-21520.rs b/tests/ui/regions/issue-21520.rs
index 4f92109ab90a6..825d6f2ee5624 100644
--- a/tests/ui/regions/issue-21520.rs
+++ b/tests/ui/regions/issue-21520.rs
@@ -3,7 +3,6 @@
 // Test that the requirement (in `Bar`) that `T::Bar : 'static` does
 // not wind up propagating to `T`.
 
-//@ pretty-expanded FIXME #23616
 
 pub trait Foo {
     type Bar;
diff --git a/tests/ui/regions/issue-5243.rs b/tests/ui/regions/issue-5243.rs
index a346903d6525e..d3c77403a375f 100644
--- a/tests/ui/regions/issue-5243.rs
+++ b/tests/ui/regions/issue-5243.rs
@@ -4,7 +4,6 @@
 // enough for codegen to consider this as non-monomorphic,
 // which led to various assertions and failures in turn.
 
-//@ pretty-expanded FIXME #23616
 
 struct S<'a> {
     v: &'a isize
diff --git a/tests/ui/regions/issue-6157.rs b/tests/ui/regions/issue-6157.rs
index 03a8c14e1a625..8d3002e52c858 100644
--- a/tests/ui/regions/issue-6157.rs
+++ b/tests/ui/regions/issue-6157.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub trait OpInt { fn call(&mut self, _: isize, _: isize) -> isize; }
 
diff --git a/tests/ui/regions/owned-implies-static.rs b/tests/ui/regions/owned-implies-static.rs
index d97e2f2d239b8..ffbee5a4bb789 100644
--- a/tests/ui/regions/owned-implies-static.rs
+++ b/tests/ui/regions/owned-implies-static.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn f<T: 'static>(_x: T) {}
 
diff --git a/tests/ui/regions/regions-addr-of-interior-of-unique-box.rs b/tests/ui/regions/regions-addr-of-interior-of-unique-box.rs
index bd3d4a1acdc4e..9dd49d35d44a4 100644
--- a/tests/ui/regions/regions-addr-of-interior-of-unique-box.rs
+++ b/tests/ui/regions/regions-addr-of-interior-of-unique-box.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(dead_code)]
 
-//@ pretty-expanded FIXME #23616
 
 struct Point {
     x: isize,
diff --git a/tests/ui/regions/regions-assoc-type-region-bound.rs b/tests/ui/regions/regions-assoc-type-region-bound.rs
index 1b7fdf112515e..86c8359b61a0d 100644
--- a/tests/ui/regions/regions-assoc-type-region-bound.rs
+++ b/tests/ui/regions/regions-assoc-type-region-bound.rs
@@ -3,7 +3,6 @@
 // Test that the compiler considers the 'a bound declared in the
 // trait. Issue #20890.
 
-//@ pretty-expanded FIXME #23616
 
 trait Foo<'a> {
     type Value: 'a;
diff --git a/tests/ui/regions/regions-assoc-type-static-bound.rs b/tests/ui/regions/regions-assoc-type-static-bound.rs
index 9ffc66d284d2e..111cffcaf27e3 100644
--- a/tests/ui/regions/regions-assoc-type-static-bound.rs
+++ b/tests/ui/regions/regions-assoc-type-static-bound.rs
@@ -3,7 +3,6 @@
 // Test that the compiler considers the 'static bound declared in the
 // trait. Issue #20890.
 
-//@ pretty-expanded FIXME #23616
 
 trait Foo {
     type Value: 'static;
diff --git a/tests/ui/regions/regions-creating-enums2.rs b/tests/ui/regions/regions-creating-enums2.rs
index b81344cceecbf..de6e51b1fbd64 100644
--- a/tests/ui/regions/regions-creating-enums2.rs
+++ b/tests/ui/regions/regions-creating-enums2.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 enum ast<'a> {
     num(usize),
diff --git a/tests/ui/regions/regions-creating-enums5.rs b/tests/ui/regions/regions-creating-enums5.rs
index 55793fb620299..14221a9d75f6c 100644
--- a/tests/ui/regions/regions-creating-enums5.rs
+++ b/tests/ui/regions/regions-creating-enums5.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 enum ast<'a> {
     num(usize),
diff --git a/tests/ui/regions/regions-debruijn-of-object.rs b/tests/ui/regions/regions-debruijn-of-object.rs
index 04bedf18ef08b..a2de66aef3709 100644
--- a/tests/ui/regions/regions-debruijn-of-object.rs
+++ b/tests/ui/regions/regions-debruijn-of-object.rs
@@ -3,7 +3,6 @@
 #![allow(unused_variables)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 struct ctxt<'tcx> {
     x: &'tcx i32
diff --git a/tests/ui/regions/regions-dependent-autofn.rs b/tests/ui/regions/regions-dependent-autofn.rs
index ccbb1219ce271..c58ae5e24ee3e 100644
--- a/tests/ui/regions/regions-dependent-autofn.rs
+++ b/tests/ui/regions/regions-dependent-autofn.rs
@@ -2,7 +2,6 @@
 // Test lifetimes are linked properly when we autoslice a vector.
 // Issue #3148.
 
-//@ pretty-expanded FIXME #23616
 
 fn subslice<F>(v: F) -> F where F: FnOnce() { v }
 
diff --git a/tests/ui/regions/regions-dependent-let-ref.rs b/tests/ui/regions/regions-dependent-let-ref.rs
index f3127abafb7a9..23b46abc91d25 100644
--- a/tests/ui/regions/regions-dependent-let-ref.rs
+++ b/tests/ui/regions/regions-dependent-let-ref.rs
@@ -2,7 +2,6 @@
 // Test lifetimes are linked properly when we take reference
 // to interior.
 
-//@ pretty-expanded FIXME #23616
 
 struct Foo(isize);
 pub fn main() {
diff --git a/tests/ui/regions/regions-early-bound-lifetime-in-assoc-fn.rs b/tests/ui/regions/regions-early-bound-lifetime-in-assoc-fn.rs
index 1b6c3c933771a..c08142154edbd 100644
--- a/tests/ui/regions/regions-early-bound-lifetime-in-assoc-fn.rs
+++ b/tests/ui/regions/regions-early-bound-lifetime-in-assoc-fn.rs
@@ -6,7 +6,6 @@
 // lifetime parameters must be early bound in the type of the
 // associated item.
 
-//@ pretty-expanded FIXME #23616
 
 use std::marker;
 
diff --git a/tests/ui/regions/regions-expl-self.rs b/tests/ui/regions/regions-expl-self.rs
index 812201d7e52a6..552204867f630 100644
--- a/tests/ui/regions/regions-expl-self.rs
+++ b/tests/ui/regions/regions-expl-self.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 // Test that you can insert an explicit lifetime in explicit self.
 
-//@ pretty-expanded FIXME #23616
 
 struct Foo {
     f: usize
diff --git a/tests/ui/regions/regions-fn-subtyping-2.rs b/tests/ui/regions/regions-fn-subtyping-2.rs
index f5332ac12809f..98be8de8671b7 100644
--- a/tests/ui/regions/regions-fn-subtyping-2.rs
+++ b/tests/ui/regions/regions-fn-subtyping-2.rs
@@ -5,7 +5,6 @@
 // Here, `f` is a function that takes a pointer `x` and a function
 // `g`, where `g` requires its argument `y` to be in the same region
 // that `x` is in.
-//@ pretty-expanded FIXME #23616
 
 fn has_same_region(f: Box<dyn for<'a> FnMut(&'a isize, Box<dyn FnMut(&'a isize)>)>) {
     // `f` should be the type that `wants_same_region` wants, but
diff --git a/tests/ui/regions/regions-fn-subtyping.rs b/tests/ui/regions/regions-fn-subtyping.rs
index 7e264eb03d836..dacd2f007c107 100644
--- a/tests/ui/regions/regions-fn-subtyping.rs
+++ b/tests/ui/regions/regions-fn-subtyping.rs
@@ -3,7 +3,6 @@
 #![allow(unused_assignments)]
 // Issue #2263.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(unused_variables)]
 
diff --git a/tests/ui/regions/regions-infer-reborrow-ref-mut-recurse.rs b/tests/ui/regions/regions-infer-reborrow-ref-mut-recurse.rs
index f5d28a281541b..f4e5c3a93a653 100644
--- a/tests/ui/regions/regions-infer-reborrow-ref-mut-recurse.rs
+++ b/tests/ui/regions/regions-infer-reborrow-ref-mut-recurse.rs
@@ -3,7 +3,6 @@
 // Test an edge case in region inference: the lifetime of the borrow
 // of `*x` must be extended to at least 'a.
 
-//@ pretty-expanded FIXME #23616
 
 fn foo<'a,'b>(x: &'a &'b mut isize) -> &'a isize {
     let y = &*x; // should be inferred to have type &'a &'b mut isize...
diff --git a/tests/ui/regions/regions-infer-region-in-fn-but-not-type.rs b/tests/ui/regions/regions-infer-region-in-fn-but-not-type.rs
index 165a246935f97..402cee201bee0 100644
--- a/tests/ui/regions/regions-infer-region-in-fn-but-not-type.rs
+++ b/tests/ui/regions/regions-infer-region-in-fn-but-not-type.rs
@@ -6,7 +6,6 @@
 
 // check that the &isize here does not cause us to think that `foo`
 // contains region pointers
-//@ pretty-expanded FIXME #23616
 
 struct foo(Box<dyn FnMut(&isize)+'static>);
 
diff --git a/tests/ui/regions/regions-infer-static-from-proc.rs b/tests/ui/regions/regions-infer-static-from-proc.rs
index 9a130808ae8df..09e1c8f635b98 100644
--- a/tests/ui/regions/regions-infer-static-from-proc.rs
+++ b/tests/ui/regions/regions-infer-static-from-proc.rs
@@ -5,7 +5,6 @@
 // region variables contained within (otherwise, region inference will
 // give `x` a very short lifetime).
 
-//@ pretty-expanded FIXME #23616
 
 static i: usize = 3;
 fn foo<F:FnOnce()+'static>(_: F) {}
diff --git a/tests/ui/regions/regions-issue-21422.rs b/tests/ui/regions/regions-issue-21422.rs
index 54beed9b3ac2b..25f5d0f50139f 100644
--- a/tests/ui/regions/regions-issue-21422.rs
+++ b/tests/ui/regions/regions-issue-21422.rs
@@ -3,7 +3,6 @@
 // add inference constraints that the operands of a binary operator
 // should outlive the binary operation itself.
 
-//@ pretty-expanded FIXME #23616
 
 pub struct P<'a> {
     _ptr: *const &'a u8,
diff --git a/tests/ui/regions/regions-issue-22246.rs b/tests/ui/regions/regions-issue-22246.rs
index e3bf7b31205cb..c943f33150eab 100644
--- a/tests/ui/regions/regions-issue-22246.rs
+++ b/tests/ui/regions/regions-issue-22246.rs
@@ -3,7 +3,6 @@
 // Regression test for issue #22246 -- we should be able to deduce
 // that `&'a B::Owned` implies that `B::Owned : 'a`.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/regions/regions-lifetime-nonfree-late-bound.rs b/tests/ui/regions/regions-lifetime-nonfree-late-bound.rs
index ee29f44ecc99e..57ad6cbbaf73f 100644
--- a/tests/ui/regions/regions-lifetime-nonfree-late-bound.rs
+++ b/tests/ui/regions/regions-lifetime-nonfree-late-bound.rs
@@ -13,7 +13,6 @@
 // doing region-folding, when really all clients of the region-folding
 // case only want to see FREE lifetime variables, not bound ones.
 
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     fn explicit() {
diff --git a/tests/ui/regions/regions-link-fn-args.rs b/tests/ui/regions/regions-link-fn-args.rs
index 5fed86d504870..9172ebf9664fe 100644
--- a/tests/ui/regions/regions-link-fn-args.rs
+++ b/tests/ui/regions/regions-link-fn-args.rs
@@ -2,7 +2,6 @@
 // Test that region inference correctly links up the regions when a
 // `ref` borrow occurs inside a fn argument.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/regions/regions-mock-codegen.rs b/tests/ui/regions/regions-mock-codegen.rs
index 4cdbc680e6fc9..99c863640669e 100644
--- a/tests/ui/regions/regions-mock-codegen.rs
+++ b/tests/ui/regions/regions-mock-codegen.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
-//@ pretty-expanded FIXME #23616
 #![feature(allocator_api)]
 
 use std::alloc::{handle_alloc_error, Allocator, Global, Layout};
diff --git a/tests/ui/regions/regions-no-bound-in-argument-cleanup.rs b/tests/ui/regions/regions-no-bound-in-argument-cleanup.rs
index 2c02ce670b944..3836c661df8ef 100644
--- a/tests/ui/regions/regions-no-bound-in-argument-cleanup.rs
+++ b/tests/ui/regions/regions-no-bound-in-argument-cleanup.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 use std::marker;
 
diff --git a/tests/ui/regions/regions-nullary-variant.rs b/tests/ui/regions/regions-nullary-variant.rs
index 8fe0a97c61c8f..8624f9961f667 100644
--- a/tests/ui/regions/regions-nullary-variant.rs
+++ b/tests/ui/regions/regions-nullary-variant.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 enum roption<'a> {
     a, b(&'a usize)
diff --git a/tests/ui/regions/regions-reassign-let-bound-pointer.rs b/tests/ui/regions/regions-reassign-let-bound-pointer.rs
index d2f35973511a8..7ecfd95851271 100644
--- a/tests/ui/regions/regions-reassign-let-bound-pointer.rs
+++ b/tests/ui/regions/regions-reassign-let-bound-pointer.rs
@@ -5,7 +5,6 @@
 // started out with a longer lifetime and was reassigned to a shorter
 // one (it should infer to be the intersection).
 
-//@ pretty-expanded FIXME #23616
 
 fn foo(x: &isize) {
     let a = 1;
diff --git a/tests/ui/regions/regions-reassign-match-bound-pointer.rs b/tests/ui/regions/regions-reassign-match-bound-pointer.rs
index 5e69396aa37f6..e549804db4363 100644
--- a/tests/ui/regions/regions-reassign-match-bound-pointer.rs
+++ b/tests/ui/regions/regions-reassign-match-bound-pointer.rs
@@ -5,7 +5,6 @@
 // started out with a longer lifetime and was reassigned to a shorter
 // one (it should infer to be the intersection).
 
-//@ pretty-expanded FIXME #23616
 
 fn foo(x: &isize) {
     let a = 1;
diff --git a/tests/ui/regions/regions-scope-chain-example.rs b/tests/ui/regions/regions-scope-chain-example.rs
index 01ce04b63d065..184ce01589233 100644
--- a/tests/ui/regions/regions-scope-chain-example.rs
+++ b/tests/ui/regions/regions-scope-chain-example.rs
@@ -9,7 +9,6 @@
 // wrong path. The new algorithm avoids this problem and hence this
 // example typechecks correctly.
 
-//@ pretty-expanded FIXME #23616
 
 enum ScopeChain<'a> {
     Link(Scope<'a>),
diff --git a/tests/ui/regions/regions-variance-contravariant-use-contravariant.rs b/tests/ui/regions/regions-variance-contravariant-use-contravariant.rs
index b177f3a011042..db7cf869450b4 100644
--- a/tests/ui/regions/regions-variance-contravariant-use-contravariant.rs
+++ b/tests/ui/regions/regions-variance-contravariant-use-contravariant.rs
@@ -7,7 +7,6 @@
 // Note: see ui/variance/variance-regions-*.rs for the tests that check that the
 // variance inference works in the first place.
 
-//@ pretty-expanded FIXME #23616
 
 struct Contravariant<'a> {
     f: &'a isize
diff --git a/tests/ui/regions/regions-variance-covariant-use-covariant.rs b/tests/ui/regions/regions-variance-covariant-use-covariant.rs
index bd5959df2e1e2..4258268c3e0de 100644
--- a/tests/ui/regions/regions-variance-covariant-use-covariant.rs
+++ b/tests/ui/regions/regions-variance-covariant-use-covariant.rs
@@ -9,7 +9,6 @@
 // This is covariant with respect to 'a, meaning that
 // Covariant<'foo> <: Covariant<'static> because
 // 'foo <= 'static
-//@ pretty-expanded FIXME #23616
 
 struct Covariant<'a> {
     f: extern "Rust" fn(&'a isize)
diff --git a/tests/ui/regions/wf-bound-region-in-object-type.rs b/tests/ui/regions/wf-bound-region-in-object-type.rs
index caa265b4ea281..c77845ab3060b 100644
--- a/tests/ui/regions/wf-bound-region-in-object-type.rs
+++ b/tests/ui/regions/wf-bound-region-in-object-type.rs
@@ -5,7 +5,6 @@
 // Test that the `wf` checker properly handles bound regions in object
 // types. Compiling this code used to trigger an ICE.
 
-//@ pretty-expanded FIXME #23616
 
 pub struct Context<'tcx> {
     vec: &'tcx Vec<isize>
diff --git a/tests/ui/resolve/blind-item-mixed-crate-use-item.rs b/tests/ui/resolve/blind-item-mixed-crate-use-item.rs
index 9869881db9a48..6c1ae737cc207 100644
--- a/tests/ui/resolve/blind-item-mixed-crate-use-item.rs
+++ b/tests/ui/resolve/blind-item-mixed-crate-use-item.rs
@@ -2,7 +2,6 @@
 //@ aux-build:blind-item-mixed-crate-use-item-foo.rs
 //@ aux-build:blind-item-mixed-crate-use-item-foo2.rs
 
-//@ pretty-expanded FIXME #23616
 
 mod m {
     pub fn f<T>(_: T, _: (), _: ()) { }
diff --git a/tests/ui/resolve/blind-item-mixed-use-item.rs b/tests/ui/resolve/blind-item-mixed-use-item.rs
index 416496f3219ee..7796233c41991 100644
--- a/tests/ui/resolve/blind-item-mixed-use-item.rs
+++ b/tests/ui/resolve/blind-item-mixed-use-item.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 mod m {
     pub fn f<T>(_: T, _: ()) { }
diff --git a/tests/ui/return/return-nil.rs b/tests/ui/return/return-nil.rs
index 403eae260dc1a..c2591a77b3015 100644
--- a/tests/ui/return/return-nil.rs
+++ b/tests/ui/return/return-nil.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn f() { let x = (); return x; }
 
diff --git a/tests/ui/self/explicit-self-closures.rs b/tests/ui/self/explicit-self-closures.rs
index ea85caa22cea4..cb8b89e90ce8c 100644
--- a/tests/ui/self/explicit-self-closures.rs
+++ b/tests/ui/self/explicit-self-closures.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 // Test to make sure that explicit self params work inside closures
 
-//@ pretty-expanded FIXME #23616
 
 struct Box {
     x: usize
diff --git a/tests/ui/self/explicit_self_xcrate_exe.rs b/tests/ui/self/explicit_self_xcrate_exe.rs
index f9daf91bdfa56..3bd64d6a4abc9 100644
--- a/tests/ui/self/explicit_self_xcrate_exe.rs
+++ b/tests/ui/self/explicit_self_xcrate_exe.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:explicit_self_xcrate.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate explicit_self_xcrate;
 use explicit_self_xcrate::{Foo, Bar};
diff --git a/tests/ui/self/self-impl-2.rs b/tests/ui/self/self-impl-2.rs
index 8c09f1ef75691..7316adfde1a62 100644
--- a/tests/ui/self/self-impl-2.rs
+++ b/tests/ui/self/self-impl-2.rs
@@ -3,7 +3,6 @@
 #![allow(unused_variables)]
 // Test that we can use `Self` types in impls in the expected way.
 
-//@ pretty-expanded FIXME #23616
 
 struct Foo;
 
diff --git a/tests/ui/self/self-type-param.rs b/tests/ui/self/self-type-param.rs
index 0b123de2531a8..3b107f465ea16 100644
--- a/tests/ui/self/self-type-param.rs
+++ b/tests/ui/self/self-type-param.rs
@@ -1,6 +1,5 @@
 //@ build-pass (FIXME(62277): could be check-pass?)
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 trait MyTrait {
     fn f(&self) -> Self;
diff --git a/tests/ui/simd/array-trait.rs b/tests/ui/simd/array-trait.rs
index d2f246a2146ca..67583bf82087d 100644
--- a/tests/ui/simd/array-trait.rs
+++ b/tests/ui/simd/array-trait.rs
@@ -2,7 +2,6 @@
 
 #![allow(dead_code)]
 
-//@ pretty-expanded FIXME #23616
 
 #![feature(repr_simd, intrinsics, generic_const_exprs)]
 #![allow(non_camel_case_types, incomplete_features)]
diff --git a/tests/ui/simd/array-trait.stderr b/tests/ui/simd/array-trait.stderr
index a63dbf37959f8..2d2a11f25ade0 100644
--- a/tests/ui/simd/array-trait.stderr
+++ b/tests/ui/simd/array-trait.stderr
@@ -1,5 +1,5 @@
 error: unconstrained generic constant
-  --> $DIR/array-trait.rs:23:23
+  --> $DIR/array-trait.rs:22:23
    |
 LL | pub struct T<S: Simd>([S::Lane; S::SIZE]);
    |                       ^^^^^^^^^^^^^^^^^^
@@ -10,13 +10,13 @@ LL | pub struct T<S: Simd>([S::Lane; S::SIZE]) where [(); S::SIZE]:;
    |                                           ++++++++++++++++++++
 
 error[E0077]: SIMD vector element type should be a primitive scalar (integer/float/pointer) type
-  --> $DIR/array-trait.rs:23:1
+  --> $DIR/array-trait.rs:22:1
    |
 LL | pub struct T<S: Simd>([S::Lane; S::SIZE]);
    | ^^^^^^^^^^^^^^^^^^^^^
 
 error: unconstrained generic constant
-  --> $DIR/array-trait.rs:23:23
+  --> $DIR/array-trait.rs:22:23
    |
 LL | #[derive(Copy, Clone)]
    |                ----- in this derive macro expansion
diff --git a/tests/ui/simd/array-type.rs b/tests/ui/simd/array-type.rs
index 4063dcd703cd7..8ca53b1a453fc 100644
--- a/tests/ui/simd/array-type.rs
+++ b/tests/ui/simd/array-type.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(dead_code)]
 
-//@ pretty-expanded FIXME #23616
 
 #![feature(repr_simd, intrinsics)]
 
diff --git a/tests/ui/sized-borrowed-pointer.rs b/tests/ui/sized-borrowed-pointer.rs
index f1635531e4ece..bd213c067db5d 100644
--- a/tests/ui/sized-borrowed-pointer.rs
+++ b/tests/ui/sized-borrowed-pointer.rs
@@ -3,7 +3,6 @@
 #![allow(dead_code)]
 // Possibly-dynamic size of typaram should be cleared at pointer boundary.
 
-//@ pretty-expanded FIXME #23616
 
 fn bar<T: Sized>() { }
 fn foo<T>() { bar::<&T>() }
diff --git a/tests/ui/sized-owned-pointer.rs b/tests/ui/sized-owned-pointer.rs
index 48f870de9ae7e..b35c0f91abd2c 100644
--- a/tests/ui/sized-owned-pointer.rs
+++ b/tests/ui/sized-owned-pointer.rs
@@ -4,7 +4,6 @@
 // Possibly-dynamic size of typaram should be cleared at pointer boundary.
 
 
-//@ pretty-expanded FIXME #23616
 
 fn bar<T: Sized>() { }
 fn foo<T>() { bar::<Box<T>>() }
diff --git a/tests/ui/static/issue-1660.rs b/tests/ui/static/issue-1660.rs
index a114a9083134e..02a408d9a561f 100644
--- a/tests/ui/static/issue-1660.rs
+++ b/tests/ui/static/issue-1660.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(non_upper_case_globals)]
 
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     static _x: isize = 1<<2;
diff --git a/tests/ui/statics/check-recursion-foreign.rs b/tests/ui/statics/check-recursion-foreign.rs
index 5a0ff7b59627e..6804910f4ccf9 100644
--- a/tests/ui/statics/check-recursion-foreign.rs
+++ b/tests/ui/statics/check-recursion-foreign.rs
@@ -4,7 +4,6 @@
 
 //@ aux-build:check_static_recursion_foreign_helper.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate check_static_recursion_foreign_helper;
 
diff --git a/tests/ui/statics/issue-15261.rs b/tests/ui/statics/issue-15261.rs
index e168abce07849..ed79a201488f3 100644
--- a/tests/ui/statics/issue-15261.rs
+++ b/tests/ui/statics/issue-15261.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_upper_case_globals)]
 
-//@ pretty-expanded FIXME #23616
 
 static mut n_mut: usize = 0;
 
diff --git a/tests/ui/statics/issue-15261.stderr b/tests/ui/statics/issue-15261.stderr
index 417dbae9db18f..4067d151de3d4 100644
--- a/tests/ui/statics/issue-15261.stderr
+++ b/tests/ui/statics/issue-15261.stderr
@@ -1,5 +1,5 @@
 warning: creating a shared reference to mutable static is discouraged
-  --> $DIR/issue-15261.rs:9:37
+  --> $DIR/issue-15261.rs:8:37
    |
 LL | static n: &'static usize = unsafe { &n_mut };
    |                                     ^^^^^^ shared reference to mutable static
diff --git a/tests/ui/statics/issue-17718-static-unsafe-interior.rs b/tests/ui/statics/issue-17718-static-unsafe-interior.rs
index 82d5ec8db46ce..daff7ba873c0f 100644
--- a/tests/ui/statics/issue-17718-static-unsafe-interior.rs
+++ b/tests/ui/statics/issue-17718-static-unsafe-interior.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(unused_variables)]
 #![allow(unused_imports)]
-//@ pretty-expanded FIXME #23616
 
 use std::marker;
 use std::cell::UnsafeCell;
diff --git a/tests/ui/statics/static-fn-inline-xc.rs b/tests/ui/statics/static-fn-inline-xc.rs
index fe230f04d3d96..e75083b218830 100644
--- a/tests/ui/statics/static-fn-inline-xc.rs
+++ b/tests/ui/statics/static-fn-inline-xc.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:static_fn_inline_xc_aux.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate static_fn_inline_xc_aux as mycore;
 
diff --git a/tests/ui/statics/static-fn-trait-xc.rs b/tests/ui/statics/static-fn-trait-xc.rs
index 78810eb5645c8..73747416c604d 100644
--- a/tests/ui/statics/static-fn-trait-xc.rs
+++ b/tests/ui/statics/static-fn-trait-xc.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:static_fn_trait_xc_aux.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate static_fn_trait_xc_aux as mycore;
 
diff --git a/tests/ui/statics/static-methods-in-traits2.rs b/tests/ui/statics/static-methods-in-traits2.rs
index dbb7120d543d5..dbd5e77c1ba9f 100644
--- a/tests/ui/statics/static-methods-in-traits2.rs
+++ b/tests/ui/statics/static-methods-in-traits2.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub trait Number: NumConv {
     fn from<T:Number>(n: T) -> Self;
diff --git a/tests/ui/structs-enums/class-dtor.rs b/tests/ui/structs-enums/class-dtor.rs
index ee6220b6fa451..a08f0f0b0a47f 100644
--- a/tests/ui/structs-enums/class-dtor.rs
+++ b/tests/ui/structs-enums/class-dtor.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 struct cat {
   done : extern "C" fn(usize),
diff --git a/tests/ui/structs-enums/class-str-field.rs b/tests/ui/structs-enums/class-str-field.rs
index a33a635344ead..24f648afc90b1 100644
--- a/tests/ui/structs-enums/class-str-field.rs
+++ b/tests/ui/structs-enums/class-str-field.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 struct cat {
 
diff --git a/tests/ui/structs-enums/class-typarams.rs b/tests/ui/structs-enums/class-typarams.rs
index 01cfa47024f10..b5a3923983f36 100644
--- a/tests/ui/structs-enums/class-typarams.rs
+++ b/tests/ui/structs-enums/class-typarams.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 use std::marker::PhantomData;
 
diff --git a/tests/ui/structs-enums/classes-self-referential.rs b/tests/ui/structs-enums/classes-self-referential.rs
index 35696a9cff9e6..f819e558aa2ee 100644
--- a/tests/ui/structs-enums/classes-self-referential.rs
+++ b/tests/ui/structs-enums/classes-self-referential.rs
@@ -3,7 +3,6 @@
 #![allow(non_camel_case_types)]
 
 
-//@ pretty-expanded FIXME #23616
 
 struct kitten {
     cat: Option<cat>,
diff --git a/tests/ui/structs-enums/enum-discrim-range-overflow.rs b/tests/ui/structs-enums/enum-discrim-range-overflow.rs
index 51cabd10e3089..91be8014ebdaa 100644
--- a/tests/ui/structs-enums/enum-discrim-range-overflow.rs
+++ b/tests/ui/structs-enums/enum-discrim-range-overflow.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(overflowing_literals)]
 
-//@ pretty-expanded FIXME #23616
 
 pub enum E64 {
     H64 = 0x7FFF_FFFF_FFFF_FFFF,
diff --git a/tests/ui/structs-enums/enum-export-inheritance.rs b/tests/ui/structs-enums/enum-export-inheritance.rs
index 5bb689260c2c4..1fd697830db51 100644
--- a/tests/ui/structs-enums/enum-export-inheritance.rs
+++ b/tests/ui/structs-enums/enum-export-inheritance.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 mod a {
     pub enum Foo {
diff --git a/tests/ui/structs-enums/enum-variants.rs b/tests/ui/structs-enums/enum-variants.rs
index 1f5206b8de5dd..d9639b329419a 100644
--- a/tests/ui/structs-enums/enum-variants.rs
+++ b/tests/ui/structs-enums/enum-variants.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(dead_code)]
 #![allow(unused_assignments)]
-//@ pretty-expanded FIXME #23616
 
 #![allow(unused_variables)]
 
diff --git a/tests/ui/structs-enums/enum-vec-initializer.rs b/tests/ui/structs-enums/enum-vec-initializer.rs
index 2fa77ec6ecda5..8c610456c227f 100644
--- a/tests/ui/structs-enums/enum-vec-initializer.rs
+++ b/tests/ui/structs-enums/enum-vec-initializer.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 enum Flopsy {
     Bunny = 2
diff --git a/tests/ui/structs-enums/export-abstract-tag.rs b/tests/ui/structs-enums/export-abstract-tag.rs
index ff36fa9590330..e6d359803856d 100644
--- a/tests/ui/structs-enums/export-abstract-tag.rs
+++ b/tests/ui/structs-enums/export-abstract-tag.rs
@@ -4,7 +4,6 @@
 // We can export tags without exporting the variants to create a simple
 // sort of ADT.
 
-//@ pretty-expanded FIXME #23616
 
 mod foo {
     pub enum t { t1, }
diff --git a/tests/ui/structs-enums/export-tag-variant.rs b/tests/ui/structs-enums/export-tag-variant.rs
index bd762a0166e47..c6216d1b567b3 100644
--- a/tests/ui/structs-enums/export-tag-variant.rs
+++ b/tests/ui/structs-enums/export-tag-variant.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(non_camel_case_types)]
-//@ pretty-expanded FIXME #23616
 
 mod foo {
     pub enum t { t1, }
diff --git a/tests/ui/structs-enums/foreign-struct.rs b/tests/ui/structs-enums/foreign-struct.rs
index 4f2e413ab40cd..f339c191ae806 100644
--- a/tests/ui/structs-enums/foreign-struct.rs
+++ b/tests/ui/structs-enums/foreign-struct.rs
@@ -4,7 +4,6 @@
 
 // Passing enums by value
 
-//@ pretty-expanded FIXME #23616
 
 pub enum void {}
 
diff --git a/tests/ui/structs-enums/module-qualified-struct-destructure.rs b/tests/ui/structs-enums/module-qualified-struct-destructure.rs
index b90acb1b98c0d..9d06980fca97d 100644
--- a/tests/ui/structs-enums/module-qualified-struct-destructure.rs
+++ b/tests/ui/structs-enums/module-qualified-struct-destructure.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 mod m {
     pub struct S {
diff --git a/tests/ui/structs-enums/namespaced-enum-emulate-flat-xc.rs b/tests/ui/structs-enums/namespaced-enum-emulate-flat-xc.rs
index ea56faef09cd4..fca89728f2106 100644
--- a/tests/ui/structs-enums/namespaced-enum-emulate-flat-xc.rs
+++ b/tests/ui/structs-enums/namespaced-enum-emulate-flat-xc.rs
@@ -3,7 +3,6 @@
 
 //@ aux-build:namespaced_enum_emulate_flat.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate namespaced_enum_emulate_flat;
 
diff --git a/tests/ui/structs-enums/namespaced-enum-emulate-flat.rs b/tests/ui/structs-enums/namespaced-enum-emulate-flat.rs
index 4a6352b328a1a..774cfa1a38089 100644
--- a/tests/ui/structs-enums/namespaced-enum-emulate-flat.rs
+++ b/tests/ui/structs-enums/namespaced-enum-emulate-flat.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 pub use Foo::*;
 use nest::{Bar, D, E, F};
diff --git a/tests/ui/structs-enums/namespaced-enum-glob-import-xcrate.rs b/tests/ui/structs-enums/namespaced-enum-glob-import-xcrate.rs
index 4e58c1f717ff2..80d5231fc85ab 100644
--- a/tests/ui/structs-enums/namespaced-enum-glob-import-xcrate.rs
+++ b/tests/ui/structs-enums/namespaced-enum-glob-import-xcrate.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:namespaced_enums.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate namespaced_enums;
 
diff --git a/tests/ui/structs-enums/namespaced-enum-glob-import.rs b/tests/ui/structs-enums/namespaced-enum-glob-import.rs
index d02ee5a122daa..e8a709d5bd0c0 100644
--- a/tests/ui/structs-enums/namespaced-enum-glob-import.rs
+++ b/tests/ui/structs-enums/namespaced-enum-glob-import.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 mod m2 {
     pub enum Foo {
diff --git a/tests/ui/structs-enums/namespaced-enums-xcrate.rs b/tests/ui/structs-enums/namespaced-enums-xcrate.rs
index b5655e68a47e3..36bc973749c33 100644
--- a/tests/ui/structs-enums/namespaced-enums-xcrate.rs
+++ b/tests/ui/structs-enums/namespaced-enums-xcrate.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:namespaced_enums.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate namespaced_enums;
 
diff --git a/tests/ui/structs-enums/namespaced-enums.rs b/tests/ui/structs-enums/namespaced-enums.rs
index 1ce9319b8ec85..3e2e0b5ffa8fd 100644
--- a/tests/ui/structs-enums/namespaced-enums.rs
+++ b/tests/ui/structs-enums/namespaced-enums.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 enum Foo {
     A,
diff --git a/tests/ui/structs-enums/nested-enum-same-names.rs b/tests/ui/structs-enums/nested-enum-same-names.rs
index e24073c38e9a4..5ff730aff4415 100644
--- a/tests/ui/structs-enums/nested-enum-same-names.rs
+++ b/tests/ui/structs-enums/nested-enum-same-names.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 /*
 
diff --git a/tests/ui/structs-enums/newtype-struct-with-dtor.rs b/tests/ui/structs-enums/newtype-struct-with-dtor.rs
index 19672e41c9a30..35476c5ed2d6b 100644
--- a/tests/ui/structs-enums/newtype-struct-with-dtor.rs
+++ b/tests/ui/structs-enums/newtype-struct-with-dtor.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(unused_unsafe)]
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 pub struct Fd(u32);
 
diff --git a/tests/ui/structs-enums/newtype-struct-xc-2.rs b/tests/ui/structs-enums/newtype-struct-xc-2.rs
index e83025346d75a..a52c41dde2774 100644
--- a/tests/ui/structs-enums/newtype-struct-xc-2.rs
+++ b/tests/ui/structs-enums/newtype-struct-xc-2.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:newtype_struct_xc.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate newtype_struct_xc;
 use newtype_struct_xc::Au;
diff --git a/tests/ui/structs-enums/newtype-struct-xc.rs b/tests/ui/structs-enums/newtype-struct-xc.rs
index 6f90cfe8e4af4..138bf4878f001 100644
--- a/tests/ui/structs-enums/newtype-struct-xc.rs
+++ b/tests/ui/structs-enums/newtype-struct-xc.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:newtype_struct_xc.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate newtype_struct_xc;
 
diff --git a/tests/ui/structs-enums/simple-generic-tag.rs b/tests/ui/structs-enums/simple-generic-tag.rs
index 59521a446f4f9..b78505edd1f2b 100644
--- a/tests/ui/structs-enums/simple-generic-tag.rs
+++ b/tests/ui/structs-enums/simple-generic-tag.rs
@@ -4,7 +4,6 @@
 
 
 
-//@ pretty-expanded FIXME #23616
 
 enum clam<T> { a(T), }
 
diff --git a/tests/ui/structs-enums/struct-like-variant-construct.rs b/tests/ui/structs-enums/struct-like-variant-construct.rs
index 5a49d715b21f4..ec60fef9d3f74 100644
--- a/tests/ui/structs-enums/struct-like-variant-construct.rs
+++ b/tests/ui/structs-enums/struct-like-variant-construct.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 enum Foo {
     Bar {
diff --git a/tests/ui/structs-enums/struct-variant-field-visibility.rs b/tests/ui/structs-enums/struct-variant-field-visibility.rs
index 02d1ceb051324..a6528f9a2b17e 100644
--- a/tests/ui/structs-enums/struct-variant-field-visibility.rs
+++ b/tests/ui/structs-enums/struct-variant-field-visibility.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 mod foo {
     pub enum Foo {
diff --git a/tests/ui/structs-enums/struct_variant_xc.rs b/tests/ui/structs-enums/struct_variant_xc.rs
index 4723f2291856d..bf69a2aead93d 100644
--- a/tests/ui/structs-enums/struct_variant_xc.rs
+++ b/tests/ui/structs-enums/struct_variant_xc.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 //@ aux-build:struct_variant_xc_aux.rs
-//@ pretty-expanded FIXME #23616
 
 extern crate struct_variant_xc_aux;
 
diff --git a/tests/ui/structs-enums/tag-exports.rs b/tests/ui/structs-enums/tag-exports.rs
index a01b951e675ab..bac428e67233c 100644
--- a/tests/ui/structs-enums/tag-exports.rs
+++ b/tests/ui/structs-enums/tag-exports.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 use alder::*;
 
diff --git a/tests/ui/structs-enums/tag-in-block.rs b/tests/ui/structs-enums/tag-in-block.rs
index 944a611c71a17..27b48aae51f60 100644
--- a/tests/ui/structs-enums/tag-in-block.rs
+++ b/tests/ui/structs-enums/tag-in-block.rs
@@ -4,7 +4,6 @@
 
 
 
-//@ pretty-expanded FIXME #23616
 
 fn foo() {
     fn zed(_z: bar) { }
diff --git a/tests/ui/structs-enums/tag-variant-disr-type-mismatch.rs b/tests/ui/structs-enums/tag-variant-disr-type-mismatch.rs
index 9205ac81650ec..f4c202d91a7c1 100644
--- a/tests/ui/structs-enums/tag-variant-disr-type-mismatch.rs
+++ b/tests/ui/structs-enums/tag-variant-disr-type-mismatch.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 enum color {
     red = 1,
diff --git a/tests/ui/structs-enums/tuple-struct-trivial.rs b/tests/ui/structs-enums/tuple-struct-trivial.rs
index 329f80a462ed0..e2395036551e4 100644
--- a/tests/ui/structs-enums/tuple-struct-trivial.rs
+++ b/tests/ui/structs-enums/tuple-struct-trivial.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 struct Foo(isize, isize, isize);
 
diff --git a/tests/ui/structs-enums/variant-structs-trivial.rs b/tests/ui/structs-enums/variant-structs-trivial.rs
index 8ca86fa35ee86..a7b0575118437 100644
--- a/tests/ui/structs-enums/variant-structs-trivial.rs
+++ b/tests/ui/structs-enums/variant-structs-trivial.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 enum Foo {
     Bar { x: isize },
diff --git a/tests/ui/structs/large-records.rs b/tests/ui/structs/large-records.rs
index c78b62596678d..d02a9f488c61b 100644
--- a/tests/ui/structs/large-records.rs
+++ b/tests/ui/structs/large-records.rs
@@ -5,7 +5,6 @@
 
 
 
-//@ pretty-expanded FIXME #23616
 
 struct Large {a: isize,
              b: isize,
diff --git a/tests/ui/super.rs b/tests/ui/super.rs
index 5d2ea92e921c5..69aff4f98e004 100644
--- a/tests/ui/super.rs
+++ b/tests/ui/super.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 pub mod a {
     pub fn f() {}
diff --git a/tests/ui/svh-add-nothing.rs b/tests/ui/svh-add-nothing.rs
index 75ef82d0fa3ee..6e4b9fa7f4c9f 100644
--- a/tests/ui/svh-add-nothing.rs
+++ b/tests/ui/svh-add-nothing.rs
@@ -4,7 +4,6 @@
 //@ aux-build:svh-b.rs
 //@ aux-build:svh-a-base.rs
 
-//@ pretty-expanded FIXME #23616
 
 extern crate a;
 extern crate b;
diff --git a/tests/ui/swap-overlapping.rs b/tests/ui/swap-overlapping.rs
index f7720e0470d74..38d5a8109d1cd 100644
--- a/tests/ui/swap-overlapping.rs
+++ b/tests/ui/swap-overlapping.rs
@@ -3,7 +3,6 @@
 #![allow(dead_code)]
 // Issue #5041 - avoid overlapping memcpy when src and dest of a swap are the same
 
-//@ pretty-expanded FIXME #23616
 
 use std::ptr;
 
diff --git a/tests/ui/tail-call-arg-leak.rs b/tests/ui/tail-call-arg-leak.rs
index 003fb212fcb7a..234924307c3f6 100644
--- a/tests/ui/tail-call-arg-leak.rs
+++ b/tests/ui/tail-call-arg-leak.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 // use of tail calls causes arg slot leaks, issue #160.
-//@ pretty-expanded FIXME #23616
 
 fn inner(dummy: String, b: bool) { if b { return inner(dummy, false); } }
 
diff --git a/tests/ui/threads-sendsync/child-outlives-parent.rs b/tests/ui/threads-sendsync/child-outlives-parent.rs
index e965bac5713ce..fd6e0c4630d6f 100644
--- a/tests/ui/threads-sendsync/child-outlives-parent.rs
+++ b/tests/ui/threads-sendsync/child-outlives-parent.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 // Reported as issue #126, child leaks the string.
 
-//@ pretty-expanded FIXME #23616
 //@ needs-threads
 
 use std::thread;
diff --git a/tests/ui/threads-sendsync/send-resource.rs b/tests/ui/threads-sendsync/send-resource.rs
index c02a3717d3d75..e4c08dd598f4b 100644
--- a/tests/ui/threads-sendsync/send-resource.rs
+++ b/tests/ui/threads-sendsync/send-resource.rs
@@ -3,7 +3,6 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 //@ needs-threads
 
 use std::sync::mpsc::channel;
diff --git a/tests/ui/threads-sendsync/send-type-inference.rs b/tests/ui/threads-sendsync/send-type-inference.rs
index 7608c19b5758e..c6150026c0a26 100644
--- a/tests/ui/threads-sendsync/send-type-inference.rs
+++ b/tests/ui/threads-sendsync/send-type-inference.rs
@@ -2,7 +2,6 @@
 #![allow(unused_must_use)]
 #![allow(dead_code)]
 #![allow(unused_mut)]
-//@ pretty-expanded FIXME #23616
 
 use std::sync::mpsc::{channel, Sender};
 
diff --git a/tests/ui/threads-sendsync/sendable-class.rs b/tests/ui/threads-sendsync/sendable-class.rs
index 8e5e76d826a06..da61ea6be2cee 100644
--- a/tests/ui/threads-sendsync/sendable-class.rs
+++ b/tests/ui/threads-sendsync/sendable-class.rs
@@ -6,7 +6,6 @@
 
 // Test that a class with only sendable fields can be sent
 
-//@ pretty-expanded FIXME #23616
 
 use std::sync::mpsc::channel;
 
diff --git a/tests/ui/threads-sendsync/std-sync-right-kind-impls.rs b/tests/ui/threads-sendsync/std-sync-right-kind-impls.rs
index a443785a678c7..b2d22631c1a5e 100644
--- a/tests/ui/threads-sendsync/std-sync-right-kind-impls.rs
+++ b/tests/ui/threads-sendsync/std-sync-right-kind-impls.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 use std::sync;
 
diff --git a/tests/ui/threads-sendsync/sync-send-atomics.rs b/tests/ui/threads-sendsync/sync-send-atomics.rs
index f64506af0a3f7..fc7f3971e7600 100644
--- a/tests/ui/threads-sendsync/sync-send-atomics.rs
+++ b/tests/ui/threads-sendsync/sync-send-atomics.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 
-//@ pretty-expanded FIXME #23616
 
 use std::sync::atomic::*;
 
diff --git a/tests/ui/threads-sendsync/sync-send-iterators-in-libcore.rs b/tests/ui/threads-sendsync/sync-send-iterators-in-libcore.rs
index 512c81a85fcaf..4baf123295ec6 100644
--- a/tests/ui/threads-sendsync/sync-send-iterators-in-libcore.rs
+++ b/tests/ui/threads-sendsync/sync-send-iterators-in-libcore.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![allow(warnings)]
 
diff --git a/tests/ui/threads-sendsync/task-comm-11.rs b/tests/ui/threads-sendsync/task-comm-11.rs
index 7c349c716fa35..1585ec3b4f680 100644
--- a/tests/ui/threads-sendsync/task-comm-11.rs
+++ b/tests/ui/threads-sendsync/task-comm-11.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(unused_must_use)]
-//@ pretty-expanded FIXME #23616
 //@ needs-threads
 
 use std::sync::mpsc::{channel, Sender};
diff --git a/tests/ui/threads-sendsync/task-comm-15.rs b/tests/ui/threads-sendsync/task-comm-15.rs
index 1308446893b86..54e7b08b6a699 100644
--- a/tests/ui/threads-sendsync/task-comm-15.rs
+++ b/tests/ui/threads-sendsync/task-comm-15.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(unused_must_use)]
 //@ needs-threads
-//@ pretty-expanded FIXME #23616
 
 use std::sync::mpsc::{channel, Sender};
 use std::thread;
diff --git a/tests/ui/threads-sendsync/task-comm-17.rs b/tests/ui/threads-sendsync/task-comm-17.rs
index a545beee59913..3720826526697 100644
--- a/tests/ui/threads-sendsync/task-comm-17.rs
+++ b/tests/ui/threads-sendsync/task-comm-17.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(unused_must_use)]
 //@ needs-threads
-//@ pretty-expanded FIXME #23616
 
 // Issue #922
 
diff --git a/tests/ui/threads-sendsync/task-life-0.rs b/tests/ui/threads-sendsync/task-life-0.rs
index f08a281e76c6d..c2440bc44bc3d 100644
--- a/tests/ui/threads-sendsync/task-life-0.rs
+++ b/tests/ui/threads-sendsync/task-life-0.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(unused_must_use)]
 //@ needs-threads
-//@ pretty-expanded FIXME #23616
 
 use std::thread;
 
diff --git a/tests/ui/trailing-comma.rs b/tests/ui/trailing-comma.rs
index 95a8b366ad9d2..53b76fb60374a 100644
--- a/tests/ui/trailing-comma.rs
+++ b/tests/ui/trailing-comma.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn f<T,>(_: T,) {}
 
diff --git a/tests/ui/traits/astconv-cycle-between-and-type.rs b/tests/ui/traits/astconv-cycle-between-and-type.rs
index 1d45028657e08..cb2e172f02ec5 100644
--- a/tests/ui/traits/astconv-cycle-between-and-type.rs
+++ b/tests/ui/traits/astconv-cycle-between-and-type.rs
@@ -4,7 +4,6 @@
 // carries a predicate that references the trait (`u32 : Trait1`,
 // substituted).
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/traits/bound/basic.rs b/tests/ui/traits/bound/basic.rs
index 85157fdbf62f6..acd8056bee083 100644
--- a/tests/ui/traits/bound/basic.rs
+++ b/tests/ui/traits/bound/basic.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(unconditional_recursion)]
 
-//@ pretty-expanded FIXME #23616
 
 trait Foo {
 }
diff --git a/tests/ui/traits/bound/impl-comparison-duplicates.rs b/tests/ui/traits/bound/impl-comparison-duplicates.rs
index 68b64de3e96d5..14553ed27b7a4 100644
--- a/tests/ui/traits/bound/impl-comparison-duplicates.rs
+++ b/tests/ui/traits/bound/impl-comparison-duplicates.rs
@@ -3,7 +3,6 @@
 // trait exactly, as long as the implementation doesn't demand *more* bounds
 // than the trait.
 
-//@ pretty-expanded FIXME #23616
 
 trait A {
     fn foo<T: Eq + Ord>(&self);
diff --git a/tests/ui/traits/bound/multiple.rs b/tests/ui/traits/bound/multiple.rs
index 385fa8851c124..30f229b285aaa 100644
--- a/tests/ui/traits/bound/multiple.rs
+++ b/tests/ui/traits/bound/multiple.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn f<T:PartialEq + PartialOrd>(_: T) {
 }
diff --git a/tests/ui/traits/bound/on-structs-and-enums-rpass.rs b/tests/ui/traits/bound/on-structs-and-enums-rpass.rs
index 25e1b6b4bc35b..8dd243015057e 100644
--- a/tests/ui/traits/bound/on-structs-and-enums-rpass.rs
+++ b/tests/ui/traits/bound/on-structs-and-enums-rpass.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(dead_code)]
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 trait U {}
 trait T<X: U> { fn get(self) -> X; }
diff --git a/tests/ui/traits/bound/recursion.rs b/tests/ui/traits/bound/recursion.rs
index 1d9832ac917d9..90cdfed0c9915 100644
--- a/tests/ui/traits/bound/recursion.rs
+++ b/tests/ui/traits/bound/recursion.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 trait I { fn i(&self) -> Self; }
 
diff --git a/tests/ui/traits/bug-7295.rs b/tests/ui/traits/bug-7295.rs
index bd4e126c22004..a1cbcf1601e95 100644
--- a/tests/ui/traits/bug-7295.rs
+++ b/tests/ui/traits/bug-7295.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub trait Foo<T> {
     fn func1<U>(&self, t: U, w: T);
diff --git a/tests/ui/traits/cache-issue-18209.rs b/tests/ui/traits/cache-issue-18209.rs
index e0c309ed97d24..6a027d6b3f3dd 100644
--- a/tests/ui/traits/cache-issue-18209.rs
+++ b/tests/ui/traits/cache-issue-18209.rs
@@ -4,7 +4,6 @@
 //
 // See issue #18209.
 
-//@ pretty-expanded FIXME #23616
 
 pub trait Foo {
     fn load_from() -> Box<Self>;
diff --git a/tests/ui/traits/composition-trivial.rs b/tests/ui/traits/composition-trivial.rs
index 26f7673e61650..8a5a36f4cfde2 100644
--- a/tests/ui/traits/composition-trivial.rs
+++ b/tests/ui/traits/composition-trivial.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 trait Foo {
     fn foo(&self);
diff --git a/tests/ui/traits/cycle-generic-bound.rs b/tests/ui/traits/cycle-generic-bound.rs
index dec51ef35bc04..0fb0f74a6eac5 100644
--- a/tests/ui/traits/cycle-generic-bound.rs
+++ b/tests/ui/traits/cycle-generic-bound.rs
@@ -1,7 +1,6 @@
 //@ check-pass
 // Regression test for #15477. This test just needs to compile.
 
-//@ pretty-expanded FIXME #23616
 
 trait Chromosome<X: Chromosome<i32>> {
 }
diff --git a/tests/ui/traits/cycle-type-trait.rs b/tests/ui/traits/cycle-type-trait.rs
index f1125c9274aaf..3a6cd2eccc250 100644
--- a/tests/ui/traits/cycle-type-trait.rs
+++ b/tests/ui/traits/cycle-type-trait.rs
@@ -3,7 +3,6 @@
 // Test a case where a supertrait references a type that references
 // the original trait. This poses no problem at the moment.
 
-//@ pretty-expanded FIXME #23616
 
 trait Chromosome: Get<Struct<i32>> {
 }
diff --git a/tests/ui/traits/default-method/mut.rs b/tests/ui/traits/default-method/mut.rs
index fd8b788035f87..1130ca0b4be25 100644
--- a/tests/ui/traits/default-method/mut.rs
+++ b/tests/ui/traits/default-method/mut.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(unused_assignments)]
-//@ pretty-expanded FIXME #23616
 
 #![allow(unused_variables)]
 
diff --git a/tests/ui/traits/early-vtbl-resolution.rs b/tests/ui/traits/early-vtbl-resolution.rs
index f2dd2b8a6609a..bf3cc04cdc227 100644
--- a/tests/ui/traits/early-vtbl-resolution.rs
+++ b/tests/ui/traits/early-vtbl-resolution.rs
@@ -2,7 +2,6 @@
 
 #![allow(non_camel_case_types)]
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 trait thing<A> {
     fn foo(&self) -> Option<A>;
diff --git a/tests/ui/traits/false-ambiguity-where-clause-builtin-bound.rs b/tests/ui/traits/false-ambiguity-where-clause-builtin-bound.rs
index b41d719d0ec4f..ab9d10d14fdd0 100644
--- a/tests/ui/traits/false-ambiguity-where-clause-builtin-bound.rs
+++ b/tests/ui/traits/false-ambiguity-where-clause-builtin-bound.rs
@@ -3,7 +3,6 @@
 // between the builtin rules for Sized and the where clause. Issue
 // #20959.
 
-//@ pretty-expanded FIXME #23616
 
 fn foo<K>(x: Option<K>)
     where Option<K> : Sized
diff --git a/tests/ui/traits/impl-2.rs b/tests/ui/traits/impl-2.rs
index 6cc702800e392..c6f60a9081cc4 100644
--- a/tests/ui/traits/impl-2.rs
+++ b/tests/ui/traits/impl-2.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_snake_case)]
 
-//@ pretty-expanded FIXME #23616
 
 pub mod Foo {
     pub trait Trait {
diff --git a/tests/ui/traits/impl-implicit-trait.rs b/tests/ui/traits/impl-implicit-trait.rs
index 03c1ec8a53b2e..ff62858dcc2ff 100644
--- a/tests/ui/traits/impl-implicit-trait.rs
+++ b/tests/ui/traits/impl-implicit-trait.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 
-//@ pretty-expanded FIXME #23616
 
 enum option_<T> {
     none_,
diff --git a/tests/ui/traits/inheritance/num.rs b/tests/ui/traits/inheritance/num.rs
index 339ff04ff530d..58564147a2929 100644
--- a/tests/ui/traits/inheritance/num.rs
+++ b/tests/ui/traits/inheritance/num.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(dead_code)]
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 pub trait NumExt: PartialEq + PartialOrd {}
 
diff --git a/tests/ui/traits/inheritance/num0.rs b/tests/ui/traits/inheritance/num0.rs
index a2ebc5c62d787..a170388b49453 100644
--- a/tests/ui/traits/inheritance/num0.rs
+++ b/tests/ui/traits/inheritance/num0.rs
@@ -2,7 +2,6 @@
 #![allow(dead_code)]
 // Extending Num and using inherited static methods
 
-//@ pretty-expanded FIXME #23616
 
 pub trait NumCast: Sized {
     fn from(i: i32) -> Option<Self>;
diff --git a/tests/ui/traits/inheritance/num1.rs b/tests/ui/traits/inheritance/num1.rs
index 9fa2cde6d2222..d02cff70842a6 100644
--- a/tests/ui/traits/inheritance/num1.rs
+++ b/tests/ui/traits/inheritance/num1.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 pub trait NumCast: Sized {
     fn from(i: i32) -> Option<Self>;
diff --git a/tests/ui/traits/inheritance/num5.rs b/tests/ui/traits/inheritance/num5.rs
index b38fb441cff4e..8ac4c86c39215 100644
--- a/tests/ui/traits/inheritance/num5.rs
+++ b/tests/ui/traits/inheritance/num5.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub trait NumCast: Sized {
     fn from(i: i32) -> Option<Self>;
diff --git a/tests/ui/traits/issue-22019.rs b/tests/ui/traits/issue-22019.rs
index 120f611ccb69c..191c345e2d17f 100644
--- a/tests/ui/traits/issue-22019.rs
+++ b/tests/ui/traits/issue-22019.rs
@@ -3,7 +3,6 @@
 // distinct scopes to be compared (`'g` and `'h`). The only important
 // thing is that compilation succeeds here.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(missing_copy_implementations)]
 #![allow(unused_variables)]
diff --git a/tests/ui/traits/issue-22110.rs b/tests/ui/traits/issue-22110.rs
index b0b584bd49daf..f16f5328ad368 100644
--- a/tests/ui/traits/issue-22110.rs
+++ b/tests/ui/traits/issue-22110.rs
@@ -3,7 +3,6 @@
 // and the blanket impl. The only important thing is that compilation
 // succeeds here. Issue #22110.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/traits/issue-22655.rs b/tests/ui/traits/issue-22655.rs
index aaf1b05b6e563..dfba8011a1e27 100644
--- a/tests/ui/traits/issue-22655.rs
+++ b/tests/ui/traits/issue-22655.rs
@@ -3,7 +3,6 @@
 // Regression test for issue #22655: This test should not lead to
 // infinite recursion.
 
-//@ pretty-expanded FIXME #23616
 
 unsafe impl<T: Send + ?Sized> Send for Unique<T> { }
 
diff --git a/tests/ui/traits/issue-23003.rs b/tests/ui/traits/issue-23003.rs
index cb05a5dfb6b80..93c5bfe32ce9e 100644
--- a/tests/ui/traits/issue-23003.rs
+++ b/tests/ui/traits/issue-23003.rs
@@ -4,7 +4,6 @@
 // Async>::Cancel` be WF. This normalizes to `Receipt<Complete>`
 // again, leading to an infinite cycle. Issue #23003.
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 #![allow(unused_variables)]
diff --git a/tests/ui/traits/monomorphized-callees-with-ty-params-3314.rs b/tests/ui/traits/monomorphized-callees-with-ty-params-3314.rs
index 35d6dddfa30d6..9d33ec8c1728e 100644
--- a/tests/ui/traits/monomorphized-callees-with-ty-params-3314.rs
+++ b/tests/ui/traits/monomorphized-callees-with-ty-params-3314.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 trait Serializer {
 }
diff --git a/tests/ui/traits/parameterized-with-bounds.rs b/tests/ui/traits/parameterized-with-bounds.rs
index 2de9bf3d04cc8..54e2d6e096d64 100644
--- a/tests/ui/traits/parameterized-with-bounds.rs
+++ b/tests/ui/traits/parameterized-with-bounds.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/traits/syntax-polarity.rs b/tests/ui/traits/syntax-polarity.rs
index 80ad40bad8071..c6506e916ed45 100644
--- a/tests/ui/traits/syntax-polarity.rs
+++ b/tests/ui/traits/syntax-polarity.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 #![feature(negative_impls)]
 
diff --git a/tests/ui/traits/use-before-def.rs b/tests/ui/traits/use-before-def.rs
index fb7e540db1875..2c7c6b19d6703 100644
--- a/tests/ui/traits/use-before-def.rs
+++ b/tests/ui/traits/use-before-def.rs
@@ -3,7 +3,6 @@
 
 // Issue #1761
 
-//@ pretty-expanded FIXME #23616
 
 impl foo for isize { fn foo(&self) -> isize { 10 } }
 trait foo { fn foo(&self) -> isize; }
diff --git a/tests/ui/traits/where-clause-vs-impl.rs b/tests/ui/traits/where-clause-vs-impl.rs
index 074c27036c2e1..639347b3bc36d 100644
--- a/tests/ui/traits/where-clause-vs-impl.rs
+++ b/tests/ui/traits/where-clause-vs-impl.rs
@@ -6,7 +6,6 @@
 //
 // Issue #18453.
 
-//@ pretty-expanded FIXME #23616
 
 use std::rc::Rc;
 
diff --git a/tests/ui/transmute-non-immediate-to-immediate.rs b/tests/ui/transmute-non-immediate-to-immediate.rs
index f5ddf0cfa330b..d99bbcc600fd4 100644
--- a/tests/ui/transmute-non-immediate-to-immediate.rs
+++ b/tests/ui/transmute-non-immediate-to-immediate.rs
@@ -2,7 +2,6 @@
 // Issue #7988
 // Transmuting non-immediate type to immediate type
 
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     unsafe {
diff --git a/tests/ui/type-alias/issue-14933.rs b/tests/ui/type-alias/issue-14933.rs
index ddad6071017cd..198a25e896425 100644
--- a/tests/ui/type-alias/issue-14933.rs
+++ b/tests/ui/type-alias/issue-14933.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 pub type BigRat<T = isize> = T;
 
diff --git a/tests/ui/type-param-constraints.rs b/tests/ui/type-param-constraints.rs
index a5c36af63fa78..83d81c0d833f1 100644
--- a/tests/ui/type-param-constraints.rs
+++ b/tests/ui/type-param-constraints.rs
@@ -2,7 +2,6 @@
 
 #![allow(non_camel_case_types)]
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 fn p_foo<T>(_pinned: T) { }
 fn s_foo<T>(_shared: T) { }
diff --git a/tests/ui/type-param.rs b/tests/ui/type-param.rs
index fdb56feab82a9..e7cf0e5446bcf 100644
--- a/tests/ui/type-param.rs
+++ b/tests/ui/type-param.rs
@@ -4,7 +4,6 @@
 #![allow(dead_code)]
 
 
-//@ pretty-expanded FIXME #23616
 
 type lteq<T> = extern "C" fn(T) -> bool;
 
diff --git a/tests/ui/type-ptr.rs b/tests/ui/type-ptr.rs
index 8f3868fc609c3..5c8ed344ab33a 100644
--- a/tests/ui/type-ptr.rs
+++ b/tests/ui/type-ptr.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 fn f(a: *const isize) -> *const isize { return a; }
 
diff --git a/tests/ui/type-use-i1-versus-i8.rs b/tests/ui/type-use-i1-versus-i8.rs
index 916a77d993484..4eb25329223cf 100644
--- a/tests/ui/type-use-i1-versus-i8.rs
+++ b/tests/ui/type-use-i1-versus-i8.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 use std::ptr;
 
diff --git a/tests/ui/type/issue-7607-2.rs b/tests/ui/type/issue-7607-2.rs
index 654f26bf298d7..ebc4fe1c2d301 100644
--- a/tests/ui/type/issue-7607-2.rs
+++ b/tests/ui/type/issue-7607-2.rs
@@ -1,6 +1,5 @@
 //@ check-pass
 #![allow(dead_code)]
-//@ pretty-expanded FIXME #23616
 
 pub mod a {
     pub struct Foo { a: usize }
diff --git a/tests/ui/typeck/ufcs-type-params.rs b/tests/ui/typeck/ufcs-type-params.rs
index ef8b983b3e929..5a6db4620fc18 100644
--- a/tests/ui/typeck/ufcs-type-params.rs
+++ b/tests/ui/typeck/ufcs-type-params.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 trait Foo<T> {
     fn get(&self) -> T;
diff --git a/tests/ui/typeck/unify-return-ty.rs b/tests/ui/typeck/unify-return-ty.rs
index 849b72e63e5de..d33a1674e0809 100644
--- a/tests/ui/typeck/unify-return-ty.rs
+++ b/tests/ui/typeck/unify-return-ty.rs
@@ -3,7 +3,6 @@
 // unified with the type *T, and so the type variable
 // in that type gets resolved.
 
-//@ pretty-expanded FIXME #23616
 
 use std::mem;
 
diff --git a/tests/ui/unboxed-closures/issue-18661.rs b/tests/ui/unboxed-closures/issue-18661.rs
index 44b4c49935214..dc965809ea187 100644
--- a/tests/ui/unboxed-closures/issue-18661.rs
+++ b/tests/ui/unboxed-closures/issue-18661.rs
@@ -2,7 +2,6 @@
 // Test that param substitutions from the correct environment are
 // used when codegenning unboxed closure calls.
 
-//@ pretty-expanded FIXME #23616
 
 pub fn inside<F: Fn()>(c: F) {
     c();
diff --git a/tests/ui/unboxed-closures/unboxed-closures-direct-sugary-call.rs b/tests/ui/unboxed-closures/unboxed-closures-direct-sugary-call.rs
index 632bffbea18df..265e8e49f0dec 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-direct-sugary-call.rs
+++ b/tests/ui/unboxed-closures/unboxed-closures-direct-sugary-call.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(unused_mut)]
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     let mut unboxed = || {};
diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-bound.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-bound.rs
index c7c50b7b50e20..8c27c4151ac7e 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-bound.rs
+++ b/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-bound.rs
@@ -2,7 +2,6 @@
 // Test that we are able to infer that the type of `x` is `isize` based
 // on the expected type from the object.
 
-//@ pretty-expanded FIXME #23616
 
 pub trait ToPrimitive {
     fn to_int(&self) {}
diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-object-type.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-object-type.rs
index a54048d25181d..10f21908902e3 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-object-type.rs
+++ b/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-object-type.rs
@@ -2,7 +2,6 @@
 // Test that we are able to infer that the type of `x` is `isize` based
 // on the expected type from the object.
 
-//@ pretty-expanded FIXME #23616
 
 pub trait ToPrimitive {
     fn to_int(&self) {}
diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-w-bound-regs-from-expected-bound.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-w-bound-regs-from-expected-bound.rs
index 8c7b1c7534b0a..d3a6ff91a9403 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-w-bound-regs-from-expected-bound.rs
+++ b/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-w-bound-regs-from-expected-bound.rs
@@ -2,7 +2,6 @@
 // Test that we are able to infer that the type of `x` is `isize` based
 // on the expected type from the object.
 
-//@ pretty-expanded FIXME #23616
 
 pub trait ToPrimitive {
     fn to_int(&self) {}
diff --git a/tests/ui/unboxed-closures/unboxed-closures-move-mutable.rs b/tests/ui/unboxed-closures/unboxed-closures-move-mutable.rs
index d883053d2763e..f27461808c390 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-move-mutable.rs
+++ b/tests/ui/unboxed-closures/unboxed-closures-move-mutable.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 #![deny(unused_mut)]
 #![allow(unused_must_use)]
diff --git a/tests/ui/unboxed-closures/unboxed-closures-move-mutable.stderr b/tests/ui/unboxed-closures/unboxed-closures-move-mutable.stderr
index 5c06f4e621c17..813e2eea56848 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-move-mutable.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-move-mutable.stderr
@@ -1,5 +1,5 @@
 warning: unused variable: `x`
-  --> $DIR/unboxed-closures-move-mutable.rs:17:17
+  --> $DIR/unboxed-closures-move-mutable.rs:16:17
    |
 LL |         move || x += 1;
    |                 ^
@@ -8,7 +8,7 @@ LL |         move || x += 1;
    = note: `#[warn(unused_variables)]` on by default
 
 warning: unused variable: `x`
-  --> $DIR/unboxed-closures-move-mutable.rs:21:17
+  --> $DIR/unboxed-closures-move-mutable.rs:20:17
    |
 LL |         move || x += 1;
    |                 ^
diff --git a/tests/ui/unboxed-closures/unboxed-closures-prelude.rs b/tests/ui/unboxed-closures/unboxed-closures-prelude.rs
index ca0ca66c0353d..ae90a51c48826 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-prelude.rs
+++ b/tests/ui/unboxed-closures/unboxed-closures-prelude.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 // Tests that the re-exports of `FnOnce` et al from the prelude work.
 
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     let task: Box<dyn Fn(isize) -> isize> = Box::new(|x| x);
diff --git a/tests/ui/unboxed-closures/unboxed-closures-static-call-fn-once.rs b/tests/ui/unboxed-closures/unboxed-closures-static-call-fn-once.rs
index 6103dbd99590a..c63594dc8787b 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-static-call-fn-once.rs
+++ b/tests/ui/unboxed-closures/unboxed-closures-static-call-fn-once.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     let onetime = |x| x;
diff --git a/tests/ui/unboxed-closures/unboxed-closures-zero-args.rs b/tests/ui/unboxed-closures/unboxed-closures-zero-args.rs
index 81fe12afccf13..c808189b65859 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-zero-args.rs
+++ b/tests/ui/unboxed-closures/unboxed-closures-zero-args.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(unused_mut)]
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     let mut zero = || {};
diff --git a/tests/ui/uninit-empty-types.rs b/tests/ui/uninit-empty-types.rs
index a6c11c4999a2d..82474d873b788 100644
--- a/tests/ui/uninit-empty-types.rs
+++ b/tests/ui/uninit-empty-types.rs
@@ -1,7 +1,6 @@
 //@ build-pass
 // Test the uninit() construct returning various empty types.
 
-//@ pretty-expanded FIXME #23616
 
 use std::mem::MaybeUninit;
 
diff --git a/tests/ui/unit.rs b/tests/ui/unit.rs
index 98ac164b1d415..04404fc3f5e66 100644
--- a/tests/ui/unit.rs
+++ b/tests/ui/unit.rs
@@ -2,7 +2,6 @@
 
 #![allow(unused_assignments)]
 #![allow(unknown_lints)]
-//@ pretty-expanded FIXME #23616
 
 #![allow(unused_variables)]
 #![allow(dead_assignment)]
diff --git a/tests/ui/unnamed_argument_mode.rs b/tests/ui/unnamed_argument_mode.rs
index ba6f84c4ddea5..2014e0d23d849 100644
--- a/tests/ui/unnamed_argument_mode.rs
+++ b/tests/ui/unnamed_argument_mode.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn good(_a: &isize) {
 }
diff --git a/tests/ui/unsafe/new-unsafe-pointers.rs b/tests/ui/unsafe/new-unsafe-pointers.rs
index 39566cda90ac3..07c54ae96922c 100644
--- a/tests/ui/unsafe/new-unsafe-pointers.rs
+++ b/tests/ui/unsafe/new-unsafe-pointers.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 fn main() {
     let _a: *const isize = 3 as *const isize;
diff --git a/tests/ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs b/tests/ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs
index d9f244bc4d207..d45f5c523c25a 100644
--- a/tests/ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs
+++ b/tests/ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs
@@ -4,7 +4,6 @@
 //
 // See also: ui/unsafe/unsafe-fn-called-from-safe.rs
 
-//@ pretty-expanded FIXME #23616
 
 unsafe fn f() { return; }
 
diff --git a/tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs b/tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs
index bb7715b7b5cea..168c60dfc8439 100644
--- a/tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs
+++ b/tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs
@@ -4,7 +4,6 @@
 //
 // See also: ui/unsafe/unsafe-fn-called-from-safe.rs
 
-//@ pretty-expanded FIXME #23616
 
 unsafe fn f() { return; }
 
diff --git a/tests/ui/unused-move-capture.rs b/tests/ui/unused-move-capture.rs
index c295f8d791439..5f42bcbe280e6 100644
--- a/tests/ui/unused-move-capture.rs
+++ b/tests/ui/unused-move-capture.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 pub fn main() {
     let _x: Box<_> = Box::new(1);
diff --git a/tests/ui/unused-move.rs b/tests/ui/unused-move.rs
index 87398652e93c3..3d5eff2c48d50 100644
--- a/tests/ui/unused-move.rs
+++ b/tests/ui/unused-move.rs
@@ -3,7 +3,6 @@
 // Issue Name: Unused move causes a crash
 // Abstract: zero-fill to block after drop
 
-//@ pretty-expanded FIXME #23616
 
 #![allow(path_statements)]
 
diff --git a/tests/ui/use-import-export.rs b/tests/ui/use-import-export.rs
index f784194c50590..d948ffc1520b3 100644
--- a/tests/ui/use-import-export.rs
+++ b/tests/ui/use-import-export.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ pretty-expanded FIXME #23616
 
 mod foo {
     pub fn x() -> isize { return 1; }
diff --git a/tests/ui/use/use.rs b/tests/ui/use/use.rs
index 826a049f2bbb5..db031500a4ac8 100644
--- a/tests/ui/use/use.rs
+++ b/tests/ui/use/use.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 
 #![allow(stable_features)]
-//@ pretty-expanded FIXME #23616
 
 #![allow(unused_imports)]
 #![feature(start, no_core, core)]
diff --git a/tests/ui/where-clauses/where-clause-bounds-inconsistency.rs b/tests/ui/where-clauses/where-clause-bounds-inconsistency.rs
index be003cbf585e0..cf9c661582e9e 100644
--- a/tests/ui/where-clauses/where-clause-bounds-inconsistency.rs
+++ b/tests/ui/where-clauses/where-clause-bounds-inconsistency.rs
@@ -1,5 +1,4 @@
 //@ check-pass
-//@ pretty-expanded FIXME #23616
 
 trait Bound {
     fn dummy(&self) { }
diff --git a/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs b/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs
index 67088a9818e08..153fa8a5715a1 100644
--- a/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs
+++ b/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(non_upper_case_globals)]
 
-//@ pretty-expanded FIXME #23616
 
 trait TheTrait { fn dummy(&self) { } } //~ WARN method `dummy` is never used
 
diff --git a/tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr b/tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr
index a9fe11ea6b316..34ed8bd214674 100644
--- a/tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr
+++ b/tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr
@@ -1,5 +1,5 @@
 warning: method `dummy` is never used
-  --> $DIR/where-clause-early-bound-lifetimes.rs:6:21
+  --> $DIR/where-clause-early-bound-lifetimes.rs:5:21
    |
 LL | trait TheTrait { fn dummy(&self) { } }
    |       --------      ^^^^^
diff --git a/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs b/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs
index ba409182809db..da75ed796c00f 100644
--- a/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs
+++ b/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 trait Foo<T> { fn dummy(&self, arg: T) { } } //~ WARN method `dummy` is never used
 
diff --git a/tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr b/tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr
index 0d09cb9de3f6b..9a8faf7a64e84 100644
--- a/tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr
+++ b/tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr
@@ -1,5 +1,5 @@
 warning: method `dummy` is never used
-  --> $DIR/where-clause-method-substituion-rpass.rs:5:19
+  --> $DIR/where-clause-method-substituion-rpass.rs:4:19
    |
 LL | trait Foo<T> { fn dummy(&self, arg: T) { } }
    |       ---         ^^^^^
diff --git a/tests/ui/where-clauses/where-clause-region-outlives.rs b/tests/ui/where-clauses/where-clause-region-outlives.rs
index db61638ca2dd7..47a6d46820446 100644
--- a/tests/ui/where-clauses/where-clause-region-outlives.rs
+++ b/tests/ui/where-clauses/where-clause-region-outlives.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(dead_code)]
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 struct A<'a, 'b> where 'a : 'b { x: &'a isize, y: &'b isize }
 
diff --git a/tests/ui/where-clauses/where-clauses-lifetimes.rs b/tests/ui/where-clauses/where-clauses-lifetimes.rs
index 8e8c73a392511..63ab9bafa23d9 100644
--- a/tests/ui/where-clauses/where-clauses-lifetimes.rs
+++ b/tests/ui/where-clauses/where-clauses-lifetimes.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(unused_mut)]
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 fn foo<'a, I>(mut it: I) where I: Iterator<Item=&'a isize> {}
 
diff --git a/tests/ui/where-clauses/where-clauses-unboxed-closures.rs b/tests/ui/where-clauses/where-clauses-unboxed-closures.rs
index c2ef65ab0a699..5961a51645785 100644
--- a/tests/ui/where-clauses/where-clauses-unboxed-closures.rs
+++ b/tests/ui/where-clauses/where-clauses-unboxed-closures.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(unused_variables)]
-//@ pretty-expanded FIXME #23616
 
 struct Bencher;
 

From 259020c9324d40fccb889d7bb9e462fc28ffe75c Mon Sep 17 00:00:00 2001
From: Martin Nordholts <martin.nordholts@codetale.se>
Date: Mon, 25 Nov 2024 20:30:28 +0100
Subject: [PATCH 37/38] tests: Add regression test for recursive enum with Cow
 and Clone

---
 .../solver-cycles/100347-recursive-enum-cow-slice.rs  | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 tests/ui/traits/solver-cycles/100347-recursive-enum-cow-slice.rs

diff --git a/tests/ui/traits/solver-cycles/100347-recursive-enum-cow-slice.rs b/tests/ui/traits/solver-cycles/100347-recursive-enum-cow-slice.rs
new file mode 100644
index 0000000000000..26ae42b3e082f
--- /dev/null
+++ b/tests/ui/traits/solver-cycles/100347-recursive-enum-cow-slice.rs
@@ -0,0 +1,11 @@
+//@ check-pass
+
+use std::borrow::Cow;
+
+#[derive(Clone)]
+enum Test<'a> {
+    Int(u8),
+    Array(Cow<'a, [Test<'a>]>),
+}
+
+fn main() {}

From 3a42fd2bdcdda6e37a997caf30bae673fa9ca155 Mon Sep 17 00:00:00 2001
From: Jieyou Xu <jieyouxu@outlook.com>
Date: Tue, 26 Nov 2024 07:56:32 +0800
Subject: [PATCH 38/38] tests: disable `avr-rjmp-offset` on Windows for now

The linker has been randomly crashing on `x86_64-mingw` that's causing
spurious failures. Disable this test on Windows for now.
---
 tests/run-make/avr-rjmp-offset/rmake.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/run-make/avr-rjmp-offset/rmake.rs b/tests/run-make/avr-rjmp-offset/rmake.rs
index 89cbca309be09..2ea7ea877d4aa 100644
--- a/tests/run-make/avr-rjmp-offset/rmake.rs
+++ b/tests/run-make/avr-rjmp-offset/rmake.rs
@@ -10,6 +10,11 @@
 //! wrong output is only produced with direct assembly generation, but not when
 //! "emit-asm" is used, as described in the issue description of #129301:
 //! https://github.com/rust-lang/rust/issues/129301#issue-2475070770
+
+// FIXME(#133480): this has been randomly failing on `x86_64-mingw` due to linker hangs or
+// crashes... so I'm going to disable this test for windows for now.
+//@ ignore-windows
+
 use run_make_support::{llvm_objdump, rustc};
 
 fn main() {