1
Fork 0
rust/compiler/rustc_mir_build/src/thir
bors 0534655d9b Auto merge of #108504 - cjgillot:thir-pattern, r=compiler-errors,Nilstrieb
Check pattern refutability on THIR

The current `check_match` query is based on HIR, but partially re-lowers HIR into THIR.
This PR proposed to use the results of the `thir_body` query to check matches, instead of re-building THIR.

Most of the diagnostic changes are spans getting shorter, or commas/semicolons not getting removed.

This PR degrades the diagnostic for confusing constants in patterns (`let A = foo()` where `A` resolves to a `const A` somewhere): it does not point ot the definition of `const A` any more.
2023-04-06 12:42:01 +00:00
..
cx Add Span to StmtKind::Let. 2023-04-03 15:59:21 +00:00
pattern Auto merge of #108504 - cjgillot:thir-pattern, r=compiler-errors,Nilstrieb 2023-04-06 12:42:01 +00:00
constant.rs Add StrStyle to ast::LitKind::ByteStr. 2022-12-02 10:38:58 +11:00
mod.rs Move THIR printing to rustc_mir_build. 2023-02-26 14:31:15 +00:00
print.rs Add Span to StmtKind::Let. 2023-04-03 15:59:21 +00:00
util.rs Remove crate visibility usage in compiler 2022-05-20 20:04:54 -04:00