rust/compiler/rustc_middle/src
bors d5833423a0 Auto merge of #102256 - cjgillot:let-under, r=lcnr
Introduce a no-op `PlaceMention` statement for `let _ =`.

Fixes https://github.com/rust-lang/rust/issues/54003
Fixes https://github.com/rust-lang/rust/issues/80059
Split from https://github.com/rust-lang/rust/pull/101500

This PR introduces a new `PlaceMention` statement dedicated to matches that neither introduce bindings nor ascribe types.  Without this, all traces of the match would vanish from MIR, making it impossible to diagnose unsafety or use in #101500.

This allows to mark `let _ = <unsafe union access or dereference>` as requiring an unsafe block.
Nominating for lang team, as this introduces an extra error.
2023-03-10 11:55:59 +00:00
..
dep_graph Pass DepContext and QueryContext by value when practical 2023-02-14 17:21:18 +01:00
hir rustc_middle: Remove trait DefIdTree 2023-03-02 23:46:44 +04:00
infer Auto merge of #108121 - aliemjay:resolve-var-region, r=lcnr 2023-03-08 12:33:21 +00:00
middle rustc_middle: Remove trait DefIdTree 2023-03-02 23:46:44 +04:00
mir Pacify tidy. 2023-03-09 17:45:13 +00:00
query Auto merge of #108312 - michaelwoerister:hash-set-not-hash-stable, r=eholk 2023-03-08 06:07:11 +00:00
thir Move THIR printing to rustc_mir_build. 2023-02-26 14:31:15 +00:00
traits canonicalization 2023-03-03 12:45:03 +01:00
ty Rollup merge of #108294 - compiler-errors:arbitary-sugg-binder, r=TaKO8Ki 2023-03-09 12:11:52 +01:00
util Add some docs to bug, span_bug and delay_span_bug 2022-12-30 16:47:56 +01:00
arena.rs Use FxIndexSet instead of FxHashSet for asm_target_features query. 2023-03-01 10:19:26 +01:00
error.rs Match crate and slug names 2022-11-21 15:24:50 +01:00
lib.rs errors: generate typed identifiers in each crate 2023-02-22 09:15:53 +00:00
lint.rs create helper function for rustc_lint_defs::Level and remove it's duplicated code r=ozkanonur 2023-01-10 10:56:17 +03:00
macros.rs Remove type-traversal trait aliases 2023-02-22 17:04:58 +00:00
metadata.rs rustc: Parameterize ty::Visibility over used ID 2022-09-07 13:35:41 +04:00
tests.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
thir.rs Make ExprKind the first field in thir::Expr 2023-03-02 18:21:44 +00:00
values.rs rustc_middle: Remove trait DefIdTree 2023-03-02 23:46:44 +04:00