diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2024-07-02 09:38:49 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2025-07-03 14:59:27 +0000 |
| commit | 3380bfd1a00fe3f85e8597bfdb9ad4d65df75da9 (patch) | |
| tree | 4f7f10aa2d1f4a6a111dfdaf76515fdfe4b3e127 /compiler/rustc_resolve | |
| parent | 6268d0aa34b46981533b09827c1454b8cf27e032 (diff) | |
| download | rust-3380bfd1a00fe3f85e8597bfdb9ad4d65df75da9.tar.gz rust-3380bfd1a00fe3f85e8597bfdb9ad4d65df75da9.zip | |
Replace kw_span by full span.
Diffstat (limited to 'compiler/rustc_resolve')
| -rw-r--r-- | compiler/rustc_resolve/src/late.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/late/diagnostics.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index ac7bdda4195..4e8316bcd43 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -1656,7 +1656,7 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> { forward_ty_ban_rib.bindings.swap_remove(i); forward_ty_ban_rib_const_param_ty.bindings.swap_remove(i); } - GenericParamKind::Const { ref ty, kw_span: _, ref default } => { + GenericParamKind::Const { ref ty, span: _, ref default } => { // Const parameters can't have param bounds. assert!(param.bounds.is_empty()); diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index 6230b8cfbec..a4022691995 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -2940,7 +2940,7 @@ impl<'ast, 'ra, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> { let span = if let [.., bound] = ¶m.bounds[..] { bound.span() } else if let GenericParam { - kind: GenericParamKind::Const { ty, kw_span: _, default }, .. + kind: GenericParamKind::Const { ty, span: _, default }, .. } = param { default.as_ref().map(|def| def.value.span).unwrap_or(ty.span) } else { |
