about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/ident.rs
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-02-08 22:12:13 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-02-08 22:12:13 +0000
commit1fcae03369abb4c2cc180cd5a49e1f4440a81300 (patch)
treefe705ff77c286f5fc4c09acc98d2f124086d0479 /compiler/rustc_resolve/src/ident.rs
parent3183b44a1ec209b06e0c26cbc92217176b59dc76 (diff)
downloadrust-1fcae03369abb4c2cc180cd5a49e1f4440a81300.tar.gz
rust-1fcae03369abb4c2cc180cd5a49e1f4440a81300.zip
Rustfmt
Diffstat (limited to 'compiler/rustc_resolve/src/ident.rs')
-rw-r--r--compiler/rustc_resolve/src/ident.rs57
1 files changed, 35 insertions, 22 deletions
diff --git a/compiler/rustc_resolve/src/ident.rs b/compiler/rustc_resolve/src/ident.rs
index a3d3e87ade0..499b9bca4d2 100644
--- a/compiler/rustc_resolve/src/ident.rs
+++ b/compiler/rustc_resolve/src/ident.rs
@@ -1181,21 +1181,25 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
                                             }
                                             Some(_) => None,
                                         };
-                                        (rib_ident.span, AttemptToUseNonConstantValueInConstant {
-                                            ident: original_rib_ident_def,
-                                            suggestion: "const",
-                                            current: "let",
-                                            type_span,
-                                        })
+                                        (
+                                            rib_ident.span,
+                                            AttemptToUseNonConstantValueInConstant {
+                                                ident: original_rib_ident_def,
+                                                suggestion: "const",
+                                                current: "let",
+                                                type_span,
+                                            },
+                                        )
                                     }
-                                    Some((ident, kind)) => {
-                                        (span, AttemptToUseNonConstantValueInConstant {
+                                    Some((ident, kind)) => (
+                                        span,
+                                        AttemptToUseNonConstantValueInConstant {
                                             ident,
                                             suggestion: "let",
                                             current: kind.as_str(),
                                             type_span: None,
-                                        })
-                                    }
+                                        },
+                                    ),
                                 };
                                 self.report_error(span, resolution_error);
                             }
@@ -1203,10 +1207,13 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
                         }
                         RibKind::ConstParamTy => {
                             if let Some(span) = finalize {
-                                self.report_error(span, ParamInTyOfConstParam {
-                                    name: rib_ident.name,
-                                    param_kind: None,
-                                });
+                                self.report_error(
+                                    span,
+                                    ParamInTyOfConstParam {
+                                        name: rib_ident.name,
+                                        param_kind: None,
+                                    },
+                                );
                             }
                             return Res::Err;
                         }
@@ -1287,10 +1294,13 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
                         }
                         RibKind::ConstParamTy => {
                             if let Some(span) = finalize {
-                                self.report_error(span, ResolutionError::ParamInTyOfConstParam {
-                                    name: rib_ident.name,
-                                    param_kind: Some(errors::ParamKindInTyOfConstParam::Type),
-                                });
+                                self.report_error(
+                                    span,
+                                    ResolutionError::ParamInTyOfConstParam {
+                                        name: rib_ident.name,
+                                        param_kind: Some(errors::ParamKindInTyOfConstParam::Type),
+                                    },
+                                );
                             }
                             return Res::Err;
                         }
@@ -1353,10 +1363,13 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
                         }
                         RibKind::ConstParamTy => {
                             if let Some(span) = finalize {
-                                self.report_error(span, ResolutionError::ParamInTyOfConstParam {
-                                    name: rib_ident.name,
-                                    param_kind: Some(errors::ParamKindInTyOfConstParam::Const),
-                                });
+                                self.report_error(
+                                    span,
+                                    ResolutionError::ParamInTyOfConstParam {
+                                        name: rib_ident.name,
+                                        param_kind: Some(errors::ParamKindInTyOfConstParam::Const),
+                                    },
+                                );
                             }
                             return Res::Err;
                         }