about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-12-06 19:43:01 +0000
committerEsteban Küber <esteban@kuber.com.ar>2024-12-09 21:55:13 +0000
commit148a77dfde03dba553b2e4f3cf817cd6d105b3e6 (patch)
tree016057d45826592ba0cfefbb119ec8f50183f1ae /compiler
parente0752ad2572218dfc7764951b72d4e3e84ea842c (diff)
downloadrust-148a77dfde03dba553b2e4f3cf817cd6d105b3e6.tar.gz
rust-148a77dfde03dba553b2e4f3cf817cd6d105b3e6.zip
review comments: rewordings
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_ast_lowering/messages.ftl2
-rw-r--r--compiler/rustc_ast_passes/src/feature_gate.rs2
-rw-r--r--compiler/rustc_middle/src/ty/adt.rs4
-rw-r--r--compiler/rustc_mir_build/src/build/expr/into.rs2
-rw-r--r--compiler/rustc_resolve/src/late.rs2
5 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_ast_lowering/messages.ftl b/compiler/rustc_ast_lowering/messages.ftl
index b31e21f5c35..f96c9fe8e32 100644
--- a/compiler/rustc_ast_lowering/messages.ftl
+++ b/compiler/rustc_ast_lowering/messages.ftl
@@ -53,7 +53,7 @@ ast_lowering_closure_cannot_be_static = closures cannot be static
 ast_lowering_coroutine_too_many_parameters =
     too many parameters for a coroutine (expected 0 or 1 parameters)
 
-ast_lowering_default_field_in_tuple = default field in tuple struct
+ast_lowering_default_field_in_tuple = default fields are not supported in tuple structs
     .label = default fields are only supported on structs
 
 ast_lowering_does_not_support_modifiers =
diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs
index 688d4d635cf..aa3b772efb1 100644
--- a/compiler/rustc_ast_passes/src/feature_gate.rs
+++ b/compiler/rustc_ast_passes/src/feature_gate.rs
@@ -557,7 +557,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
     gate_all!(explicit_tail_calls, "`become` expression is experimental");
     gate_all!(generic_const_items, "generic const items are experimental");
     gate_all!(guard_patterns, "guard patterns are experimental", "consider using match arm guards");
-    gate_all!(default_field_values, "default values on `struct` fields aren't supported");
+    gate_all!(default_field_values, "default values on fields are experimental");
     gate_all!(fn_delegation, "functions delegation is not yet fully implemented");
     gate_all!(postfix_match, "postfix match is experimental");
     gate_all!(mut_ref, "mutable by-reference bindings are experimental");
diff --git a/compiler/rustc_middle/src/ty/adt.rs b/compiler/rustc_middle/src/ty/adt.rs
index 9678863ee4d..447cbc8932e 100644
--- a/compiler/rustc_middle/src/ty/adt.rs
+++ b/compiler/rustc_middle/src/ty/adt.rs
@@ -259,10 +259,10 @@ impl Into<DataTypeKind> for AdtKind {
     }
 }
 
-impl<'tcx> AdtDefData {
+impl AdtDefData {
     /// Creates a new `AdtDefData`.
     pub(super) fn new(
-        tcx: TyCtxt<'tcx>,
+        tcx: TyCtxt<'_>,
         did: DefId,
         kind: AdtKind,
         variants: IndexVec<VariantIdx, VariantDef>,
diff --git a/compiler/rustc_mir_build/src/build/expr/into.rs b/compiler/rustc_mir_build/src/build/expr/into.rs
index b31f61a75ff..a3d5376dcd4 100644
--- a/compiler/rustc_mir_build/src/build/expr/into.rs
+++ b/compiler/rustc_mir_build/src/build/expr/into.rs
@@ -352,7 +352,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
                     AdtExprBase::Base(FruInfo { base, field_types }) => {
                         let place_builder = unpack!(block = this.as_place_builder(block, *base));
 
-                        // MIR does not natively support FRU, so for each
+                        // We desugar FRU as we lower to MIR, so for each
                         // base-supplied field, generate an operand that
                         // reads it from the base.
                         itertools::zip_eq(field_names, &**field_types)
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs
index f5e1a598864..789d74876f7 100644
--- a/compiler/rustc_resolve/src/late.rs
+++ b/compiler/rustc_resolve/src/late.rs
@@ -752,7 +752,7 @@ impl<'ra: 'ast, 'ast, 'tcx> Visitor<'ast> for LateResolutionVisitor<'_, 'ast, 'r
         self.parent_scope.macro_rules = old_macro_rules;
     }
     fn visit_anon_const(&mut self, constant: &'ast AnonConst) {
-        bug!("encountered anon const without a manual call to `resolve_anon_const` {constant:#?}");
+        bug!("encountered anon const without a manual call to `resolve_anon_const`: {constant:#?}");
     }
     fn visit_expr(&mut self, expr: &'ast Expr) {
         self.resolve_expr(expr, None);