diff options
| author | dianne <diannes.gm@gmail.com> | 2024-12-17 12:35:45 -0800 |
|---|---|---|
| committer | dianne <diannes.gm@gmail.com> | 2024-12-17 15:21:28 -0800 |
| commit | 28c6d0b55ba4369ea8e1073228c1b9821ea231d2 (patch) | |
| tree | 25a39b710e8b01209cc8c75a5f4678d8b6ff6f81 /compiler | |
| parent | 77e9051e22c89585f0e96f3476edbe664a80ccc0 (diff) | |
| download | rust-28c6d0b55ba4369ea8e1073228c1b9821ea231d2.tar.gz rust-28c6d0b55ba4369ea8e1073228c1b9821ea231d2.zip | |
Add the edition guide link from the match 2024 migration lint to the error as well
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_mir_build/src/thir/pattern/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_mir_build/src/thir/pattern/mod.rs b/compiler/rustc_mir_build/src/thir/pattern/mod.rs index 62bbb31440f..bdf243c87b6 100644 --- a/compiler/rustc_mir_build/src/thir/pattern/mod.rs +++ b/compiler/rustc_mir_build/src/thir/pattern/mod.rs @@ -70,6 +70,10 @@ pub(super) fn pat_from_hir<'a, 'tcx>( if is_hard_error { let mut err = tcx.dcx().struct_span_err(spans, fluent::mir_build_rust_2024_incompatible_pat); + if let Some(info) = lint::builtin::RUST_2024_INCOMPATIBLE_PAT.future_incompatible { + // provide the same reference link as the lint + err.note(format!("for more information, see {}", info.reference)); + } err.subdiagnostic(sugg); err.emit(); } else { |
