Repository: rust-lang/rust-analyzer
Pull request #19052 (2025-01-27 17:24:49)

Prioritize formatting thread tasks in main_loop
Some people still seem to run into https://github.com/rust-lang/rust-analyzer/issues/5111, and I think this might be why.


Patch:
diff --git a/crates/hir-def/src/data.rs b/crates/hir-def/src/data.rs
index c5bbd4edba..a52a236957 100644
--- a/crates/hir-def/src/data.rs
+++ b/crates/hir-def/src/data.rs
@@ -95,10 +95,10 @@ impl FunctionData {
             .map(Box::new);
         let rustc_allow_incoherent_impl = attrs.by_key(&sym::rustc_allow_incoherent_impl).exists();
         if flags.contains(FnFlags::HAS_UNSAFE_KW)
+            && !crate_graph[krate].edition.at_least_2024()
             && attrs.by_key(&sym::rustc_deprecated_safe_2024).exists()
         {
             flags.remove(FnFlags::HAS_UNSAFE_KW);
-            flags.insert(FnFlags::DEPRECATED_SAFE_2024);
         }
 
         if attrs.by_key(&sym::target_feature).exists() {
@@ -152,10 +152,6 @@ impl FunctionData {
         self.flags.contains(FnFlags::HAS_UNSAFE_KW)
     }
 
-    pub fn is_deprecated_safe_2024(&self) -> bool {
-        self.flags.contains(FnFlags::DEPRECATED_SAFE_2024)
-    }
-
     pub fn is_safe(&self) -> bool {
         self.flags.contains(FnFlags::HAS_SAFE_KW)
     }
diff --git a/crates/hir-def/src/data/adt.rs b/crates/hir-def/src/data/adt.rs
index aaa260a358..8fc1985403 100644
--- a/crates/hir-def/src/data/adt.rs
+++ b/crates/hir-def/src/data/adt.rs
@@ -85,7 +85,6 @@ pub struct FieldData {
     pub name: Name,
     pub type_ref: TypeRefId,
     pub visibility: RawVisibility,
-    pub has_default: bool,
 }
 
 fn repr_from_value(
@@ -479,6 +478,5 @@ fn lower_field(
         name: field.name.clone(),
         type_ref: field.type_ref,
         visibility: item_tree[override_visibility.unwrap_or(field.visibility)].clone(),
-        has_default: field.has_default,
     }
 }
diff --git a/crates/hir-def/src/expr_store.rs b/crates/hir-def/src/expr_store.rs
index d0695d0eac..9df6eaade7 100644
--- a/crates/hir-def/src/expr_store.rs
+++ b/crates/hir-def/src/expr_store.rs
@@ -25,7 +25,7 @@ use crate::{
     db::DefDatabase,
     hir::{
         Array, AsmOperand, Binding, BindingId, Expr, ExprId, ExprOrPatId, Label, LabelId, Pat,
-        PatId, RecordFieldPat, Spread, Statement,
+        PatId, RecordFieldPat, Statement,
     },
     nameres::DefMap,
     path::{ModPath, Path},
@@ -362,7 +362,7 @@ impl ExpressionStore {
                 for field in fields.iter() {
                     f(field.expr);
                 }
-                if let &Spread::Base(expr) = spread {
+                if let &Some(expr) = spread {
                     f(expr);
                 }
             }
@@ -490,7 +490,7 @@ impl ExpressionStore {
                 for field in fields.iter() {
                     f(field.expr);
                 }
-                if let &Spread::Base(expr) = spread {
+                if let &Some(expr) = spread {
                     f(expr);
                 }
             }
diff --git a/crates/hir-def/src/expr_store/body.rs b/crates/hir-def/src/expr_store/body.rs
index 3177b2c74a..a55fec4f8b 100644
--- a/crates/hir-def/src/expr_store/body.rs
+++ b/crates/hir-def/src/expr_store/body.rs
@@ -122,9 +122,6 @@ impl Body {
                     src.map(|it| it.expr())
                 }
                 DefWithBodyId::InTypeConstId(c) => c.lookup(db).id.map(|_| c.source(db).expr()),
-                DefWithBodyId::FieldId(f) => {
-                    f.record_field_source(db).map(|it| it.and_then(|it| it.expr()))
-                }
             }
         };
         let module = def.module(db);
diff --git a/crates/hir-def/src/expr_store/lower.rs b/crates/hir-def/src/expr_store/lower.rs
index 811fecf91f..dfc716eb84 100644
--- a/crates/hir-def/src/expr_store/lower.rs
+++ b/crates/hir-def/src/expr_store/lower.rs
@@ -45,7 +45,7 @@ use crate::{
         },
         Array, Binding, BindingAnnotation, BindingId, BindingProblems, CaptureBy, ClosureKind,
         Expr, ExprId, Item, Label, LabelId, Literal, LiteralOrConst, MatchArm, Movability,
-        OffsetOf, Pat, PatId, RecordFieldPat, RecordLitField, Spread, Statement,
+        OffsetOf, Pat, PatId, RecordFieldPat, RecordLitField, Statement,
     },
     item_scope::BuiltinShadowMode,
     lang_item::LangItem,
@@ -90,7 +90,6 @@ pub(super) fn lower_body(
         DefWithBodyId::ConstId(it) => db.attrs(it.into()),
         DefWithBodyId::InTypeConstId(_) => Attrs::EMPTY,
         DefWithBodyId::VariantId(it) => db.attrs(it.into()),
-        DefWithBodyId::FieldId(it) => db.attrs(it.into()),
     }
     .rust_analyzer_tool()
     .any(|attr| *attr.path() == tool_path![skip]);
@@ -169,7 +168,6 @@ pub(super) fn lower_body(
                     Awaitable::No("constant")
                 }
                 DefWithBodyId::VariantId(..) => Awaitable::No("enum variant"),
-                DefWithBodyId::FieldId(..) => Awaitable::No("field"),
             }
         },
     );
@@ -602,13 +600,10 @@ impl ExprCollector<'_> {
                             Some(RecordLitField { name, expr })
                         })
                         .collect();
-                    let spread = nfl.spread().map(|s| self.collect_expr(s)).map_or_else(
-                        || if nfl.dotdot_token().is_some() { Spread::Yes } else { Spread::No },
-                        Spread::Base,
-                    );
+                    let spread = nfl.spread().map(|s| self.collect_expr(s));
                     Expr::RecordLit { path, fields, spread }
                 } else {
-                    Expr::RecordLit { path, fields: Box::default(), spread: Spread::No }
+                    Expr::RecordLit { path, fields: Box::default(), spread: None }
                 };
 
                 self.alloc_expr(record_lit, syntax_ptr)
@@ -2238,27 +2233,17 @@ impl ExprCollector<'_> {
         let unsafe_arg_new = self.alloc_expr_desugared(Expr::Path(unsafe_arg_new));
         let unsafe_arg_new =
             self.alloc_expr_desugared(Expr::Call { callee: unsafe_arg_new, args: Box::default() });
-        let mut unsafe_arg_new = self.alloc_expr_desugared(Expr::Unsafe {
+        let unsafe_arg_new = self.alloc_expr_desugared(Expr::Unsafe {
             id: None,
-            statements: Box::new([]),
+            // We collect the unused expressions here so that we still infer them instead of
+            // dropping them out of the expression tree
+            statements: fmt
+                .orphans
+                .into_iter()
+                .map(|expr| Statement::Expr { expr, has_semi: true })
+                .collect(),
             tail: Some(unsafe_arg_new),
         });
-        if !fmt.orphans.is_empty() {
-            unsafe_arg_new = self.alloc_expr_desugared(Expr::Block {
-                id: None,
-                // We collect the unused expressions here so that we still infer them instead of
-                // dropping them out of the expression tree. We cannot store them in the `Unsafe`
-                // block because then unsafe blocks within them will get a false "unused unsafe"
-                // diagnostic (rustc has a notion of builtin unsafe blocks, but we don't).
-                statements: fmt
-                    .orphans
-                    .into_iter()
-                    .map(|expr| Statement::Expr { expr, has_semi: true })
-                    .collect(),
-                tail: Some(unsafe_arg_new),
-                label: None,
-            });
-        }
 
         let idx = self.alloc_expr(
             Expr::Call {
diff --git a/crates/hir-def/src/expr_store/pretty.rs b/crates/hir-def/src/expr_store/pretty.rs
index 1b3a1bb4dc..6a0b1e5197 100644
--- a/crates/hir-def/src/expr_store/pretty.rs
+++ b/crates/hir-def/src/expr_store/pretty.rs
@@ -8,10 +8,9 @@ use span::Edition;
 use crate::{
     hir::{
         Array, BindingAnnotation, CaptureBy, ClosureKind, Literal, LiteralOrConst, Movability,
-        Spread, Statement,
+        Statement,
     },
     pretty::{print_generic_args, print_path, print_type_ref},
-    VariantId,
 };
 
 use super::*;
@@ -57,32 +56,6 @@ pub(super) fn print_body_hir(
                 loc.id.item_tree(db)[loc.id.value].name.display(db.upcast(), edition),
             )
         }
-        DefWithBodyId::FieldId(it) => {
-            let parent_name: String = match it.parent {
-                VariantId::EnumVariantId(it) => {
-                    let loc = it.lookup(db);
-                    let enum_loc = loc.parent.lookup(db);
-                    format!(
-                        "{}::{}",
-                        enum_loc.id.item_tree(db)[enum_loc.id.value]
-                            .name
-                            .display(db.upcast(), edition),
-                        loc.id.item_tree(db)[loc.id.value].name.display(db.upcast(), edition),
-                    )
-                }
-                VariantId::StructId(it) => it
-                    .lookup(db)
-                    .id
-                    .resolved(db, |it| it.name.display(db.upcast(), edition).to_string()),
-                VariantId::UnionId(it) => it
-                    .lookup(db)
-                    .id
-                    .resolved(db, |it| it.name.display(db.upcast(), edition).to_string()),
-            };
-            let variant_data = it.parent.variant_data(db);
-            let field_name = &variant_data.fields()[it.local_id].name;
-            format!("field {}.{}", parent_name, field_name.display(db.upcast(), edition),)
-        }
     };
 
     let mut p = Printer {
@@ -412,16 +385,10 @@ impl Printer<'_> {
                         p.print_expr(field.expr);
                         wln!(p, ",");
                     }
-                    match spread {
-                        Spread::No => {}
-                        Spread::Yes => {
-                            w!(p, "..");
-                        }
-                        Spread::Base(expr) => {
-                            w!(p, "..");
-                            p.print_expr(*expr);
-                            wln!(p);
-                        }
+                    if let Some(spread) = spread {
+                        w!(p, "..");
+                        p.print_expr(*spread);
+                        wln!(p);
                     }
                 });
                 w!(self, "}}");
diff --git a/crates/hir-def/src/hir.rs b/crates/hir-def/src/hir.rs
index e09ce67a89..0dcddf162b 100644
--- a/crates/hir-def/src/hir.rs
+++ b/crates/hir-def/src/hir.rs
@@ -251,7 +251,7 @@ pub enum Expr {
     RecordLit {
         path: Option<Box<Path>>,
         fields: Box<[RecordLitField]>,
-        spread: Spread,
+        spread: Option<ExprId>,
     },
     Field {
         expr: ExprId,
@@ -478,13 +478,6 @@ pub struct RecordLitField {
     pub expr: ExprId,
 }
 
-#[derive(Debug, Clone, Eq, PartialEq)]
-pub enum Spread {
-    No,
-    Yes,
-    Base(ExprId),
-}
-
 #[derive(Debug, Clone, Eq, PartialEq)]
 pub enum Statement {
     Let {
diff --git a/crates/hir-def/src/item_tree.rs b/crates/hir-def/src/item_tree.rs
index 82e6ff821b..79ee3344d2 100644
--- a/crates/hir-def/src/item_tree.rs
+++ b/crates/hir-def/src/item_tree.rs
@@ -951,7 +951,6 @@ bitflags::bitflags! {
         /// only very few functions with it. So we only encode its existence here, and lookup
         /// it if needed.
         const HAS_TARGET_FEATURE = 1 << 8;
-        const DEPRECATED_SAFE_2024 = 1 << 9;
     }
 }
 
@@ -1007,7 +1006,6 @@ pub struct Field {
     pub name: Name,
     pub type_ref: TypeRefId,
     pub visibility: RawVisibilityId,
-    pub has_default: bool,
 }
 
 #[derive(Debug, Clone, Eq, PartialEq)]
diff --git a/crates/hir-def/src/item_tree/lower.rs b/crates/hir-def/src/item_tree/lower.rs
index 69a1933079..71848845a8 100644
--- a/crates/hir-def/src/item_tree/lower.rs
+++ b/crates/hir-def/src/item_tree/lower.rs
@@ -319,9 +319,8 @@ impl<'a> Ctx<'a> {
         };
         let visibility = self.lower_visibility(field);
         let type_ref = TypeRef::from_ast_opt(body_ctx, field.ty());
-        let has_default = field.expr().is_some();
 
-        Field { name, type_ref, visibility, has_default }
+        Field { name, type_ref, visibility }
     }
 
     fn lower_tuple_field(
@@ -333,7 +332,7 @@ impl<'a> Ctx<'a> {
         let name = Name::new_tuple_field(idx);
         let visibility = self.lower_visibility(field);
         let type_ref = TypeRef::from_ast_opt(body_ctx, field.ty());
-        Field { name, type_ref, visibility, has_default: false }
+        Field { name, type_ref, visibility }
     }
 
     fn lower_union(&mut self, union: &ast::Union) -> Option<FileItemTreeId<Union>> {
diff --git a/crates/hir-def/src/item_tree/pretty.rs b/crates/hir-def/src/item_tree/pretty.rs
index 1e765ac78e..70bf2f13c8 100644
--- a/crates/hir-def/src/item_tree/pretty.rs
+++ b/crates/hir-def/src/item_tree/pretty.rs
@@ -135,9 +135,7 @@ impl Printer<'_> {
                 self.whitespace();
                 w!(self, "{{");
                 self.indented(|this| {
-                    for (idx, Field { name, type_ref, visibility, has_default: _ }) in
-                        fields.iter().enumerate()
-                    {
+                    for (idx, Field { name, type_ref, visibility }) in fields.iter().enumerate() {
                         this.print_attrs_of(
                             AttrOwner::Field(parent, Idx::from_raw(RawIdx::from(idx as u32))),
                             "\n",
@@ -153,9 +151,7 @@ impl Printer<'_> {
             FieldsShape::Tuple => {
                 w!(self, "(");
                 self.indented(|this| {
-                    for (idx, Field { name, type_ref, visibility, has_default: _ }) in
-                        fields.iter().enumerate()
-                    {
+                    for (idx, Field { name, type_ref, visibility }) in fields.iter().enumerate() {
                         this.print_attrs_of(
                             AttrOwner::Field(parent, Idx::from_raw(RawIdx::from(idx as u32))),
                             "\n",
diff --git a/crates/hir-def/src/lib.rs b/crates/hir-def/src/lib.rs
index 6bc8741c33..c8efd90432 100644
--- a/crates/hir-def/src/lib.rs
+++ b/crates/hir-def/src/lib.rs
@@ -55,7 +55,6 @@ pub mod visibility;
 
 use intern::Interned;
 pub use rustc_abi as layout;
-use src::HasSource;
 use triomphe::Arc;
 
 #[cfg(test)]
@@ -78,7 +77,6 @@ use hir_expand::{
     builtin::{BuiltinAttrExpander, BuiltinDeriveExpander, BuiltinFnLikeExpander, EagerExpander},
     db::ExpandDatabase,
     eager::expand_eager_macro_input,
-    files::InFileWrapper,
     impl_intern_lookup,
     name::Name,
     proc_macro::{CustomProcMacroExpander, ProcMacroKind},
@@ -521,41 +519,6 @@ pub struct FieldId {
     pub local_id: LocalFieldId,
 }
 
-impl FieldId {
-    pub fn record_field_source(
-        &self,
-        db: &dyn DefDatabase,
-    ) -> InFileWrapper<HirFileId, Option<ast::RecordField>> {
-        let field_list = match self.parent {
-            crate::VariantId::EnumVariantId(it) => {
-                let s = it.lookup(db);
-                s.source(db).map(|it| {
-                    it.field_list().and_then(|it| match it {
-                        ast::FieldList::RecordFieldList(it) => Some(it),
-                        _ => None,
-                    })
-                })
-            }
-            crate::VariantId::StructId(it) => {
-                let s = it.lookup(db);
-                s.source(db).map(|it| {
-                    it.field_list().and_then(|it| match it {
-                        ast::FieldList::RecordFieldList(it) => Some(it),
-                        _ => None,
-                    })
-                })
-            }
-            crate::VariantId::UnionId(it) => {
-                let s = it.lookup(db);
-                s.source(db).map(|it| it.record_field_list())
-            }
-        };
-        field_list.map(|it| {
-            it.and_then(|it| it.fields().nth(self.local_id.into_raw().into_u32() as usize))
-        })
-    }
-}
-
 pub type LocalFieldId = Idx<data::adt::FieldData>;
 
 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
@@ -723,7 +686,6 @@ pub enum TypeOwnerId {
     TypeAliasId(TypeAliasId),
     ImplId(ImplId),
     EnumVariantId(EnumVariantId),
-    FieldId(FieldId),
 }
 
 impl TypeOwnerId {
@@ -741,11 +703,6 @@ impl TypeOwnerId {
                 GenericDefId::AdtId(AdtId::EnumId(it.lookup(db).parent))
             }
             TypeOwnerId::InTypeConstId(_) => return None,
-            TypeOwnerId::FieldId(it) => GenericDefId::AdtId(match it.parent {
-                VariantId::EnumVariantId(it) => AdtId::EnumId(it.lookup(db).parent),
-                VariantId::StructId(it) => it.into(),
-                VariantId::UnionId(it) => it.into(),
-            }),
         })
     }
 }
@@ -760,8 +717,7 @@ impl_from!(
     TraitAliasId,
     TypeAliasId,
     ImplId,
-    EnumVariantId,
-    FieldId
+    EnumVariantId
     for TypeOwnerId
 );
 
@@ -774,7 +730,6 @@ impl From<DefWithBodyId> for TypeOwnerId {
             DefWithBodyId::ConstId(it) => it.into(),
             DefWithBodyId::InTypeConstId(it) => it.into(),
             DefWithBodyId::VariantId(it) => it.into(),
-            DefWithBodyId::FieldId(it) => it.into(),
         }
     }
 }
@@ -930,7 +885,6 @@ pub enum DefWithBodyId {
     ConstId(ConstId),
     InTypeConstId(InTypeConstId),
     VariantId(EnumVariantId),
-    FieldId(FieldId),
 }
 
 impl_from!(FunctionId, ConstId, StaticId, InTypeConstId for DefWithBodyId);
@@ -951,7 +905,6 @@ impl DefWithBodyId {
             // FIXME: stable rust doesn't allow generics in constants, but we should
             // use `TypeOwnerId::as_generic_def_id` when it does.
             DefWithBodyId::InTypeConstId(_) => None,
-            DefWithBodyId::FieldId(_) => None,
         }
     }
 }
@@ -1356,12 +1309,6 @@ impl HasModule for VariantId {
     }
 }
 
-impl HasModule for FieldId {
-    fn module(&self, db: &dyn DefDatabase) -> ModuleId {
-        self.parent.module(db)
-    }
-}
-
 impl HasModule for MacroId {
     fn module(&self, db: &dyn DefDatabase) -> ModuleId {
         match *self {
@@ -1385,7 +1332,6 @@ impl HasModule for TypeOwnerId {
             TypeOwnerId::ImplId(it) => it.module(db),
             TypeOwnerId::EnumVariantId(it) => it.module(db),
             TypeOwnerId::InTypeConstId(it) => it.lookup(db).owner.module(db),
-            TypeOwnerId::FieldId(it) => it.module(db),
         }
     }
 }
@@ -1398,7 +1344,6 @@ impl HasModule for DefWithBodyId {
             DefWithBodyId::ConstId(it) => it.module(db),
             DefWithBodyId::VariantId(it) => it.module(db),
             DefWithBodyId::InTypeConstId(it) => it.lookup(db).owner.module(db),
-            DefWithBodyId::FieldId(it) => it.module(db),
         }
     }
 }
diff --git a/crates/hir-def/src/resolver.rs b/crates/hir-def/src/resolver.rs
index b415efafa6..7e13ae2f7a 100644
--- a/crates/hir-def/src/resolver.rs
+++ b/crates/hir-def/src/resolver.rs
@@ -27,11 +27,10 @@ use crate::{
     type_ref::{LifetimeRef, TypesMap},
     visibility::{RawVisibility, Visibility},
     AdtId, ConstId, ConstParamId, CrateRootModuleId, DefWithBodyId, EnumId, EnumVariantId,
-    ExternBlockId, ExternCrateId, FieldId, FunctionId, FxIndexMap, GenericDefId, GenericParamId,
-    HasModule, ImplId, ItemContainerId, ItemTreeLoc, LifetimeParamId, LocalModuleId, Lookup,
-    Macro2Id, MacroId, MacroRulesId, ModuleDefId, ModuleId, ProcMacroId, StaticId, StructId,
-    TraitAliasId, TraitId, TypeAliasId, TypeOrConstParamId, TypeOwnerId, TypeParamId, UseId,
-    VariantId,
+    ExternBlockId, ExternCrateId, FunctionId, FxIndexMap, GenericDefId, GenericParamId, HasModule,
+    ImplId, ItemContainerId, ItemTreeLoc, LifetimeParamId, LocalModuleId, Lookup, Macro2Id,
+    MacroId, MacroRulesId, ModuleDefId, ModuleId, ProcMacroId, StaticId, StructId, TraitAliasId,
+    TraitId, TypeAliasId, TypeOrConstParamId, TypeOwnerId, TypeParamId, UseId, VariantId,
 };
 
 #[derive(Debug, Clone)]
@@ -1228,7 +1227,6 @@ impl HasResolver for TypeOwnerId {
             TypeOwnerId::TypeAliasId(it) => it.resolver(db),
             TypeOwnerId::ImplId(it) => it.resolver(db),
             TypeOwnerId::EnumVariantId(it) => it.resolver(db),
-            TypeOwnerId::FieldId(it) => it.resolver(db),
         }
     }
 }
@@ -1241,7 +1239,6 @@ impl HasResolver for DefWithBodyId {
             DefWithBodyId::StaticId(s) => s.resolver(db),
             DefWithBodyId::VariantId(v) => v.resolver(db),
             DefWithBodyId::InTypeConstId(c) => c.lookup(db).owner.resolver(db),
-            DefWithBodyId::FieldId(f) => f.resolver(db),
         }
     }
 }
@@ -1288,12 +1285,6 @@ impl HasResolver for VariantId {
     }
 }
 
-impl HasResolver for FieldId {
-    fn resolver(self, db: &dyn DefDatabase) -> Resolver {
-        self.parent.resolver(db)
-    }
-}
-
 impl HasResolver for MacroId {
     fn resolver(self, db: &dyn DefDatabase) -> Resolver {
         match self {
diff --git a/crates/hir-expand/src/builtin/derive_macro.rs b/crates/hir-expand/src/builtin/derive_macro.rs
index f8fb700d55..28b6812139 100644
--- a/crates/hir-expand/src/builtin/derive_macro.rs
+++ b/crates/hir-expand/src/builtin/derive_macro.rs
@@ -80,15 +80,9 @@ pub fn find_builtin_derive(ident: &name::Name) -> Option<BuiltinDeriveExpander>
     BuiltinDeriveExpander::find_by_name(ident)
 }
 
-#[derive(Clone, Copy)]
-enum HasDefault {
-    Yes,
-    No,
-}
-
 #[derive(Clone)]
 enum VariantShape {
-    Struct(Vec<(tt::Ident, HasDefault)>),
+    Struct(Vec<tt::Ident>),
     Tuple(usize),
     Unit,
 }
@@ -104,7 +98,7 @@ impl VariantShape {
 
     fn field_names(&self, span: Span) -> Vec<tt::Ident> {
         match self {
-            VariantShape::Struct(s) => s.iter().map(|(ident, _)| ident.clone()).collect(),
+            VariantShape::Struct(s) => s.clone(),
             VariantShape::Tuple(n) => tuple_field_iterator(span, *n).collect(),
             VariantShape::Unit => vec![],
         }
@@ -118,7 +112,7 @@ impl VariantShape {
     ) -> tt::TopSubtree {
         match self {
             VariantShape::Struct(fields) => {
-                let fields = fields.iter().map(|(it, _)| {
+                let fields = fields.iter().map(|it| {
                     let mapped = field_map(it);
                     quote! {span => #it : #mapped , }
                 });
@@ -141,63 +135,6 @@ impl VariantShape {
         }
     }
 
-    fn default_expand(
-        &self,
-        path: tt::TopSubtree,
-        span: Span,
-        field_map: impl Fn(&tt::Ident) -> tt::TopSubtree,
-    ) -> tt::TopSubtree {
-        match self {
-            VariantShape::Struct(fields) => {
-                let contains_default = fields.iter().any(|it| matches!(it.1, HasDefault::Yes));
-                let fields = fields
-                    .iter()
-                    .filter_map(|(it, has_default)| match has_default {
-                        HasDefault::Yes => None,
-                        HasDefault::No => Some(it),
-                    })
-                    .map(|it| {
-                        let mapped = field_map(it);
-                        quote! {span => #it : #mapped , }
-                    });
-                if contains_default {
-                    let mut double_dots =
-                        tt::TopSubtreeBuilder::new(tt::Delimiter::invisible_spanned(span));
-                    double_dots.push(tt::Leaf::Punct(tt::Punct {
-                        char: '.',
-                        spacing: tt::Spacing::Joint,
-                        span,
-                    }));
-                    double_dots.push(tt::Leaf::Punct(tt::Punct {
-                        char: '.',
-                        spacing: tt::Spacing::Alone,
-                        span,
-                    }));
-                    let double_dots = double_dots.build();
-                    quote! {span =>
-                        #path { ##fields #double_dots }
-                    }
-                } else {
-                    quote! {span =>
-                        #path { ##fields }
-                    }
-                }
-            }
-            &VariantShape::Tuple(n) => {
-                let fields = tuple_field_iterator(span, n).map(|it| {
-                    let mapped = field_map(&it);
-                    quote! {span =>
-                        #mapped ,
-                    }
-                });
-                quote! {span =>
-                    #path ( ##fields )
-                }
-            }
-            VariantShape::Unit => path,
-        }
-    }
-
     fn from(
         call_site: Span,
         tm: &ExpansionSpanMap,
@@ -207,15 +144,8 @@ impl VariantShape {
             None => VariantShape::Unit,
             Some(FieldList::RecordFieldList(it)) => VariantShape::Struct(
                 it.fields()
-                    .map(|it| {
-                        (
-                            it.name(),
-                            if it.expr().is_some() { HasDefault::Yes } else { HasDefault::No },
-                        )
-                    })
-                    .map(|(it, has_default)| {
-                        name_to_token(call_site, tm, it).map(|ident| (ident, has_default))
-                    })
+                    .map(|it| it.name())
+                    .map(|it| name_to_token(call_site, tm, it))
                     .collect::<Result<_, _>>()?,
             ),
             Some(FieldList::TupleFieldList(it)) => VariantShape::Tuple(it.fields().count()),
@@ -671,7 +601,7 @@ fn default_expand(
         let body = match &adt.shape {
             AdtShape::Struct(fields) => {
                 let name = &adt.name;
-                fields.default_expand(
+                fields.as_pattern_map(
                     quote!(span =>#name),
                     span,
                     |_| quote!(span =>#krate::default::Default::default()),
@@ -681,7 +611,7 @@ fn default_expand(
                 if let Some(d) = default_variant {
                     let (name, fields) = &variants[*d];
                     let adt_name = &adt.name;
-                    fields.default_expand(
+                    fields.as_pattern_map(
                         quote!(span =>#adt_name :: #name),
                         span,
                         |_| quote!(span =>#krate::default::Default::default()),
@@ -713,7 +643,7 @@ fn debug_expand(
     expand_simple_derive(db, span, tt, quote! {span => #krate::fmt::Debug }, |adt| {
         let for_variant = |name: String, v: &VariantShape| match v {
             VariantShape::Struct(fields) => {
-                let for_fields = fields.iter().map(|(it, _)| {
+                let for_fields = fields.iter().map(|it| {
                     let x_string = it.to_string();
                     quote! {span =>
                         .field(#x_string, & #it)
diff --git a/crates/hir-ty/src/diagnostics/expr.rs b/crates/hir-ty/src/diagnostics/expr.rs
index d744fe64c0..0b5f131924 100644
--- a/crates/hir-ty/src/diagnostics/expr.rs
+++ b/crates/hir-ty/src/diagnostics/expr.rs
@@ -8,7 +8,6 @@ use base_db::CrateId;
 use chalk_solve::rust_ir::AdtKind;
 use either::Either;
 use hir_def::{
-    hir::Spread,
     lang_item::LangItem,
     resolver::{HasResolver, ValueNs},
     AdtId, AssocItemId, DefWithBodyId, HasModule, ItemContainerId, Lookup,
@@ -547,11 +546,9 @@ pub fn record_literal_missing_fields(
     infer: &InferenceResult,
     id: ExprId,
     expr: &Expr,
-) -> Option<(VariantId, Vec<LocalFieldId>, /*has spread expr*/ bool)> {
-    let (fields, has_spread_expr, has_ellipsis) = match expr {
-        Expr::RecordLit { fields, spread, .. } => {
-            (fields, !matches!(spread, Spread::Base(_)), matches!(spread, Spread::Yes))
-        }
+) -> Option<(VariantId, Vec<LocalFieldId>, /*exhaustive*/ bool)> {
+    let (fields, exhaustive) = match expr {
+        Expr::RecordLit { fields, spread, .. } => (fields, spread.is_none()),
         _ => return None,
     };
 
@@ -566,18 +563,12 @@ pub fn record_literal_missing_fields(
     let missed_fields: Vec<LocalFieldId> = variant_data
         .fields()
         .iter()
-        .filter_map(|(f, d)| {
-            if (has_ellipsis && d.has_default) || specified_fields.contains(&d.name) {
-                None
-            } else {
-                Some(f)
-            }
-        })
+        .filter_map(|(f, d)| if specified_fields.contains(&d.name) { None } else { Some(f) })
         .collect();
     if missed_fields.is_empty() {
         return None;
     }
-    Some((variant_def, missed_fields, has_spread_expr))
+    Some((variant_def, missed_fields, exhaustive))
 }
 
 pub fn record_pattern_missing_fields(
diff --git a/crates/hir-ty/src/diagnostics/unsafe_check.rs b/crates/hir-ty/src/diagnostics/unsafe_check.rs
index f655692429..99ec1951a3 100644
--- a/crates/hir-ty/src/diagnostics/unsafe_check.rs
+++ b/crates/hir-ty/src/diagnostics/unsafe_check.rs
@@ -10,48 +10,37 @@ use hir_def::{
     path::Path,
     resolver::{HasResolver, ResolveValueResult, Resolver, ValueNs},
     type_ref::Rawness,
-    AdtId, DefWithBodyId, FieldId, FunctionId, VariantId,
+    AdtId, DefWithBodyId, FieldId, VariantId,
 };
-use span::Edition;
 
 use crate::{
     db::HirDatabase, utils::is_fn_unsafe_to_call, InferenceResult, Interner, TargetFeatures, TyExt,
     TyKind,
 };
 
-#[derive(Debug, Default)]
-pub struct MissingUnsafeResult {
-    pub unsafe_exprs: Vec<(ExprOrPatId, UnsafetyReason)>,
-    /// If `fn_is_unsafe` is false, `unsafe_exprs` are hard errors. If true, they're `unsafe_op_in_unsafe_fn`.
-    pub fn_is_unsafe: bool,
-    pub deprecated_safe_calls: Vec<ExprId>,
-}
-
-pub fn missing_unsafe(db: &dyn HirDatabase, def: DefWithBodyId) -> MissingUnsafeResult {
+/// Returns `(unsafe_exprs, fn_is_unsafe)`.
+///
+/// If `fn_is_unsafe` is false, `unsafe_exprs` are hard errors. If true, they're `unsafe_op_in_unsafe_fn`.
+pub fn missing_unsafe(
+    db: &dyn HirDatabase,
+    def: DefWithBodyId,
+) -> (Vec<(ExprOrPatId, UnsafetyReason)>, bool) {
     let _p = tracing::info_span!("missing_unsafe").entered();
 
+    let mut res = Vec::new();
     let is_unsafe = match def {
         DefWithBodyId::FunctionId(it) => db.function_data(it).is_unsafe(),
         DefWithBodyId::StaticId(_)
         | DefWithBodyId::ConstId(_)
         | DefWithBodyId::VariantId(_)
-        | DefWithBodyId::InTypeConstId(_)
-        | DefWithBodyId::FieldId(_) => false,
+        | DefWithBodyId::InTypeConstId(_) => false,
     };
 
-    let mut res = MissingUnsafeResult { fn_is_unsafe: is_unsafe, ..MissingUnsafeResult::default() };
     let body = db.body(def);
     let infer = db.infer(def);
-    let mut callback = |diag| match diag {
-        UnsafeDiagnostic::UnsafeOperation { node, inside_unsafe_block, reason } => {
-            if inside_unsafe_block == InsideUnsafeBlock::No {
-                res.unsafe_exprs.push((node, reason));
-            }
-        }
-        UnsafeDiagnostic::DeprecatedSafe2024 { node, inside_unsafe_block } => {
-            if inside_unsafe_block == InsideUnsafeBlock::No {
-                res.deprecated_safe_calls.push(node)
-            }
+    let mut callback = |node, inside_unsafe_block, reason| {
+        if inside_unsafe_block == InsideUnsafeBlock::No {
+            res.push((node, reason));
         }
     };
     let mut visitor = UnsafeVisitor::new(db, &infer, &body, def, &mut callback);
@@ -66,7 +55,7 @@ pub fn missing_unsafe(db: &dyn HirDatabase, def: DefWithBodyId) -> MissingUnsafe
         }
     }
 
-    res
+    (res, is_unsafe)
 }
 
 #[derive(Debug, Clone, Copy)]
@@ -85,31 +74,15 @@ pub enum InsideUnsafeBlock {
     Yes,
 }
 
-#[derive(Debug)]
-enum UnsafeDiagnostic {
-    UnsafeOperation {
-        node: ExprOrPatId,
-        inside_unsafe_block: InsideUnsafeBlock,
-        reason: UnsafetyReason,
-    },
-    /// A lint.
-    DeprecatedSafe2024 { node: ExprId, inside_unsafe_block: InsideUnsafeBlock },
-}
-
 pub fn unsafe_expressions(
     db: &dyn HirDatabase,
     infer: &InferenceResult,
     def: DefWithBodyId,
     body: &Body,
     current: ExprId,
-    callback: &mut dyn FnMut(InsideUnsafeBlock),
+    unsafe_expr_cb: &mut dyn FnMut(ExprOrPatId, InsideUnsafeBlock, UnsafetyReason),
 ) {
-    let mut visitor_callback = |diag| {
-        if let UnsafeDiagnostic::UnsafeOperation { inside_unsafe_block, .. } = diag {
-            callback(inside_unsafe_block);
-        }
-    };
-    let mut visitor = UnsafeVisitor::new(db, infer, body, def, &mut visitor_callback);
+    let mut visitor = UnsafeVisitor::new(db, infer, body, def, unsafe_expr_cb);
     _ = visitor.resolver.update_to_inner_scope(db.upcast(), def, current);
     visitor.walk_expr(current);
 }
@@ -123,10 +96,8 @@ struct UnsafeVisitor<'a> {
     inside_unsafe_block: InsideUnsafeBlock,
     inside_assignment: bool,
     inside_union_destructure: bool,
-    callback: &'a mut dyn FnMut(UnsafeDiagnostic),
+    unsafe_expr_cb: &'a mut dyn FnMut(ExprOrPatId, InsideUnsafeBlock, UnsafetyReason),
     def_target_features: TargetFeatures,
-    // FIXME: This needs to be the edition of the span of each call.
-    edition: Edition,
 }
 
 impl<'a> UnsafeVisitor<'a> {
@@ -135,14 +106,13 @@ impl<'a> UnsafeVisitor<'a> {
         infer: &'a InferenceResult,
         body: &'a Body,
         def: DefWithBodyId,
-        unsafe_expr_cb: &'a mut dyn FnMut(UnsafeDiagnostic),
+        unsafe_expr_cb: &'a mut dyn FnMut(ExprOrPatId, InsideUnsafeBlock, UnsafetyReason),
     ) -> Self {
         let resolver = def.resolver(db.upcast());
         let def_target_features = match def {
             DefWithBodyId::FunctionId(func) => TargetFeatures::from_attrs(&db.attrs(func.into())),
             _ => TargetFeatures::default(),
         };
-        let edition = db.crate_graph()[resolver.module().krate()].edition;
         Self {
             db,
             infer,
@@ -152,34 +122,13 @@ impl<'a> UnsafeVisitor<'a> {
             inside_unsafe_block: InsideUnsafeBlock::No,
             inside_assignment: false,
             inside_union_destructure: false,
-            callback: unsafe_expr_cb,
+            unsafe_expr_cb,
             def_target_features,
-            edition,
         }
     }
 
-    fn on_unsafe_op(&mut self, node: ExprOrPatId, reason: UnsafetyReason) {
-        (self.callback)(UnsafeDiagnostic::UnsafeOperation {
-            node,
-            inside_unsafe_block: self.inside_unsafe_block,
-            reason,
-        });
-    }
-
-    fn check_call(&mut self, node: ExprId, func: FunctionId) {
-        let unsafety = is_fn_unsafe_to_call(self.db, func, &self.def_target_features, self.edition);
-        match unsafety {
-            crate::utils::Unsafety::Safe => {}
-            crate::utils::Unsafety::Unsafe => {
-                self.on_unsafe_op(node.into(), UnsafetyReason::UnsafeFnCall)
-            }
-            crate::utils::Unsafety::DeprecatedSafe2024 => {
-                (self.callback)(UnsafeDiagnostic::DeprecatedSafe2024 {
-                    node,
-                    inside_unsafe_block: self.inside_unsafe_block,
-                })
-            }
-        }
+    fn call_cb(&mut self, node: ExprOrPatId, reason: UnsafetyReason) {
+        (self.unsafe_expr_cb)(node, self.inside_unsafe_block, reason);
     }
 
     fn walk_pats_top(&mut self, pats: impl Iterator<Item = PatId>, parent_expr: ExprId) {
@@ -204,9 +153,7 @@ impl<'a> UnsafeVisitor<'a> {
                 | Pat::Ref { .. }
                 | Pat::Box { .. }
                 | Pat::Expr(..)
-                | Pat::ConstBlock(..) => {
-                    self.on_unsafe_op(current.into(), UnsafetyReason::UnionField)
-                }
+                | Pat::ConstBlock(..) => self.call_cb(current.into(), UnsafetyReason::UnionField),
                 // `Or` only wraps other patterns, and `Missing`/`Wild` do not constitute a read.
                 Pat::Missing | Pat::Wild | Pat::Or(_) => {}
             }
@@ -241,7 +188,9 @@ impl<'a> UnsafeVisitor<'a> {
         match expr {
             &Expr::Call { callee, .. } => {
                 if let Some(func) = self.infer[callee].as_fn_def(self.db) {
-                    self.check_call(current, func);
+                    if is_fn_unsafe_to_call(self.db, func, &self.def_target_features) {
+                        self.call_cb(current.into(), UnsafetyReason::UnsafeFnCall);
+                    }
                 }
             }
             Expr::Path(path) => {
@@ -267,13 +216,18 @@ impl<'a> UnsafeVisitor<'a> {
                 }
             }
             Expr::MethodCall { .. } => {
-                if let Some((func, _)) = self.infer.method_resolution(current) {
-                    self.check_call(current, func);
+                if self
+                    .infer
+                    .method_resolution(current)
+                    .map(|(func, _)| is_fn_unsafe_to_call(self.db, func, &self.def_target_features))
+                    .unwrap_or(false)
+                {
+                    self.call_cb(current.into(), UnsafetyReason::UnsafeFnCall);
                 }
             }
             Expr::UnaryOp { expr, op: UnaryOp::Deref } => {
                 if let TyKind::Raw(..) = &self.infer[*expr].kind(Interner) {
-                    self.on_unsafe_op(current.into(), UnsafetyReason::RawPtrDeref);
+                    self.call_cb(current.into(), UnsafetyReason::RawPtrDeref);
                 }
             }
             Expr::Unsafe { .. } => {
@@ -288,7 +242,7 @@ impl<'a> UnsafeVisitor<'a> {
                 self.walk_pats_top(std::iter::once(target), current);
                 self.inside_assignment = old_inside_assignment;
             }
-            Expr::InlineAsm(_) => self.on_unsafe_op(current.into(), UnsafetyReason::InlineAsm),
+            Expr::InlineAsm(_) => self.call_cb(current.into(), UnsafetyReason::InlineAsm),
             // rustc allows union assignment to propagate through field accesses and casts.
             Expr::Cast { .. } => self.inside_assignment = inside_assignment,
             Expr::Field { .. } => {
@@ -297,7 +251,7 @@ impl<'a> UnsafeVisitor<'a> {
                     if let Some(Either::Left(FieldId { parent: VariantId::UnionId(_), .. })) =
                         self.infer.field_resolution(current)
                     {
-                        self.on_unsafe_op(current.into(), UnsafetyReason::UnionField);
+                        self.call_cb(current.into(), UnsafetyReason::UnionField);
                     }
                 }
             }
@@ -332,9 +286,9 @@ impl<'a> UnsafeVisitor<'a> {
         if let Some(ResolveValueResult::ValueNs(ValueNs::StaticId(id), _)) = value_or_partial {
             let static_data = self.db.static_data(id);
             if static_data.mutable {
-                self.on_unsafe_op(node, UnsafetyReason::MutableStatic);
+                self.call_cb(node, UnsafetyReason::MutableStatic);
             } else if static_data.is_extern && !static_data.has_safe_kw {
-                self.on_unsafe_op(node, UnsafetyReason::ExternStatic);
+                self.call_cb(node, UnsafetyReason::ExternStatic);
             }
         }
     }
diff --git a/crates/hir-ty/src/infer.rs b/crates/hir-ty/src/infer.rs
index 1b2ef2aef3..3c258e3c4c 100644
--- a/crates/hir-ty/src/infer.rs
+++ b/crates/hir-ty/src/infer.rs
@@ -134,9 +134,6 @@ pub(crate) fn infer_query(db: &dyn HirDatabase, def: DefWithBodyId) -> Arc<Infer
                 .unwrap()
                 .0;
         }
-        DefWithBodyId::FieldId(f) => {
-            ctx.collect_field(f);
-        }
     }
 
     ctx.infer_body();
@@ -913,19 +910,6 @@ impl<'a> InferenceContext<'a> {
         self.return_ty = return_ty;
     }
 
-    fn collect_field(&mut self, field: FieldId) {
-        let variant_data = field.parent.variant_data(self.db.upcast());
-        let field_data = &variant_data.fields()[field.local_id];
-        let types_map = variant_data.types_map();
-        let return_ty =
-            self.make_ty(field_data.type_ref, types_map, InferenceTyDiagnosticSource::Signature);
-
-        // Field default value exprs might be defining usage sites of TAITs.
-        self.make_tait_coercion_table(iter::once(&return_ty));
-
-        self.return_ty = return_ty;
-    }
-
     fn collect_fn(&mut self, func: FunctionId) {
         let data = self.db.function_data(func);
         let mut param_tys =
diff --git a/crates/hir-ty/src/infer/closure.rs b/crates/hir-ty/src/infer/closure.rs
index 0e9aed4160..9283c46d0f 100644
--- a/crates/hir-ty/src/infer/closure.rs
+++ b/crates/hir-ty/src/infer/closure.rs
@@ -12,7 +12,7 @@ use hir_def::{
     data::adt::VariantData,
     hir::{
         Array, AsmOperand, BinaryOp, BindingId, CaptureBy, Expr, ExprId, ExprOrPatId, Pat, PatId,
-        Spread, Statement, UnaryOp,
+        Statement, UnaryOp,
     },
     lang_item::LangItem,
     path::Path,
@@ -796,7 +796,7 @@ impl InferenceContext<'_> {
                 self.consume_expr(expr);
             }
             Expr::RecordLit { fields, spread, .. } => {
-                if let &Spread::Base(expr) = spread {
+                if let &Some(expr) = spread {
                     self.consume_expr(expr);
                 }
                 self.consume_exprs(fields.iter().map(|it| it.expr));
diff --git a/crates/hir-ty/src/infer/expr.rs b/crates/hir-ty/src/infer/expr.rs
index 179565440c..b951443897 100644
--- a/crates/hir-ty/src/infer/expr.rs
+++ b/crates/hir-ty/src/infer/expr.rs
@@ -10,7 +10,7 @@ use either::Either;
 use hir_def::{
     hir::{
         ArithOp, Array, AsmOperand, AsmOptions, BinaryOp, ClosureKind, Expr, ExprId, ExprOrPatId,
-        LabelId, Literal, Pat, PatId, Spread, Statement, UnaryOp,
+        LabelId, Literal, Pat, PatId, Statement, UnaryOp,
     },
     lang_item::{LangItem, LangItemTarget},
     path::{GenericArg, GenericArgs, Path},
@@ -775,7 +775,7 @@ impl InferenceContext<'_> {
                         }
                     }
                 }
-                if let Spread::Base(expr) = spread {
+                if let Some(expr) = spread {
                     self.infer_expr(*expr, &Expectation::has_type(ty.clone()), ExprIsRead::Yes);
                 }
                 ty
@@ -1746,14 +1746,12 @@ impl InferenceContext<'_> {
                     });
                 }
                 TyKind::Adt(AdtId(hir_def::AdtId::StructId(s)), parameters) => {
-                    let vd = &self.db.struct_data(*s).variant_data;
-                    let local_id = vd.field(name)?;
+                    let local_id = self.db.struct_data(*s).variant_data.field(name)?;
                     let field = FieldId { parent: (*s).into(), local_id };
                     (field, parameters.clone())
                 }
                 TyKind::Adt(AdtId(hir_def::AdtId::UnionId(u)), parameters) => {
-                    let vd = &self.db.union_data(*u).variant_data;
-                    let local_id = vd.field(name)?;
+                    let local_id = self.db.union_data(*u).variant_data.field(name)?;
                     let field = FieldId { parent: (*u).into(), local_id };
                     (field, parameters.clone())
                 }
diff --git a/crates/hir-ty/src/infer/mutability.rs b/crates/hir-ty/src/infer/mutability.rs
index e95a425498..d74a383f44 100644
--- a/crates/hir-ty/src/infer/mutability.rs
+++ b/crates/hir-ty/src/infer/mutability.rs
@@ -4,8 +4,8 @@
 use chalk_ir::{cast::Cast, Mutability};
 use hir_def::{
     hir::{
-        Array, AsmOperand, BinaryOp, BindingAnnotation, Expr, ExprId, Pat, PatId, Spread,
-        Statement, UnaryOp,
+        Array, AsmOperand, BinaryOp, BindingAnnotation, Expr, ExprId, Pat, PatId, Statement,
+        UnaryOp,
     },
     lang_item::LangItem,
 };
@@ -122,11 +122,7 @@ impl InferenceContext<'_> {
                 self.infer_mut_expr(*expr, Mutability::Not);
             }
             Expr::RecordLit { path: _, fields, spread } => {
-                let spread_expr = match spread {
-                    Spread::Base(expr) => Some(*expr),
-                    _ => None,
-                };
-                self.infer_mut_not_expr_iter(fields.iter().map(|it| it.expr).chain(spread_expr))
+                self.infer_mut_not_expr_iter(fields.iter().map(|it| it.expr).chain(*spread))
             }
             &Expr::Index { base, index } => {
                 if mutability == Mutability::Mut {
diff --git a/crates/hir-ty/src/lib.rs b/crates/hir-ty/src/lib.rs
index 4b159b7541..37de501e98 100644
--- a/crates/hir-ty/src/lib.rs
+++ b/crates/hir-ty/src/lib.rs
@@ -100,9 +100,7 @@ pub use mapping::{
 };
 pub use method_resolution::check_orphan_rules;
 pub use traits::TraitEnvironment;
-pub use utils::{
-    all_super_traits, direct_super_traits, is_fn_unsafe_to_call, TargetFeatures, Unsafety,
-};
+pub use utils::{all_super_traits, direct_super_traits, is_fn_unsafe_to_call, TargetFeatures};
 pub use variance::Variance;
 
 pub use chalk_ir::{
diff --git a/crates/hir-ty/src/mir/lower.rs b/crates/hir-ty/src/mir/lower.rs
index 940d992001..cc6ed122af 100644
--- a/crates/hir-ty/src/mir/lower.rs
+++ b/crates/hir-ty/src/mir/lower.rs
@@ -9,7 +9,7 @@ use hir_def::{
     expr_store::{Body, HygieneId},
     hir::{
         ArithOp, Array, BinaryOp, BindingAnnotation, BindingId, ExprId, LabelId, Literal,
-        LiteralOrConst, MatchArm, Pat, PatId, RecordFieldPat, RecordLitField, Spread,
+        LiteralOrConst, MatchArm, Pat, PatId, RecordFieldPat, RecordLitField,
     },
     lang_item::{LangItem, LangItemTarget},
     path::Path,
@@ -825,14 +825,14 @@ impl<'ctx> MirLowerCtx<'ctx> {
             Expr::Yield { .. } => not_supported!("yield"),
             Expr::RecordLit { fields, path, spread } => {
                 let spread_place = match spread {
-                    &Spread::Base(it) => {
+                    &Some(it) => {
                         let Some((p, c)) = self.lower_expr_as_place(current, it, true)? else {
                             return Ok(None);
                         };
                         current = c;
                         Some(p)
                     }
-                    _ => None,
+                    None => None,
                 };
                 let variant_id =
                     self.infer.variant_resolution_for_expr(expr_id).ok_or_else(|| match path {
@@ -870,12 +870,12 @@ impl<'ctx> MirLowerCtx<'ctx> {
                                     .map(|(i, it)| match it {
                                         Some(it) => it,
                                         None => {
-                                            let local_id =
-                                                LocalFieldId::from_raw(RawIdx::from(i as u32));
                                             let p = sp.project(
                                                 ProjectionElem::Field(Either::Left(FieldId {
                                                     parent: variant_id,
-                                                    local_id,
+                                                    local_id: LocalFieldId::from_raw(RawIdx::from(
+                                                        i as u32,
+                                                    )),
                                                 })),
                                                 &mut self.result.projection_store,
                                             );
@@ -2130,10 +2130,6 @@ pub fn mir_body_query(db: &dyn HirDatabase, def: DefWithBodyId) -> Result<Arc<Mi
             db.enum_variant_data(it).name.display(db.upcast(), edition).to_string()
         }
         DefWithBodyId::InTypeConstId(it) => format!("in type const {it:?}"),
-        DefWithBodyId::FieldId(it) => it.parent.variant_data(db.upcast()).fields()[it.local_id]
-            .name
-            .display(db.upcast(), edition)
-            .to_string(),
     };
     let _p = tracing::info_span!("mir_body_query", ?detail).entered();
     let body = db.body(def);
diff --git a/crates/hir-ty/src/mir/pretty.rs b/crates/hir-ty/src/mir/pretty.rs
index 193b7bcd97..2a26101ac4 100644
--- a/crates/hir-ty/src/mir/pretty.rs
+++ b/crates/hir-ty/src/mir/pretty.rs
@@ -6,7 +6,7 @@ use std::{
 };
 
 use either::Either;
-use hir_def::{expr_store::Body, hir::BindingId, VariantId};
+use hir_def::{expr_store::Body, hir::BindingId};
 use hir_expand::{name::Name, Lookup};
 use la_arena::ArenaMap;
 use span::Edition;
@@ -79,38 +79,6 @@ impl MirBody {
             hir_def::DefWithBodyId::InTypeConstId(id) => {
                 w!(this, "in type const {id:?} = ");
             }
-            hir_def::DefWithBodyId::FieldId(id) => {
-                w!(this, "field ");
-                match id.parent {
-                    VariantId::EnumVariantId(it) => {
-                        let loc = it.lookup(db.upcast());
-                        let enum_loc = loc.parent.lookup(db.upcast());
-                        w!(
-                            this,
-                            "{}::{}",
-                            enum_loc.id.item_tree(db.upcast())[enum_loc.id.value]
-                                .name
-                                .display(db.upcast(), Edition::LATEST),
-                            loc.id.item_tree(db.upcast())[loc.id.value]
-                                .name
-                                .display(db.upcast(), Edition::LATEST),
-                        );
-                    }
-                    VariantId::StructId(id) => {
-                        id.lookup(db.upcast()).id.resolved(db.upcast(), |it| {
-                            w!(this, "{}", it.name.display(db.upcast(), Edition::LATEST));
-                        });
-                    }
-                    VariantId::UnionId(id) => {
-                        id.lookup(db.upcast()).id.resolved(db.upcast(), |it| {
-                            w!(this, "{}", it.name.display(db.upcast(), Edition::LATEST));
-                        });
-                    }
-                };
-                let variant_data = id.parent.variant_data(db.upcast());
-                let field_name = &variant_data.fields()[id.local_id].name;
-                w!(this, ".{}: _ = ", field_name.display(db.upcast(), Edition::LATEST));
-            }
         });
         ctx.result
     }
diff --git a/crates/hir-ty/src/utils.rs b/crates/hir-ty/src/utils.rs
index c131e97bc4..ffd0b5b5e2 100644
--- a/crates/hir-ty/src/utils.rs
+++ b/crates/hir-ty/src/utils.rs
@@ -24,7 +24,6 @@ use intern::{sym, Symbol};
 use rustc_abi::TargetDataLayout;
 use rustc_hash::FxHashSet;
 use smallvec::{smallvec, SmallVec};
-use span::Edition;
 use stdx::never;
 
 use crate::{
@@ -293,38 +292,21 @@ impl TargetFeatures {
     }
 }
 
-#[derive(Debug, Clone, Copy, PartialEq, Eq)]
-pub enum Unsafety {
-    Safe,
-    Unsafe,
-    /// A lint.
-    DeprecatedSafe2024,
-}
-
 pub fn is_fn_unsafe_to_call(
     db: &dyn HirDatabase,
     func: FunctionId,
     caller_target_features: &TargetFeatures,
-    call_edition: Edition,
-) -> Unsafety {
+) -> bool {
     let data = db.function_data(func);
     if data.is_unsafe() {
-        return Unsafety::Unsafe;
+        return true;
     }
 
     if data.has_target_feature() {
         // RFC 2396 <https://rust-lang.github.io/rfcs/2396-target-feature-1.1.html>.
         let callee_target_features = TargetFeatures::from_attrs(&db.attrs(func.into()));
         if !caller_target_features.enabled.is_superset(&callee_target_features.enabled) {
-            return Unsafety::Unsafe;
-        }
-    }
-
-    if data.is_deprecated_safe_2024() {
-        if call_edition.at_least_2024() {
-            return Unsafety::Unsafe;
-        } else {
-            return Unsafety::DeprecatedSafe2024;
+            return true;
         }
     }
 
@@ -337,22 +319,14 @@ pub fn is_fn_unsafe_to_call(
             if is_intrinsic_block {
                 // legacy intrinsics
                 // extern "rust-intrinsic" intrinsics are unsafe unless they have the rustc_safe_intrinsic attribute
-                if db.attrs(func.into()).by_key(&sym::rustc_safe_intrinsic).exists() {
-                    Unsafety::Safe
-                } else {
-                    Unsafety::Unsafe
-                }
+                !db.attrs(func.into()).by_key(&sym::rustc_safe_intrinsic).exists()
             } else {
                 // Function in an `extern` block are always unsafe to call, except when
                 // it is marked as `safe`.
-                if data.is_safe() {
-                    Unsafety::Safe
-                } else {
-                    Unsafety::Unsafe
-                }
+                !data.is_safe()
             }
         }
-        _ => Unsafety::Safe,
+        _ => false,
     }
 }
 
diff --git a/crates/hir/src/diagnostics.rs b/crates/hir/src/diagnostics.rs
index 64e982c42d..066a322e32 100644
--- a/crates/hir/src/diagnostics.rs
+++ b/crates/hir/src/diagnostics.rs
@@ -271,17 +271,11 @@ pub struct PrivateField {
     pub field: Field,
 }
 
-#[derive(Debug, Clone, Copy, PartialEq, Eq)]
-pub enum UnsafeLint {
-    HardError,
-    UnsafeOpInUnsafeFn,
-    DeprecatedSafe2024,
-}
-
 #[derive(Debug)]
 pub struct MissingUnsafe {
     pub node: InFile<AstPtr<Either<ast::Expr, ast::Pat>>>,
-    pub lint: UnsafeLint,
+    /// If true, the diagnostics is an `unsafe_op_in_unsafe_fn` lint instead of a hard error.
+    pub only_lint: bool,
     pub reason: UnsafetyReason,
 }
 
diff --git a/crates/hir/src/display.rs b/crates/hir/src/display.rs
index 6f4168ab08..6f40497055 100644
--- a/crates/hir/src/display.rs
+++ b/crates/hir/src/display.rs
@@ -82,7 +82,7 @@ impl HirDisplay for Function {
         }
         // FIXME: This will show `unsafe` for functions that are `#[target_feature]` but not unsafe
         // (they are conditionally unsafe to call). We probably should show something else.
-        if self.is_unsafe_to_call(db, None, f.edition()) {
+        if self.is_unsafe_to_call(db, None) {
             f.write_str("unsafe ")?;
         }
         if let Some(abi) = &data.abi {
diff --git a/crates/hir/src/from_id.rs b/crates/hir/src/from_id.rs
index dd26e894d7..537401afdc 100644
--- a/crates/hir/src/from_id.rs
+++ b/crates/hir/src/from_id.rs
@@ -147,7 +147,6 @@ impl From<DefWithBody> for DefWithBodyId {
             DefWithBody::Const(it) => DefWithBodyId::ConstId(it.id),
             DefWithBody::Variant(it) => DefWithBodyId::VariantId(it.into()),
             DefWithBody::InTypeConst(it) => DefWithBodyId::InTypeConstId(it.id),
-            DefWithBody::Field(it) => DefWithBodyId::FieldId(it.into()),
         }
     }
 }
@@ -160,7 +159,6 @@ impl From<DefWithBodyId> for DefWithBody {
             DefWithBodyId::ConstId(it) => DefWithBody::Const(it.into()),
             DefWithBodyId::VariantId(it) => DefWithBody::Variant(it.into()),
             DefWithBodyId::InTypeConstId(it) => DefWithBody::InTypeConst(it.into()),
-            DefWithBodyId::FieldId(it) => DefWithBody::Field(it.into()),
         }
     }
 }
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index b414ef0d71..27723cbc16 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -415,28 +415,6 @@ impl ModuleDef {
             def.diagnostics(db, &mut acc);
         }
 
-        let vd: Option<(VariantDef, Arc<VariantData>)> = match self {
-            ModuleDef::Adt(Adt::Struct(it)) => {
-                Some((it.into(), db.struct_data(it.id).variant_data.clone()))
-            }
-            ModuleDef::Adt(Adt::Union(it)) => {
-                Some((it.into(), db.union_data(it.id).variant_data.clone()))
-            }
-            ModuleDef::Variant(it) => {
-                Some((it.into(), db.enum_variant_data(it.id).variant_data.clone()))
-            }
-            _ => None,
-        };
-        if let Some((parent, vd)) = vd {
-            for (id, fd) in vd.fields().iter() {
-                if !fd.has_default {
-                    continue;
-                }
-                let def: DefWithBody = DefWithBody::Field(Field { parent, id });
-                def.diagnostics(db, &mut acc, style_lints);
-            }
-        }
-
         acc
     }
 
@@ -1248,12 +1226,6 @@ impl HasVisibility for Module {
     }
 }
 
-impl From<&Field> for DefWithBodyId {
-    fn from(&f: &Field) -> Self {
-        DefWithBodyId::FieldId(f.into())
-    }
-}
-
 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
 pub struct Field {
     pub(crate) parent: VariantDef,
@@ -1319,10 +1291,6 @@ impl AstNode for FieldSource {
 }
 
 impl Field {
-    pub fn module(self, db: &dyn HirDatabase) -> Module {
-        self.parent.module(db)
-    }
-
     pub fn name(&self, db: &dyn HirDatabase) -> Name {
         self.parent.variant_data(db).fields()[self.id].name.clone()
     }
@@ -1385,14 +1353,6 @@ impl Field {
     pub fn parent_def(&self, _db: &dyn HirDatabase) -> VariantDef {
         self.parent
     }
-
-    pub fn default_value_source(
-        &self,
-        db: &dyn HirDatabase,
-    ) -> Option<InFileWrapper<HirFileId, ast::Expr>> {
-        let id: hir_def::FieldId = (*self).into();
-        id.record_field_source(db.upcast()).map(|it| it.and_then(|it| it.expr())).transpose()
-    }
 }
 
 impl HasVisibility for Field {
@@ -1829,9 +1789,8 @@ pub enum DefWithBody {
     Const(Const),
     Variant(Variant),
     InTypeConst(InTypeConst),
-    Field(Field),
 }
-impl_from!(Function, Const, Static, Variant, InTypeConst, Field for DefWithBody);
+impl_from!(Function, Const, Static, Variant, InTypeConst for DefWithBody);
 
 impl DefWithBody {
     pub fn module(self, db: &dyn HirDatabase) -> Module {
@@ -1841,7 +1800,6 @@ impl DefWithBody {
             DefWithBody::Static(s) => s.module(db),
             DefWithBody::Variant(v) => v.module(db),
             DefWithBody::InTypeConst(c) => c.module(db),
-            DefWithBody::Field(f) => f.module(db),
         }
     }
 
@@ -1852,7 +1810,6 @@ impl DefWithBody {
             DefWithBody::Const(c) => c.name(db),
             DefWithBody::Variant(v) => Some(v.name(db)),
             DefWithBody::InTypeConst(_) => None,
-            DefWithBody::Field(f) => Some(f.name(db)),
         }
     }
 
@@ -1868,7 +1825,6 @@ impl DefWithBody {
                 &DefWithBodyId::from(it.id).resolver(db.upcast()),
                 TyKind::Error.intern(Interner),
             ),
-            DefWithBody::Field(it) => it.ty(db),
         }
     }
 
@@ -1879,7 +1835,6 @@ impl DefWithBody {
             DefWithBody::Const(it) => it.id.into(),
             DefWithBody::Variant(it) => it.into(),
             DefWithBody::InTypeConst(it) => it.id.into(),
-            DefWithBody::Field(it) => it.into(),
         }
     }
 
@@ -1925,23 +1880,6 @@ impl DefWithBody {
                 item_tree_source_maps.konst(konst.value)
             }
             DefWithBody::Variant(_) | DefWithBody::InTypeConst(_) => &TypesSourceMap::EMPTY,
-            DefWithBody::Field(field) => match field.parent {
-                VariantDef::Struct(strukt) => {
-                    let strukt = strukt.id.lookup(db.upcast()).id;
-                    item_tree_source_maps = strukt.item_tree_with_source_map(db.upcast()).1;
-                    item_tree_source_maps.strukt(strukt.value).item()
-                }
-                VariantDef::Union(union) => {
-                    let union = union.id.lookup(db.upcast()).id;
-                    item_tree_source_maps = union.item_tree_with_source_map(db.upcast()).1;
-                    item_tree_source_maps.union(union.value).item()
-                }
-                VariantDef::Variant(variant) => {
-                    let variant = variant.id.lookup(db.upcast()).id;
-                    item_tree_source_maps = variant.item_tree_with_source_map(db.upcast()).1;
-                    item_tree_source_maps.variant(variant.value)
-                }
-            },
         };
 
         for (_, def_map) in body.blocks(db.upcast()) {
@@ -2040,40 +1978,16 @@ impl DefWithBody {
             );
         }
 
-        let missing_unsafe = hir_ty::diagnostics::missing_unsafe(db, self.into());
-        for (node, reason) in missing_unsafe.unsafe_exprs {
+        let (unsafe_exprs, only_lint) = hir_ty::diagnostics::missing_unsafe(db, self.into());
+        for (node, reason) in unsafe_exprs {
             match source_map.expr_or_pat_syntax(node) {
-                Ok(node) => acc.push(
-                    MissingUnsafe {
-                        node,
-                        lint: if missing_unsafe.fn_is_unsafe {
-                            UnsafeLint::UnsafeOpInUnsafeFn
-                        } else {
-                            UnsafeLint::HardError
-                        },
-                        reason,
-                    }
-                    .into(),
-                ),
+                Ok(node) => acc.push(MissingUnsafe { node, only_lint, reason }.into()),
                 Err(SyntheticSyntax) => {
                     // FIXME: Here and elsewhere in this file, the `expr` was
                     // desugared, report or assert that this doesn't happen.
                 }
             }
         }
-        for node in missing_unsafe.deprecated_safe_calls {
-            match source_map.expr_syntax(node) {
-                Ok(node) => acc.push(
-                    MissingUnsafe {
-                        node: node.map(|it| it.wrap_left()),
-                        lint: UnsafeLint::DeprecatedSafe2024,
-                        reason: UnsafetyReason::UnsafeFnCall,
-                    }
-                    .into(),
-                ),
-                Err(SyntheticSyntax) => never!("synthetic DeprecatedSafe2024"),
-            }
-        }
 
         if let Ok(borrowck_results) = db.borrowck(self.into()) {
             for borrowck_result in borrowck_results.iter() {
@@ -2197,8 +2111,8 @@ impl DefWithBody {
             DefWithBody::Static(it) => it.into(),
             DefWithBody::Const(it) => it.into(),
             DefWithBody::Variant(it) => it.into(),
-            // FIXME: don't ignore diagnostics for in type const and default field value exprs
-            DefWithBody::InTypeConst(_) | DefWithBody::Field(_) => return,
+            // FIXME: don't ignore diagnostics for in type const
+            DefWithBody::InTypeConst(_) => return,
         };
         for diag in hir_ty::diagnostics::incorrect_case(db, def.into()) {
             acc.push(diag.into())
@@ -2449,19 +2363,11 @@ impl Function {
         db.attrs(self.id.into()).is_unstable()
     }
 
-    pub fn is_unsafe_to_call(
-        self,
-        db: &dyn HirDatabase,
-        caller: Option<Function>,
-        call_edition: Edition,
-    ) -> bool {
+    pub fn is_unsafe_to_call(self, db: &dyn HirDatabase, caller: Option<Function>) -> bool {
         let target_features = caller
             .map(|caller| hir_ty::TargetFeatures::from_attrs(&db.attrs(caller.id.into())))
             .unwrap_or_default();
-        matches!(
-            hir_ty::is_fn_unsafe_to_call(db, self.id, &target_features, call_edition),
-            hir_ty::Unsafety::Unsafe
-        )
+        hir_ty::is_fn_unsafe_to_call(db, self.id, &target_features)
     }
 
     /// Whether this function declaration has a definition.
@@ -3331,10 +3237,7 @@ impl AsAssocItem for DefWithBody {
         match self {
             DefWithBody::Function(it) => it.as_assoc_item(db),
             DefWithBody::Const(it) => it.as_assoc_item(db),
-            DefWithBody::Static(_)
-            | DefWithBody::Variant(_)
-            | DefWithBody::InTypeConst(_)
-            | DefWithBody::Field(_) => None,
+            DefWithBody::Static(_) | DefWithBody::Variant(_) | DefWithBody::InTypeConst(_) => None,
         }
     }
 }
diff --git a/crates/hir/src/source_analyzer.rs b/crates/hir/src/source_analyzer.rs
index 7d6f110181..496b6566bd 100644
--- a/crates/hir/src/source_analyzer.rs
+++ b/crates/hir/src/source_analyzer.rs
@@ -630,8 +630,7 @@ impl SourceAnalyzer {
         let (adt, subst) = self.infer.as_ref()?.type_of_expr_or_pat(expr_id)?.as_adt()?;
         let variant = self.infer.as_ref()?.variant_resolution_for_expr_or_pat(expr_id)?;
         let variant_data = variant.variant_data(db.upcast());
-        let local_id = variant_data.field(&local_name)?;
-        let field = FieldId { parent: variant, local_id };
+        let field = FieldId { parent: variant, local_id: variant_data.field(&local_name)? };
         let field_ty =
             db.field_types(variant).get(field.local_id)?.clone().substitute(Interner, subst);
         Some((
@@ -652,8 +651,7 @@ impl SourceAnalyzer {
         let pat_id = self.pat_id(&record_pat.into())?;
         let variant = self.infer.as_ref()?.variant_resolution_for_pat(pat_id)?;
         let variant_data = variant.variant_data(db.upcast());
-        let local_id = variant_data.field(&field_name)?;
-        let field = FieldId { parent: variant, local_id };
+        let field = FieldId { parent: variant, local_id: variant_data.field(&field_name)? };
         let (adt, subst) = self.infer.as_ref()?.type_of_pat.get(pat_id)?.as_adt()?;
         let field_ty =
             db.field_types(variant).get(field.local_id)?.clone().substitute(Interner, subst);
@@ -1025,7 +1023,7 @@ impl SourceAnalyzer {
         let expr_id = self.expr_id(db, &literal.clone().into())?;
         let substs = infer[expr_id].as_adt()?.1;
 
-        let (variant, missing_fields, _) = match expr_id {
+        let (variant, missing_fields, _exhaustive) = match expr_id {
             ExprOrPatId::ExprId(expr_id) => {
                 record_literal_missing_fields(db, infer, expr_id, &body[expr_id])?
             }
@@ -1107,9 +1105,16 @@ impl SourceAnalyzer {
             if let Some(expanded_expr) = sm.macro_expansion_expr(macro_expr) {
                 let mut is_unsafe = false;
                 let mut walk_expr = |expr_id| {
-                    unsafe_expressions(db, infer, *def, body, expr_id, &mut |inside_unsafe_block| {
-                        is_unsafe |= inside_unsafe_block == InsideUnsafeBlock::No
-                    })
+                    unsafe_expressions(
+                        db,
+                        infer,
+                        *def,
+                        body,
+                        expr_id,
+                        &mut |_, inside_unsafe_block, _| {
+                            is_unsafe |= inside_unsafe_block == InsideUnsafeBlock::No
+                        },
+                    )
                 };
                 match expanded_expr {
                     ExprOrPatId::ExprId(expanded_expr) => walk_expr(expanded_expr),
diff --git a/crates/hir/src/term_search/tactics.rs b/crates/hir/src/term_search/tactics.rs
index 847304d503..1ff9b6dec9 100644
--- a/crates/hir/src/term_search/tactics.rs
+++ b/crates/hir/src/term_search/tactics.rs
@@ -15,7 +15,6 @@ use hir_ty::mir::BorrowKind;
 use hir_ty::TyBuilder;
 use itertools::Itertools;
 use rustc_hash::FxHashSet;
-use span::Edition;
 
 use crate::{
     Adt, AssocItem, GenericDef, GenericParam, HasAttrs, HasVisibility, Impl, ModuleDef, ScopeDef,
@@ -366,7 +365,7 @@ pub(super) fn free_function<'a, DB: HirDatabase>(
                         let ret_ty = it.ret_type_with_args(db, generics.iter().cloned());
                         // Filter out private and unsafe functions
                         if !it.is_visible_from(db, module)
-                            || it.is_unsafe_to_call(db, None, Edition::CURRENT_FIXME)
+                            || it.is_unsafe_to_call(db, None)
                             || it.is_unstable(db)
                             || ctx.config.enable_borrowcheck && ret_ty.contains_reference(db)
                             || ret_ty.is_raw_ptr()
@@ -472,7 +471,7 @@ pub(super) fn impl_method<'a, DB: HirDatabase>(
 
             // Filter out private and unsafe functions
             if !it.is_visible_from(db, module)
-                || it.is_unsafe_to_call(db, None, Edition::CURRENT_FIXME)
+                || it.is_unsafe_to_call(db, None)
                 || it.is_unstable(db)
             {
                 return None;
@@ -663,7 +662,7 @@ pub(super) fn impl_static_method<'a, DB: HirDatabase>(
 
             // Filter out private and unsafe functions
             if !it.is_visible_from(db, module)
-                || it.is_unsafe_to_call(db, None, Edition::CURRENT_FIXME)
+                || it.is_unsafe_to_call(db, None)
                 || it.is_unstable(db)
             {
                 return None;
diff --git a/crates/ide-completion/src/render/function.rs b/crates/ide-completion/src/render/function.rs
index fd90613964..4931f8d090 100644
--- a/crates/ide-completion/src/render/function.rs
+++ b/crates/ide-completion/src/render/function.rs
@@ -320,7 +320,7 @@ fn detail(ctx: &CompletionContext<'_>, func: hir::Function, edition: Edition) ->
             ret_ty = async_ret;
         }
     }
-    if func.is_unsafe_to_call(ctx.db, ctx.containing_function, ctx.edition) {
+    if func.is_unsafe_to_call(ctx.db, ctx.containing_function) {
         format_to!(detail, "unsafe ");
     }
 
diff --git a/crates/ide-db/src/defs.rs b/crates/ide-db/src/defs.rs
index 6925880ba9..bad5360805 100644
--- a/crates/ide-db/src/defs.rs
+++ b/crates/ide-db/src/defs.rs
@@ -972,7 +972,6 @@ impl TryFrom<DefWithBody> for Definition {
             DefWithBody::Const(it) => Ok(it.into()),
             DefWithBody::Variant(it) => Ok(it.into()),
             DefWithBody::InTypeConst(_) => Err(()),
-            DefWithBody::Field(it) => Ok(it.into()),
         }
     }
 }
diff --git a/crates/ide-db/src/search.rs b/crates/ide-db/src/search.rs
index d2a237a5c0..7963e8ae4f 100644
--- a/crates/ide-db/src/search.rs
+++ b/crates/ide-db/src/search.rs
@@ -310,9 +310,6 @@ impl Definition {
                 DefWithBody::Variant(v) => v.source(db).map(|src| src.syntax().cloned()),
                 // FIXME: implement
                 DefWithBody::InTypeConst(_) => return SearchScope::empty(),
-                DefWithBody::Field(f) => {
-                    f.default_value_source(db).map(|src| src.syntax().cloned())
-                }
             };
             return match def {
                 Some(def) => SearchScope::file_range(
@@ -330,9 +327,6 @@ impl Definition {
                 DefWithBody::Variant(v) => v.source(db).map(|src| src.syntax().cloned()),
                 // FIXME: implement
                 DefWithBody::InTypeConst(_) => return SearchScope::empty(),
-                DefWithBody::Field(f) => {
-                    f.default_value_source(db).map(|src| src.syntax().cloned())
-                }
             };
             return match def {
                 Some(def) => SearchScope::file_range(
diff --git a/crates/ide-diagnostics/src/handlers/missing_fields.rs b/crates/ide-diagnostics/src/handlers/missing_fields.rs
index c495df9daa..938b7182bc 100644
--- a/crates/ide-diagnostics/src/handlers/missing_fields.rs
+++ b/crates/ide-diagnostics/src/handlers/missing_fields.rs
@@ -846,35 +846,4 @@ pub struct Claims {
         "#,
         );
     }
-
-    #[test]
-    fn default_field_values() {
-        check_diagnostics(
-            r#"
-struct F {
-    field1: i32 = 4,
-    field2: bool,
-}
-
-fn f() {
-    let _f = F {
-        field2: true,
-        ..
-    };
-
-    let _f = F {
-           //^ 💡 error: missing structure fields:
-           //| - field1
-        field2: true,
-    };
-
-    let _f = F {
-           //^ 💡 error: missing structure fields:
-           //| - field2
-        ..
-    };
-}
-"#,
-        );
-    }
 }
diff --git a/crates/ide-diagnostics/src/handlers/missing_unsafe.rs b/crates/ide-diagnostics/src/handlers/missing_unsafe.rs
index d48464769c..cea8bc5e95 100644
--- a/crates/ide-diagnostics/src/handlers/missing_unsafe.rs
+++ b/crates/ide-diagnostics/src/handlers/missing_unsafe.rs
@@ -1,5 +1,5 @@
 use hir::db::ExpandDatabase;
-use hir::{HirFileIdExt, UnsafeLint, UnsafetyReason};
+use hir::{HirFileIdExt, UnsafetyReason};
 use ide_db::text_edit::TextEdit;
 use ide_db::{assists::Assist, source_change::SourceChange};
 use syntax::{ast, SyntaxNode};
@@ -11,10 +11,10 @@ use crate::{fix, Diagnostic, DiagnosticCode, DiagnosticsContext};
 //
 // This diagnostic is triggered if an operation marked as `unsafe` is used outside of an `unsafe` function or block.
 pub(crate) fn missing_unsafe(ctx: &DiagnosticsContext<'_>, d: &hir::MissingUnsafe) -> Diagnostic {
-    let code = match d.lint {
-        UnsafeLint::HardError => DiagnosticCode::RustcHardError("E0133"),
-        UnsafeLint::UnsafeOpInUnsafeFn => DiagnosticCode::RustcLint("unsafe_op_in_unsafe_fn"),
-        UnsafeLint::DeprecatedSafe2024 => DiagnosticCode::RustcLint("deprecated_safe_2024"),
+    let code = if d.only_lint {
+        DiagnosticCode::RustcLint("unsafe_op_in_unsafe_fn")
+    } else {
+        DiagnosticCode::RustcHardError("E0133")
     };
     let operation = display_unsafety_reason(d.reason);
     Diagnostic::new_with_syntax_node_ptr(
@@ -585,58 +585,24 @@ fn main() {
             r#"
 //- /ed2021.rs crate:ed2021 edition:2021
 #[rustc_deprecated_safe_2024]
-unsafe fn deprecated_safe() -> u8 {
+unsafe fn safe() -> u8 {
     0
 }
-
 //- /ed2024.rs crate:ed2024 edition:2024
 #[rustc_deprecated_safe_2024]
-unsafe fn deprecated_safe() -> u8 {
+unsafe fn not_safe() -> u8 {
     0
 }
-
-//- /dep1.rs crate:dep1 deps:ed2021,ed2024 edition:2021
-fn main() {
-    ed2021::deprecated_safe();
-    ed2024::deprecated_safe();
-}
-
-//- /dep2.rs crate:dep2 deps:ed2021,ed2024 edition:2024
-fn main() {
-    ed2021::deprecated_safe();
- // ^^^^^^^^^^^^^^^^^^^^^^^^^💡 error: call to unsafe function is unsafe and requires an unsafe function or block
-    ed2024::deprecated_safe();
- // ^^^^^^^^^^^^^^^^^^^^^^^^^💡 error: call to unsafe function is unsafe and requires an unsafe function or block
-}
-
-//- /dep3.rs crate:dep3 deps:ed2021,ed2024 edition:2021
-#![warn(deprecated_safe)]
-
+//- /main.rs crate:main deps:ed2021,ed2024
 fn main() {
-    ed2021::deprecated_safe();
- // ^^^^^^^^^^^^^^^^^^^^^^^^^💡 warn: call to unsafe function is unsafe and requires an unsafe function or block
-    ed2024::deprecated_safe();
- // ^^^^^^^^^^^^^^^^^^^^^^^^^💡 warn: call to unsafe function is unsafe and requires an unsafe function or block
+    ed2021::safe();
+    ed2024::not_safe();
+  //^^^^^^^^^^^^^^^^^^💡 error: call to unsafe function is unsafe and requires an unsafe function or block
 }
             "#,
         )
     }
 
-    #[test]
-    fn orphan_unsafe_format_args() {
-        // Checks that we don't place orphan arguments for formatting under an unsafe block.
-        check_diagnostics(
-            r#"
-//- minicore: fmt
-fn foo() {
-    let p = 0xDEADBEEF as *const i32;
-    format_args!("", *p);
-                  // ^^ error: dereference of raw pointer is unsafe and requires an unsafe function or block
-}
-        "#,
-        );
-    }
-
     #[test]
     fn unsafe_op_in_unsafe_fn_allowed_by_default_in_edition_2021() {
         check_diagnostics(
diff --git a/crates/ide-diagnostics/src/handlers/type_mismatch.rs b/crates/ide-diagnostics/src/handlers/type_mismatch.rs
index 7bc1be3822..56afb38cc8 100644
--- a/crates/ide-diagnostics/src/handlers/type_mismatch.rs
+++ b/crates/ide-diagnostics/src/handlers/type_mismatch.rs
@@ -1232,21 +1232,6 @@ fn f() {
     let (_, _, _, ..) = (true, 42);
      // ^^^^^^^^^^^^^ error: expected (bool, i32), found (bool, i32, {unknown})
 }
-"#,
-        );
-    }
-
-    #[test]
-    fn diagnostics_inside_field_default_expr() {
-        check_diagnostics(
-            r#"
-struct Foo {
-    foo: i32 = {
-        let x = false;
-        x
-     // ^ error: expected i32, found bool
-    },
-}
 "#,
         );
     }
diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs
index 95f2bf1139..f53f0aec09 100644
--- a/crates/ide/src/syntax_highlighting.rs
+++ b/crates/ide/src/syntax_highlighting.rs
@@ -478,15 +478,7 @@ fn traverse(
                     {
                         continue;
                     }
-                    highlight_format_string(
-                        hl,
-                        sema,
-                        krate,
-                        &string,
-                        &expanded_string,
-                        range,
-                        file_id.edition(),
-                    );
+                    highlight_format_string(hl, sema, krate, &string, &expanded_string, range);
 
                     if !string.is_raw() {
                         highlight_escape_string(hl, &string, range.start());
@@ -534,7 +526,6 @@ fn traverse(
                 &mut bindings_shadow_count,
                 config.syntactic_name_ref_highlighting,
                 name_like,
-                file_id.edition(),
             ),
             NodeOrToken::Token(token) => {
                 highlight::token(sema, token, file_id.edition()).zip(Some(None))
diff --git a/crates/ide/src/syntax_highlighting/format.rs b/crates/ide/src/syntax_highlighting/format.rs
index 43a6bdad7e..7234108701 100644
--- a/crates/ide/src/syntax_highlighting/format.rs
+++ b/crates/ide/src/syntax_highlighting/format.rs
@@ -4,7 +4,6 @@ use ide_db::{
     syntax_helpers::format_string::{is_format_string, lex_format_specifiers, FormatSpecifier},
     SymbolKind,
 };
-use span::Edition;
 use syntax::{ast, TextRange};
 
 use crate::{
@@ -19,7 +18,6 @@ pub(super) fn highlight_format_string(
     string: &ast::String,
     expanded_string: &ast::String,
     range: TextRange,
-    edition: Edition,
 ) {
     if is_format_string(expanded_string) {
         // FIXME: Replace this with the HIR info we have now.
@@ -41,7 +39,7 @@ pub(super) fn highlight_format_string(
             if let Some(res) = res {
                 stack.add(HlRange {
                     range,
-                    highlight: highlight_def(sema, krate, Definition::from(res), edition),
+                    highlight: highlight_def(sema, krate, Definition::from(res)),
                     binding_hash: None,
                 })
             }
diff --git a/crates/ide/src/syntax_highlighting/highlight.rs b/crates/ide/src/syntax_highlighting/highlight.rs
index 479c0b381a..a0c8b28568 100644
--- a/crates/ide/src/syntax_highlighting/highlight.rs
+++ b/crates/ide/src/syntax_highlighting/highlight.rs
@@ -58,7 +58,6 @@ pub(super) fn name_like(
     bindings_shadow_count: &mut FxHashMap<hir::Name, u32>,
     syntactic_name_ref_highlighting: bool,
     name_like: ast::NameLike,
-    edition: Edition,
 ) -> Option<(Highlight, Option<u64>)> {
     let mut binding_hash = None;
     let highlight = match name_like {
@@ -69,17 +68,16 @@ pub(super) fn name_like(
             &mut binding_hash,
             syntactic_name_ref_highlighting,
             name_ref,
-            edition,
         ),
         ast::NameLike::Name(name) => {
-            highlight_name(sema, bindings_shadow_count, &mut binding_hash, krate, name, edition)
+            highlight_name(sema, bindings_shadow_count, &mut binding_hash, krate, name)
         }
         ast::NameLike::Lifetime(lifetime) => match IdentClass::classify_lifetime(sema, &lifetime) {
             Some(IdentClass::NameClass(NameClass::Definition(def))) => {
-                highlight_def(sema, krate, def, edition) | HlMod::Definition
+                highlight_def(sema, krate, def) | HlMod::Definition
             }
             Some(IdentClass::NameRefClass(NameRefClass::Definition(def, _))) => {
-                highlight_def(sema, krate, def, edition)
+                highlight_def(sema, krate, def)
             }
             // FIXME: Fallback for 'static and '_, as we do not resolve these yet
             _ => SymbolKind::LifetimeParam.into(),
@@ -236,17 +234,16 @@ fn highlight_name_ref(
     binding_hash: &mut Option<u64>,
     syntactic_name_ref_highlighting: bool,
     name_ref: ast::NameRef,
-    edition: Edition,
 ) -> Highlight {
     let db = sema.db;
-    if let Some(res) = highlight_method_call_by_name_ref(sema, krate, &name_ref, edition) {
+    if let Some(res) = highlight_method_call_by_name_ref(sema, krate, &name_ref) {
         return res;
     }
 
     let name_class = match NameRefClass::classify(sema, &name_ref) {
         Some(name_kind) => name_kind,
         None if syntactic_name_ref_highlighting => {
-            return highlight_name_ref_by_syntax(name_ref, sema, krate, edition)
+            return highlight_name_ref_by_syntax(name_ref, sema, krate)
         }
         // FIXME: This is required for helper attributes used by proc-macros, as those do not map down
         // to anything when used.
@@ -270,7 +267,7 @@ fn highlight_name_ref(
                 *binding_hash = Some(calc_binding_hash(&name, *shadow_count))
             };
 
-            let mut h = highlight_def(sema, krate, def, edition);
+            let mut h = highlight_def(sema, krate, def);
 
             match def {
                 Definition::Local(local) if is_consumed_lvalue(name_ref.syntax(), &local, db) => {
@@ -308,7 +305,7 @@ fn highlight_name_ref(
             h
         }
         NameRefClass::FieldShorthand { field_ref, .. } => {
-            highlight_def(sema, krate, field_ref.into(), edition)
+            highlight_def(sema, krate, field_ref.into())
         }
         NameRefClass::ExternCrateShorthand { decl, krate: resolved_krate } => {
             let mut h = HlTag::Symbol(SymbolKind::Module).into();
@@ -344,7 +341,6 @@ fn highlight_name(
     binding_hash: &mut Option<u64>,
     krate: hir::Crate,
     name: ast::Name,
-    edition: Edition,
 ) -> Highlight {
     let name_kind = NameClass::classify(sema, &name);
     if let Some(NameClass::Definition(Definition::Local(local))) = &name_kind {
@@ -355,7 +351,7 @@ fn highlight_name(
     };
     match name_kind {
         Some(NameClass::Definition(def)) => {
-            let mut h = highlight_def(sema, krate, def, edition) | HlMod::Definition;
+            let mut h = highlight_def(sema, krate, def) | HlMod::Definition;
             if let Definition::Trait(trait_) = &def {
                 if trait_.is_unsafe(sema.db) {
                     h |= HlMod::Unsafe;
@@ -363,7 +359,7 @@ fn highlight_name(
             }
             h
         }
-        Some(NameClass::ConstReference(def)) => highlight_def(sema, krate, def, edition),
+        Some(NameClass::ConstReference(def)) => highlight_def(sema, krate, def),
         Some(NameClass::PatFieldShorthand { field_ref, .. }) => {
             let mut h = HlTag::Symbol(SymbolKind::Field).into();
             if let hir::VariantDef::Union(_) = field_ref.parent_def(sema.db) {
@@ -383,7 +379,6 @@ pub(super) fn highlight_def(
     sema: &Semantics<'_, RootDatabase>,
     krate: hir::Crate,
     def: Definition,
-    edition: Edition,
 ) -> Highlight {
     let db = sema.db;
     let mut h = match def {
@@ -436,8 +431,7 @@ pub(super) fn highlight_def(
             // highlighted as unsafe, even when the current target features set is a superset (RFC 2396).
             // We probably should consider checking the current function, but I found no easy way to do
             // that (also I'm worried about perf). There's also an instance below.
-            // FIXME: This should be the edition of the call.
-            if func.is_unsafe_to_call(db, None, edition) {
+            if func.is_unsafe_to_call(db, None) {
                 h |= HlMod::Unsafe;
             }
             if func.is_async(db) {
@@ -585,23 +579,21 @@ fn highlight_method_call_by_name_ref(
     sema: &Semantics<'_, RootDatabase>,
     krate: hir::Crate,
     name_ref: &ast::NameRef,
-    edition: Edition,
 ) -> Option<Highlight> {
     let mc = name_ref.syntax().parent().and_then(ast::MethodCallExpr::cast)?;
-    highlight_method_call(sema, krate, &mc, edition)
+    highlight_method_call(sema, krate, &mc)
 }
 
 fn highlight_method_call(
     sema: &Semantics<'_, RootDatabase>,
     krate: hir::Crate,
     method_call: &ast::MethodCallExpr,
-    edition: Edition,
 ) -> Option<Highlight> {
     let func = sema.resolve_method_call(method_call)?;
 
     let mut h = SymbolKind::Method.into();
 
-    if func.is_unsafe_to_call(sema.db, None, edition) || sema.is_unsafe_method_call(method_call) {
+    if func.is_unsafe_to_call(sema.db, None) || sema.is_unsafe_method_call(method_call) {
         h |= HlMod::Unsafe;
     }
     if func.is_async(sema.db) {
@@ -677,12 +669,6 @@ fn highlight_name_by_syntax(name: ast::Name) -> Highlight {
         STATIC => SymbolKind::Static,
         IDENT_PAT => SymbolKind::Local,
         FORMAT_ARGS_ARG => SymbolKind::Local,
-        RENAME => SymbolKind::Local,
-        MACRO_RULES => SymbolKind::Macro,
-        CONST_PARAM => SymbolKind::ConstParam,
-        SELF_PARAM => SymbolKind::SelfParam,
-        TRAIT_ALIAS => SymbolKind::TraitAlias,
-        ASM_OPERAND_NAMED => SymbolKind::Local,
         _ => return default.into(),
     };
 
@@ -693,7 +679,6 @@ fn highlight_name_ref_by_syntax(
     name: ast::NameRef,
     sema: &Semantics<'_, RootDatabase>,
     krate: hir::Crate,
-    edition: Edition,
 ) -> Highlight {
     let default = HlTag::UnresolvedReference;
 
@@ -704,7 +689,7 @@ fn highlight_name_ref_by_syntax(
 
     match parent.kind() {
         METHOD_CALL_EXPR => ast::MethodCallExpr::cast(parent)
-            .and_then(|it| highlight_method_call(sema, krate, &it, edition))
+            .and_then(|it| highlight_method_call(sema, krate, &it))
             .unwrap_or_else(|| SymbolKind::Method.into()),
         FIELD_EXPR => {
             let h = HlTag::Symbol(SymbolKind::Field);
diff --git a/crates/parser/src/grammar/expressions.rs b/crates/parser/src/grammar/expressions.rs
index fe1316c9bf..389c01933c 100644
--- a/crates/parser/src/grammar/expressions.rs
+++ b/crates/parser/src/grammar/expressions.rs
@@ -678,8 +678,6 @@ fn path_expr(p: &mut Parser<'_>, r: Restrictions) -> (CompletedMarker, BlockLike
 //     S { x };
 //     S { x, y: 32, };
 //     S { x, y: 32, ..Default::default() };
-//     S { x, y: 32, .. };
-//     S { .. };
 //     S { x: ::default() };
 //     TupleStruct { 0: 1 };
 // }
@@ -711,8 +709,6 @@ pub(crate) fn record_expr_field_list(p: &mut Parser<'_>) {
                 // fn main() {
                 //     S { field ..S::default() }
                 //     S { 0 ..S::default() }
-                //     S { field .. }
-                //     S { 0 .. }
                 // }
                 name_ref_or_index(p);
                 p.error("expected `:`");
@@ -743,13 +739,7 @@ pub(crate) fn record_expr_field_list(p: &mut Parser<'_>) {
                 //     S { .. } = S {};
                 // }
 
-                // test struct_initializer_with_defaults
-                // fn foo() {
-                //     let _s = S { .. };
-                // }
-
-                // We permit `.. }` on the left-hand side of a destructuring assignment
-                // or defaults values.
+                // We permit `.. }` on the left-hand side of a destructuring assignment.
                 if !p.at(T!['}']) {
                     expr(p);
 
@@ -760,12 +750,6 @@ pub(crate) fn record_expr_field_list(p: &mut Parser<'_>) {
                         //     S { ..x, a: 0 }
                         // }
 
-                        // test_err comma_after_default_values_syntax
-                        // fn foo() {
-                        //     S { .., };
-                        //     S { .., a: 0 }
-                        // }
-
                         // Do not bump, so we can support additional fields after this comma.
                         p.error("cannot use a comma after the base struct");
                     }
diff --git a/crates/parser/src/grammar/items/adt.rs b/crates/parser/src/grammar/items/adt.rs
index 9a16c9db6d..21078175c0 100644
--- a/crates/parser/src/grammar/items/adt.rs
+++ b/crates/parser/src/grammar/items/adt.rs
@@ -135,11 +135,6 @@ pub(crate) fn record_field_list(p: &mut Parser<'_>) {
             name(p);
             p.expect(T![:]);
             types::type_(p);
-            // test record_field_default_values
-            // struct S { f: f32 = 0.0 }
-            if p.eat(T![=]) {
-                expressions::expr(p);
-            }
             m.complete(p, RECORD_FIELD);
         } else {
             m.abandon(p);
diff --git a/crates/rust-analyzer/src/cli/analysis_stats.rs b/crates/rust-analyzer/src/cli/analysis_stats.rs
index 824f262ca3..cd709afe09 100644
--- a/crates/rust-analyzer/src/cli/analysis_stats.rs
+++ b/crates/rust-analyzer/src/cli/analysis_stats.rs
@@ -673,9 +673,6 @@ impl flags::AnalysisStats {
                         DefWithBody::Const(it) => it.source(db).map(|it| it.syntax().cloned()),
                         DefWithBody::Variant(it) => it.source(db).map(|it| it.syntax().cloned()),
                         DefWithBody::InTypeConst(_) => unimplemented!(),
-                        DefWithBody::Field(it) => {
-                            it.default_value_source(db).map(|it| it.syntax().cloned())
-                        }
                     };
                     if let Some(src) = source {
                         let original_file = src.file_id.original_file(db);
@@ -990,9 +987,6 @@ impl flags::AnalysisStats {
                         DefWithBody::Const(it) => it.source(db).map(|it| it.syntax().cloned()),
                         DefWithBody::Variant(it) => it.source(db).map(|it| it.syntax().cloned()),
                         DefWithBody::InTypeConst(_) => unimplemented!(),
-                        DefWithBody::Field(it) => {
-                            it.default_value_source(db).map(|it| it.syntax().cloned())
-                        }
                     };
                     if let Some(src) = source {
                         let original_file = src.file_id.original_file(db);
diff --git a/crates/rust-analyzer/src/handlers/dispatch.rs b/crates/rust-analyzer/src/handlers/dispatch.rs
index ff50f7533a..4683877db6 100644
--- a/crates/rust-analyzer/src/handlers/dispatch.rs
+++ b/crates/rust-analyzer/src/handlers/dispatch.rs
@@ -118,7 +118,7 @@ impl RequestDispatcher<'_> {
             }
             return self;
         }
-        self.on_with_thread_intent::<true, ALLOW_RETRYING, R>(
+        self.on_with_thread_intent::<false, ALLOW_RETRYING, R>(
             ThreadIntent::Worker,
             f,
             Self::content_modified_error,
@@ -147,7 +147,7 @@ impl RequestDispatcher<'_> {
             }
             return self;
         }
-        self.on_with_thread_intent::<true, false, R>(ThreadIntent::Worker, f, on_cancelled)
+        self.on_with_thread_intent::<false, false, R>(ThreadIntent::Worker, f, on_cancelled)
     }
 
     /// Dispatches a non-latency-sensitive request onto the thread pool. When the VFS is marked not
@@ -166,7 +166,7 @@ impl RequestDispatcher<'_> {
             }
             return self;
         }
-        self.on_with_thread_intent::<true, ALLOW_RETRYING, R>(
+        self.on_with_thread_intent::<false, ALLOW_RETRYING, R>(
             ThreadIntent::Worker,
             f,
             Self::content_modified_error,
@@ -193,7 +193,7 @@ impl RequestDispatcher<'_> {
             }
             return self;
         }
-        self.on_with_thread_intent::<true, ALLOW_RETRYING, R>(
+        self.on_with_thread_intent::<false, ALLOW_RETRYING, R>(
             ThreadIntent::LatencySensitive,
             f,
             Self::content_modified_error,
@@ -212,7 +212,7 @@ impl RequestDispatcher<'_> {
         R::Params: DeserializeOwned + panic::UnwindSafe + Send + fmt::Debug,
         R::Result: Serialize,
     {
-        self.on_with_thread_intent::<false, false, R>(
+        self.on_with_thread_intent::<true, false, R>(
             ThreadIntent::LatencySensitive,
             f,
             Self::content_modified_error,
@@ -231,7 +231,7 @@ impl RequestDispatcher<'_> {
         }
     }
 
-    fn on_with_thread_intent<const MAIN_POOL: bool, const ALLOW_RETRYING: bool, R>(
+    fn on_with_thread_intent<const RUSTFMT: bool, const ALLOW_RETRYING: bool, R>(
         &mut self,
         intent: ThreadIntent,
         f: fn(GlobalStateSnapshot, R::Params) -> anyhow::Result<R::Result>,
@@ -251,10 +251,10 @@ impl RequestDispatcher<'_> {
         tracing::debug!(?params);
 
         let world = self.global_state.snapshot();
-        if MAIN_POOL {
-            &mut self.global_state.task_pool.handle
-        } else {
+        if RUSTFMT {
             &mut self.global_state.fmt_pool.handle
+        } else {
+            &mut self.global_state.task_pool.handle
         }
         .spawn(intent, move || {
             let result = panic::catch_unwind(move || {
diff --git a/crates/rust-analyzer/src/lsp/semantic_tokens.rs b/crates/rust-analyzer/src/lsp/semantic_tokens.rs
index 3c21e19925..991c10743f 100644
--- a/crates/rust-analyzer/src/lsp/semantic_tokens.rs
+++ b/crates/rust-analyzer/src/lsp/semantic_tokens.rs
@@ -24,7 +24,7 @@ macro_rules! define_semantic_token_types {
         }
 
         pub(crate) const SUPPORTED_TYPES: &[SemanticTokenType] = &[
-            $(self::types::$standard,)*
+            $(SemanticTokenType::$standard,)*
             $(self::types::$custom),*
         ];
 
@@ -32,7 +32,7 @@ macro_rules! define_semantic_token_types {
             use self::types::*;
             $(
                 if token == $custom {
-                    None $(.or(Some(self::types::$fallback)))?
+                    None $(.or(Some(SemanticTokenType::$fallback)))?
                 } else
             )*
             { Some(token )}
@@ -60,7 +60,6 @@ define_semantic_token_types![
         STRUCT,
         TYPE_PARAMETER,
         VARIABLE,
-        TYPE,
     }
 
     custom {
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index d6dc8b521f..de0ee639ca 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -253,6 +253,11 @@ impl GlobalState {
         &self,
         inbox: &Receiver<lsp_server::Message>,
     ) -> Result<Option<Event>, crossbeam_channel::RecvError> {
+        // Make sure we reply to formatting requests ASAP so the editor doesn't block
+        if let Ok(task) = self.fmt_pool.receiver.try_recv() {
+            return Ok(Some(Event::Task(task)));
+        }
+
         select! {
             recv(inbox) -> msg =>
                 return Ok(msg.ok().map(Event::Lsp)),
diff --git a/crates/syntax/rust.ungram b/crates/syntax/rust.ungram
index bbb8413cbc..4e2a70d6cd 100644
--- a/crates/syntax/rust.ungram
+++ b/crates/syntax/rust.ungram
@@ -241,7 +241,7 @@ RecordFieldList =
 
 RecordField =
   Attr* Visibility?
-  Name ':' Type ('=' Expr)?
+  Name ':' Type
 
 TupleFieldList =
   '(' fields:(TupleField (',' TupleField)* ','?)? ')'
diff --git a/crates/syntax/src/ast/generated/nodes.rs b/crates/syntax/src/ast/generated/nodes.rs
index 8f10ea9464..69e2a9f9c1 100644
--- a/crates/syntax/src/ast/generated/nodes.rs
+++ b/crates/syntax/src/ast/generated/nodes.rs
@@ -1538,14 +1538,10 @@ impl ast::HasDocComments for RecordField {}
 impl ast::HasName for RecordField {}
 impl ast::HasVisibility for RecordField {}
 impl RecordField {
-    #[inline]
-    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
     #[inline]
     pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
     #[inline]
     pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
-    #[inline]
-    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
 }
 
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]


Test patch:
diff --git a/crates/hir-def/src/macro_expansion_tests/builtin_derive_macro.rs b/crates/hir-def/src/macro_expansion_tests/builtin_derive_macro.rs
index 25391c910e..c31d322132 100644
--- a/crates/hir-def/src/macro_expansion_tests/builtin_derive_macro.rs
+++ b/crates/hir-def/src/macro_expansion_tests/builtin_derive_macro.rs
@@ -211,20 +211,6 @@ enum Bar {
     #[default]
     Bar,
 }
-#[derive(Default)]
-struct Baz {
-    field1: i32 = 2,
-    field2: bool = { false },
-}
-#[derive(Default)]
-enum Qux {
-    #[default]
-    Foo {
-        field1: i32,
-        field2: bool = true,
-        field3: (),
-    }
-}
 "#,
         expect![[r#"
 #[derive(Default)]
@@ -238,20 +224,6 @@ enum Bar {
     #[default]
     Bar,
 }
-#[derive(Default)]
-struct Baz {
-    field1: i32 = 2,
-    field2: bool = { false },
-}
-#[derive(Default)]
-enum Qux {
-    #[default]
-    Foo {
-        field1: i32,
-        field2: bool = true,
-        field3: (),
-    }
-}
 
 impl <> $crate::default::Default for Foo< > where {
     fn default() -> Self {
@@ -264,20 +236,6 @@ impl <> $crate::default::Default for Bar< > where {
     fn default() -> Self {
         Bar::Bar
     }
-}
-impl <> $crate::default::Default for Baz< > where {
-    fn default() -> Self {
-        Baz {
-            ..
-        }
-    }
-}
-impl <> $crate::default::Default for Qux< > where {
-    fn default() -> Self {
-        Qux::Foo {
-            field1: $crate::default::Default::default(), field3: $crate::default::Default::default(), ..
-        }
-    }
 }"#]],
     );
 }
diff --git a/crates/hir-ty/src/tests.rs b/crates/hir-ty/src/tests.rs
index 96e7130ecf..69ec35f406 100644
--- a/crates/hir-ty/src/tests.rs
+++ b/crates/hir-ty/src/tests.rs
@@ -16,7 +16,6 @@ use std::env;
 use std::sync::LazyLock;
 
 use base_db::SourceDatabaseFileInputExt as _;
-use either::Either;
 use expect_test::Expect;
 use hir_def::{
     db::DefDatabase,
@@ -24,14 +23,12 @@ use hir_def::{
     hir::{ExprId, Pat, PatId},
     item_scope::ItemScope,
     nameres::DefMap,
-    src::{HasChildSource, HasSource},
-    AdtId, AssocItemId, DefWithBodyId, FieldId, HasModule, LocalModuleId, Lookup, ModuleDefId,
-    SyntheticSyntax,
+    src::HasSource,
+    AssocItemId, DefWithBodyId, HasModule, LocalModuleId, Lookup, ModuleDefId, SyntheticSyntax,
 };
 use hir_expand::{db::ExpandDatabase, FileRange, InFile};
 use itertools::Itertools;
 use rustc_hash::FxHashMap;
-use span::TextSize;
 use stdx::format_to;
 use syntax::{
     ast::{self, AstNode, HasName},
@@ -135,40 +132,14 @@ fn check_impl(
             None => continue,
         };
         let def_map = module.def_map(&db);
-        visit_module(&db, &def_map, module.local_id, &mut |it| match it {
-            ModuleDefId::FunctionId(it) => defs.push(it.into()),
-            ModuleDefId::EnumVariantId(it) => {
-                defs.push(it.into());
-                let variant_id = it.into();
-                let vd = db.variant_data(variant_id);
-                defs.extend(vd.fields().iter().filter_map(|(local_id, fd)| {
-                    if fd.has_default {
-                        let field = FieldId { parent: variant_id, local_id };
-                        Some(DefWithBodyId::FieldId(field))
-                    } else {
-                        None
-                    }
-                }));
-            }
-            ModuleDefId::ConstId(it) => defs.push(it.into()),
-            ModuleDefId::StaticId(it) => defs.push(it.into()),
-            ModuleDefId::AdtId(it) => {
-                let variant_id = match it {
-                    AdtId::StructId(it) => it.into(),
-                    AdtId::UnionId(it) => it.into(),
-                    AdtId::EnumId(_) => return,
-                };
-                let vd = db.variant_data(variant_id);
-                defs.extend(vd.fields().iter().filter_map(|(local_id, fd)| {
-                    if fd.has_default {
-                        let field = FieldId { parent: variant_id, local_id };
-                        Some(DefWithBodyId::FieldId(field))
-                    } else {
-                        None
-                    }
-                }));
-            }
-            _ => {}
+        visit_module(&db, &def_map, module.local_id, &mut |it| {
+            defs.push(match it {
+                ModuleDefId::FunctionId(it) => it.into(),
+                ModuleDefId::EnumVariantId(it) => it.into(),
+                ModuleDefId::ConstId(it) => it.into(),
+                ModuleDefId::StaticId(it) => it.into(),
+                _ => return,
+            })
         });
     }
     defs.sort_by_key(|def| match def {
@@ -189,14 +160,6 @@ fn check_impl(
             loc.source(&db).value.syntax().text_range().start()
         }
         DefWithBodyId::InTypeConstId(it) => it.source(&db).syntax().text_range().start(),
-        DefWithBodyId::FieldId(it) => {
-            let cs = it.parent.child_source(&db);
-            match cs.value.get(it.local_id) {
-                Some(Either::Left(it)) => it.syntax().text_range().start(),
-                Some(Either::Right(it)) => it.syntax().text_range().end(),
-                None => TextSize::new(u32::MAX),
-            }
-        }
     });
     let mut unexpected_type_mismatches = String::new();
     for def in defs {
@@ -425,40 +388,14 @@ fn infer_with_mismatches(content: &str, include_mismatches: bool) -> String {
     let def_map = module.def_map(&db);
 
     let mut defs: Vec<DefWithBodyId> = Vec::new();
-    visit_module(&db, &def_map, module.local_id, &mut |it| match it {
-        ModuleDefId::FunctionId(it) => defs.push(it.into()),
-        ModuleDefId::EnumVariantId(it) => {
-            defs.push(it.into());
-            let variant_id = it.into();
-            let vd = db.variant_data(variant_id);
-            defs.extend(vd.fields().iter().filter_map(|(local_id, fd)| {
-                if fd.has_default {
-                    let field = FieldId { parent: variant_id, local_id };
-                    Some(DefWithBodyId::FieldId(field))
-                } else {
-                    None
-                }
-            }));
-        }
-        ModuleDefId::ConstId(it) => defs.push(it.into()),
-        ModuleDefId::StaticId(it) => defs.push(it.into()),
-        ModuleDefId::AdtId(it) => {
-            let variant_id = match it {
-                AdtId::StructId(it) => it.into(),
-                AdtId::UnionId(it) => it.into(),
-                AdtId::EnumId(_) => return,
-            };
-            let vd = db.variant_data(variant_id);
-            defs.extend(vd.fields().iter().filter_map(|(local_id, fd)| {
-                if fd.has_default {
-                    let field = FieldId { parent: variant_id, local_id };
-                    Some(DefWithBodyId::FieldId(field))
-                } else {
-                    None
-                }
-            }));
-        }
-        _ => {}
+    visit_module(&db, &def_map, module.local_id, &mut |it| {
+        defs.push(match it {
+            ModuleDefId::FunctionId(it) => it.into(),
+            ModuleDefId::EnumVariantId(it) => it.into(),
+            ModuleDefId::ConstId(it) => it.into(),
+            ModuleDefId::StaticId(it) => it.into(),
+            _ => return,
+        })
     });
     defs.sort_by_key(|def| match def {
         DefWithBodyId::FunctionId(it) => {
@@ -478,14 +415,6 @@ fn infer_with_mismatches(content: &str, include_mismatches: bool) -> String {
             loc.source(&db).value.syntax().text_range().start()
         }
         DefWithBodyId::InTypeConstId(it) => it.source(&db).syntax().text_range().start(),
-        DefWithBodyId::FieldId(it) => {
-            let cs = it.parent.child_source(&db);
-            match cs.value.get(it.local_id) {
-                Some(Either::Left(it)) => it.syntax().text_range().start(),
-                Some(Either::Right(it)) => it.syntax().text_range().end(),
-                None => TextSize::new(u32::MAX),
-            }
-        }
     });
     for def in defs {
         let (body, source_map) = db.body_with_source_map(def);
@@ -546,7 +475,7 @@ pub(crate) fn visit_module(
                     let body = db.body(it.into());
                     visit_body(db, &body, cb);
                 }
-                ModuleDefId::AdtId(AdtId::EnumId(it)) => {
+                ModuleDefId::AdtId(hir_def::AdtId::EnumId(it)) => {
                     db.enum_data(it).variants.iter().for_each(|&(it, _)| {
                         let body = db.body(it.into());
                         cb(it.into());
diff --git a/crates/hir-ty/src/tests/type_alias_impl_traits.rs b/crates/hir-ty/src/tests/type_alias_impl_traits.rs
index a2aada57da..e2b7bf379c 100644
--- a/crates/hir-ty/src/tests/type_alias_impl_traits.rs
+++ b/crates/hir-ty/src/tests/type_alias_impl_traits.rs
@@ -157,53 +157,5 @@ static ALIAS: i32 = {
             217..218 '5': i32
             205..211: expected impl Trait + ?Sized, got Struct
         "#]],
-    );
-}
-
-#[test]
-fn defining_type_alias_impl_trait_from_default_fields() {
-    check_no_mismatches(
-        r#"
-trait Trait {}
-
-struct Struct;
-
-impl Trait for Struct {}
-
-type AliasTy = impl Trait;
-
-struct Foo {
-    foo: AliasTy = {
-        let x: AliasTy = Struct;
-        x
-    },
-}
-"#,
-    );
-
-    check_infer_with_mismatches(
-        r#"
-trait Trait {}
-
-struct Struct;
-
-impl Trait for Struct {}
-
-type AliasTy = impl Trait;
-
-struct Foo {
-    foo: i32 = {
-        let x: AliasTy = Struct;
-        5
-    },
-}
-"#,
-        expect![[r#"
-            114..164 '{     ...     }': i32
-            128..129 'x': impl Trait + ?Sized
-            141..147 'Struct': Struct
-            157..158 '5': i32
-            141..147: expected impl Trait + ?Sized, got Struct
-        "#]],
-    );
+    )
 }
diff --git a/crates/ide/src/syntax_highlighting/test_data/highlight_strings.html b/crates/ide/src/syntax_highlighting/test_data/highlight_strings.html
index 1794d7dbfe..0a7e273950 100644
--- a/crates/ide/src/syntax_highlighting/test_data/highlight_strings.html
+++ b/crates/ide/src/syntax_highlighting/test_data/highlight_strings.html
@@ -82,10 +82,6 @@ pre                 { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
     <span class="parenthesis">(</span><span class="punctuation">$</span>literal<span class="colon">:</span>literal<span class="parenthesis">)</span> <span class="operator">=</span><span class="operator">&gt;</span> <span class="brace">{</span><span class="brace">{</span>stringify<span class="punctuation">!</span><span class="parenthesis">(</span><span class="punctuation">$</span>literal<span class="parenthesis">)</span><span class="semicolon">;</span> format_args<span class="punctuation">!</span><span class="parenthesis">(</span><span class="punctuation">$</span>literal<span class="parenthesis">)</span><span class="brace">}</span><span class="brace">}</span><span class="semicolon">;</span>
 <span class="brace">}</span>
 
-<span class="keyword">use</span> <span class="unresolved_reference">foo</span><span class="operator">::</span><span class="unresolved_reference">bar</span> <span class="keyword">as</span> <span class="variable declaration">baz</span><span class="semicolon">;</span>
-<span class="keyword">trait</span> <span class="trait_alias declaration">Bar</span> <span class="operator">=</span> <span class="unresolved_reference">Baz</span><span class="semicolon">;</span>
-<span class="keyword">trait</span> <span class="trait_alias declaration">Foo</span> <span class="operator">=</span> <span class="trait_alias">Bar</span><span class="semicolon">;</span>
-
 <span class="keyword">fn</span> <span class="function declaration">main</span><span class="parenthesis">(</span><span class="parenthesis">)</span> <span class="brace">{</span>
     <span class="keyword">let</span> <span class="variable declaration">a</span> <span class="operator">=</span> <span class="char_literal">'</span><span class="escape_sequence">\n</span><span class="char_literal">'</span><span class="semicolon">;</span>
     <span class="keyword">let</span> <span class="variable declaration">a</span> <span class="operator">=</span> <span class="char_literal">'</span><span class="escape_sequence">\t</span><span class="char_literal">'</span><span class="semicolon">;</span>
diff --git a/crates/ide/src/syntax_highlighting/tests.rs b/crates/ide/src/syntax_highlighting/tests.rs
index b9520ae2bb..af52b33de6 100644
--- a/crates/ide/src/syntax_highlighting/tests.rs
+++ b/crates/ide/src/syntax_highlighting/tests.rs
@@ -466,10 +466,6 @@ macro_rules! reuse_twice {
     ($literal:literal) => {{stringify!($literal); format_args!($literal)}};
 }
 
-use foo::bar as baz;
-trait Bar = Baz;
-trait Foo = Bar;
-
 fn main() {
     let a = '\n';
     let a = '\t';
diff --git a/crates/parser/test_data/generated/runner.rs b/crates/parser/test_data/generated/runner.rs
index c8ea8c547a..b9f87b6af2 100644
--- a/crates/parser/test_data/generated/runner.rs
+++ b/crates/parser/test_data/generated/runner.rs
@@ -482,10 +482,6 @@ mod ok {
         run_and_expect_no_errors("test_data/parser/inline/ok/record_field_attrs.rs");
     }
     #[test]
-    fn record_field_default_values() {
-        run_and_expect_no_errors("test_data/parser/inline/ok/record_field_default_values.rs");
-    }
-    #[test]
     fn record_field_list() {
         run_and_expect_no_errors("test_data/parser/inline/ok/record_field_list.rs");
     }
@@ -548,10 +544,6 @@ mod ok {
         run_and_expect_no_errors("test_data/parser/inline/ok/stmt_postfix_expr_ambiguity.rs");
     }
     #[test]
-    fn struct_initializer_with_defaults() {
-        run_and_expect_no_errors("test_data/parser/inline/ok/struct_initializer_with_defaults.rs");
-    }
-    #[test]
     fn struct_item() { run_and_expect_no_errors("test_data/parser/inline/ok/struct_item.rs"); }
     #[test]
     fn trait_alias() { run_and_expect_no_errors("test_data/parser/inline/ok/trait_alias.rs"); }
@@ -727,10 +719,6 @@ mod err {
         );
     }
     #[test]
-    fn comma_after_default_values_syntax() {
-        run_and_expect_errors("test_data/parser/inline/err/comma_after_default_values_syntax.rs");
-    }
-    #[test]
     fn crate_visibility_empty_recover() {
         run_and_expect_errors("test_data/parser/inline/err/crate_visibility_empty_recover.rs");
     }
diff --git a/crates/parser/test_data/parser/inline/err/comma_after_default_values_syntax.rast b/crates/parser/test_data/parser/inline/err/comma_after_default_values_syntax.rast
deleted file mode 100644
index feb617e1aa..0000000000
--- a/crates/parser/test_data/parser/inline/err/comma_after_default_values_syntax.rast
+++ /dev/null
@@ -1,59 +0,0 @@
-SOURCE_FILE
-  FN
-    FN_KW "fn"
-    WHITESPACE " "
-    NAME
-      IDENT "foo"
-    PARAM_LIST
-      L_PAREN "("
-      R_PAREN ")"
-    WHITESPACE " "
-    BLOCK_EXPR
-      STMT_LIST
-        L_CURLY "{"
-        WHITESPACE "\n    "
-        EXPR_STMT
-          RECORD_EXPR
-            PATH
-              PATH_SEGMENT
-                NAME_REF
-                  IDENT "S"
-            WHITESPACE " "
-            RECORD_EXPR_FIELD_LIST
-              L_CURLY "{"
-              WHITESPACE " "
-              DOT2 ".."
-              ERROR
-                COMMA ","
-              WHITESPACE " "
-              R_CURLY "}"
-          SEMICOLON ";"
-        WHITESPACE "\n    "
-        RECORD_EXPR
-          PATH
-            PATH_SEGMENT
-              NAME_REF
-                IDENT "S"
-          WHITESPACE " "
-          RECORD_EXPR_FIELD_LIST
-            L_CURLY "{"
-            WHITESPACE " "
-            DOT2 ".."
-            ERROR
-              COMMA ","
-            WHITESPACE " "
-            RECORD_EXPR_FIELD
-              NAME_REF
-                IDENT "a"
-              COLON ":"
-              WHITESPACE " "
-              LITERAL
-                INT_NUMBER "0"
-            WHITESPACE " "
-            R_CURLY "}"
-        WHITESPACE "\n"
-        R_CURLY "}"
-  WHITESPACE "\n"
-error 21: expected expression
-error 36: expected expression
-error 37: expected COMMA
diff --git a/crates/parser/test_data/parser/inline/err/comma_after_default_values_syntax.rs b/crates/parser/test_data/parser/inline/err/comma_after_default_values_syntax.rs
deleted file mode 100644
index f1ecdf89fa..0000000000
--- a/crates/parser/test_data/parser/inline/err/comma_after_default_values_syntax.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-fn foo() {
-    S { .., };
-    S { .., a: 0 }
-}
diff --git a/crates/parser/test_data/parser/inline/err/record_literal_before_ellipsis_recovery.rast b/crates/parser/test_data/parser/inline/err/record_literal_before_ellipsis_recovery.rast
index 12b4e233e3..08ae906421 100644
--- a/crates/parser/test_data/parser/inline/err/record_literal_before_ellipsis_recovery.rast
+++ b/crates/parser/test_data/parser/inline/err/record_literal_before_ellipsis_recovery.rast
@@ -44,56 +44,6 @@ SOURCE_FILE
               WHITESPACE " "
               R_CURLY "}"
         WHITESPACE "\n    "
-        EXPR_STMT
-          RECORD_EXPR
-            PATH
-              PATH_SEGMENT
-                NAME_REF
-                  IDENT "S"
-            WHITESPACE " "
-            RECORD_EXPR_FIELD_LIST
-              L_CURLY "{"
-              WHITESPACE " "
-              RECORD_EXPR_FIELD
-                NAME_REF
-                  INT_NUMBER "0"
-              WHITESPACE " "
-              DOT2 ".."
-              CALL_EXPR
-                PATH_EXPR
-                  PATH
-                    PATH
-                      PATH_SEGMENT
-                        NAME_REF
-                          IDENT "S"
-                    COLON2 "::"
-                    PATH_SEGMENT
-                      NAME_REF
-                        IDENT "default"
-                ARG_LIST
-                  L_PAREN "("
-                  R_PAREN ")"
-              WHITESPACE " "
-              R_CURLY "}"
-        WHITESPACE "\n    "
-        EXPR_STMT
-          RECORD_EXPR
-            PATH
-              PATH_SEGMENT
-                NAME_REF
-                  IDENT "S"
-            WHITESPACE " "
-            RECORD_EXPR_FIELD_LIST
-              L_CURLY "{"
-              WHITESPACE " "
-              RECORD_EXPR_FIELD
-                NAME_REF
-                  IDENT "field"
-              WHITESPACE " "
-              DOT2 ".."
-              WHITESPACE " "
-              R_CURLY "}"
-        WHITESPACE "\n    "
         RECORD_EXPR
           PATH
             PATH_SEGMENT
@@ -108,6 +58,20 @@ SOURCE_FILE
                 INT_NUMBER "0"
             WHITESPACE " "
             DOT2 ".."
+            CALL_EXPR
+              PATH_EXPR
+                PATH
+                  PATH
+                    PATH_SEGMENT
+                      NAME_REF
+                        IDENT "S"
+                  COLON2 "::"
+                  PATH_SEGMENT
+                    NAME_REF
+                      IDENT "default"
+              ARG_LIST
+                L_PAREN "("
+                R_PAREN ")"
             WHITESPACE " "
             R_CURLY "}"
         WHITESPACE "\n"
@@ -118,9 +82,3 @@ error 25: expected COMMA
 error 42: expected SEMICOLON
 error 52: expected `:`
 error 52: expected COMMA
-error 69: expected SEMICOLON
-error 83: expected `:`
-error 83: expected COMMA
-error 88: expected SEMICOLON
-error 98: expected `:`
-error 98: expected COMMA
diff --git a/crates/parser/test_data/parser/inline/err/record_literal_before_ellipsis_recovery.rs b/crates/parser/test_data/parser/inline/err/record_literal_before_ellipsis_recovery.rs
index 416cd763fd..65398ccb88 100644
--- a/crates/parser/test_data/parser/inline/err/record_literal_before_ellipsis_recovery.rs
+++ b/crates/parser/test_data/parser/inline/err/record_literal_before_ellipsis_recovery.rs
@@ -1,6 +1,4 @@
 fn main() {
     S { field ..S::default() }
     S { 0 ..S::default() }
-    S { field .. }
-    S { 0 .. }
 }
diff --git a/crates/parser/test_data/parser/inline/ok/record_field_default_values.rast b/crates/parser/test_data/parser/inline/ok/record_field_default_values.rast
deleted file mode 100644
index 33088f2cab..0000000000
--- a/crates/parser/test_data/parser/inline/ok/record_field_default_values.rast
+++ /dev/null
@@ -1,28 +0,0 @@
-SOURCE_FILE
-  STRUCT
-    STRUCT_KW "struct"
-    WHITESPACE " "
-    NAME
-      IDENT "S"
-    WHITESPACE " "
-    RECORD_FIELD_LIST
-      L_CURLY "{"
-      WHITESPACE " "
-      RECORD_FIELD
-        NAME
-          IDENT "f"
-        COLON ":"
-        WHITESPACE " "
-        PATH_TYPE
-          PATH
-            PATH_SEGMENT
-              NAME_REF
-                IDENT "f32"
-        WHITESPACE " "
-        EQ "="
-        WHITESPACE " "
-        LITERAL
-          FLOAT_NUMBER "0.0"
-      WHITESPACE " "
-      R_CURLY "}"
-  WHITESPACE "\n"
diff --git a/crates/parser/test_data/parser/inline/ok/record_field_default_values.rs b/crates/parser/test_data/parser/inline/ok/record_field_default_values.rs
deleted file mode 100644
index d7b38944a8..0000000000
--- a/crates/parser/test_data/parser/inline/ok/record_field_default_values.rs
+++ /dev/null
@@ -1,1 +0,0 @@
-struct S { f: f32 = 0.0 }
diff --git a/crates/parser/test_data/parser/inline/ok/record_lit.rast b/crates/parser/test_data/parser/inline/ok/record_lit.rast
index b868da55bc..00948c322f 100644
--- a/crates/parser/test_data/parser/inline/ok/record_lit.rast
+++ b/crates/parser/test_data/parser/inline/ok/record_lit.rast
@@ -120,53 +120,6 @@ SOURCE_FILE
               R_CURLY "}"
           SEMICOLON ";"
         WHITESPACE "\n    "
-        EXPR_STMT
-          RECORD_EXPR
-            PATH
-              PATH_SEGMENT
-                NAME_REF
-                  IDENT "S"
-            WHITESPACE " "
-            RECORD_EXPR_FIELD_LIST
-              L_CURLY "{"
-              WHITESPACE " "
-              RECORD_EXPR_FIELD
-                PATH_EXPR
-                  PATH
-                    PATH_SEGMENT
-                      NAME_REF
-                        IDENT "x"
-              COMMA ","
-              WHITESPACE " "
-              RECORD_EXPR_FIELD
-                NAME_REF
-                  IDENT "y"
-                COLON ":"
-                WHITESPACE " "
-                LITERAL
-                  INT_NUMBER "32"
-              COMMA ","
-              WHITESPACE " "
-              DOT2 ".."
-              WHITESPACE " "
-              R_CURLY "}"
-          SEMICOLON ";"
-        WHITESPACE "\n    "
-        EXPR_STMT
-          RECORD_EXPR
-            PATH
-              PATH_SEGMENT
-                NAME_REF
-                  IDENT "S"
-            WHITESPACE " "
-            RECORD_EXPR_FIELD_LIST
-              L_CURLY "{"
-              WHITESPACE " "
-              DOT2 ".."
-              WHITESPACE " "
-              R_CURLY "}"
-          SEMICOLON ";"
-        WHITESPACE "\n    "
         EXPR_STMT
           RECORD_EXPR
             PATH
diff --git a/crates/parser/test_data/parser/inline/ok/record_lit.rs b/crates/parser/test_data/parser/inline/ok/record_lit.rs
index 42895f759b..86411fbb7d 100644
--- a/crates/parser/test_data/parser/inline/ok/record_lit.rs
+++ b/crates/parser/test_data/parser/inline/ok/record_lit.rs
@@ -3,8 +3,6 @@ fn foo() {
     S { x };
     S { x, y: 32, };
     S { x, y: 32, ..Default::default() };
-    S { x, y: 32, .. };
-    S { .. };
     S { x: ::default() };
     TupleStruct { 0: 1 };
 }
diff --git a/crates/parser/test_data/parser/inline/ok/struct_initializer_with_defaults.rast b/crates/parser/test_data/parser/inline/ok/struct_initializer_with_defaults.rast
deleted file mode 100644
index 987e219ae8..0000000000
--- a/crates/parser/test_data/parser/inline/ok/struct_initializer_with_defaults.rast
+++ /dev/null
@@ -1,39 +0,0 @@
-SOURCE_FILE
-  FN
-    FN_KW "fn"
-    WHITESPACE " "
-    NAME
-      IDENT "foo"
-    PARAM_LIST
-      L_PAREN "("
-      R_PAREN ")"
-    WHITESPACE " "
-    BLOCK_EXPR
-      STMT_LIST
-        L_CURLY "{"
-        WHITESPACE "\n    "
-        LET_STMT
-          LET_KW "let"
-          WHITESPACE " "
-          IDENT_PAT
-            NAME
-              IDENT "_s"
-          WHITESPACE " "
-          EQ "="
-          WHITESPACE " "
-          RECORD_EXPR
-            PATH
-              PATH_SEGMENT
-                NAME_REF
-                  IDENT "S"
-            WHITESPACE " "
-            RECORD_EXPR_FIELD_LIST
-              L_CURLY "{"
-              WHITESPACE " "
-              DOT2 ".."
-              WHITESPACE " "
-              R_CURLY "}"
-          SEMICOLON ";"
-        WHITESPACE "\n"
-        R_CURLY "}"
-  WHITESPACE "\n"
diff --git a/crates/parser/test_data/parser/inline/ok/struct_initializer_with_defaults.rs b/crates/parser/test_data/parser/inline/ok/struct_initializer_with_defaults.rs
deleted file mode 100644
index e08204f94c..0000000000
--- a/crates/parser/test_data/parser/inline/ok/struct_initializer_with_defaults.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-fn foo() {
-    let _s = S { .. };
-}