about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-05-08 08:14:16 +0200
committerGitHub <noreply@github.com>2025-05-08 08:14:16 +0200
commita810f8ac89b6a3ccc614465e99898c7054f1850c (patch)
tree5b96188d0add2e2c633f876836e9c2b7bccdb018 /compiler/rustc_pattern_analysis/src
parent8a3ab85e7d995965c4482a28dfaa21cb4fb17984 (diff)
parentf03d246db98e0b67f38b015bcc86a23d9c1e9adf (diff)
downloadrust-a810f8ac89b6a3ccc614465e99898c7054f1850c.tar.gz
rust-a810f8ac89b6a3ccc614465e99898c7054f1850c.zip
Rollup merge of #140523 - compiler-errors:late-early-mismatch, r=jackh726
Better error message for late/early lifetime param mismatch

Rework the way we report early-/late-bound lifetime param mismatches to equate the trait and impl signatures using region variables, so that we can detect when a late-bound param is present in the signature in place of an early-bound param, or vice versa.

The diagnostic is a bit more technical, but it's more obviously clear to see what the problem is, even if it's not great at explaining how to fix it. I think this could be improved further, but I still think it's much better than what exists today.

Note to reviewer(s): I'd appreciate if we didn't bikeshed *too* much about this verbiage, b/c I hope it's clear that the old message sucked a lot. I'm happy to file bugs for interested new contributors to improve the messaging further.

Edit(fmease): Fixes https://github.com/rust-lang/rust/issues/33624.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions