diff options
| author | dianne <diannes.gm@gmail.com> | 2025-04-07 12:06:03 -0700 |
|---|---|---|
| committer | dianne <diannes.gm@gmail.com> | 2025-04-16 14:42:56 -0700 |
| commit | d6df469c3d5d87bd5b853812bddae2ca2cbd1cb8 (patch) | |
| tree | ee99743bb1d78b1d17966cf4c5015b4f9ca10dec /compiler/rustc_codegen_gcc/example/std_example.rs | |
| parent | 91d0b579f020964bfe6bcaa86fbfc8fd493ae4db (diff) | |
| download | rust-d6df469c3d5d87bd5b853812bddae2ca2cbd1cb8.tar.gz rust-d6df469c3d5d87bd5b853812bddae2ca2cbd1cb8.zip | |
refactor path pattern checking to get info for peeling
See the doc comment on `ResolvedPat` for more information. This and the next couple commits split resolution apart from checking for path, struct, and tuple struct patterns, in order to find the pattern's type before peeling the scrutinee. This helps us avoid peeling the scrutinee when the pattern could match it. The reason this handles errors from resolution after peeling is for struct and tuple struct patterns: we check their subpatterns even when they fail to resolve, to potentially catch more resolution errors. By doing this after peeling, we're able to use the updated `PatInfo`. I don't know if there's currently any observable difference from using the outdated `PatInfo`, but it could potentially be a source of subtle diagnostic bugs in the future, so I'm opting to peel first.
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/std_example.rs')
0 files changed, 0 insertions, 0 deletions
