rust/compiler/rustc_session/src
Matthias Krüger c699b05306
Rollup merge of #105286 - willcrichton:maximal-hir-to-mir-coverage, r=cjgillot
Add -Z maximal-hir-to-mir-coverage flag

This PR adds a new unstable flag `-Z maximal-hir-to-mir-coverage` that changes the behavior of `maybe_lint_level_root_bounded`, pursuant to [a discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Mapping.20MIR.20to.20HIR). When enabled, this function will not search upwards for a lint root, but rather immediately return the provided HIR node ID. This change increases the granularity of the mapping between MIR locations and HIR nodes inside the `SourceScopeLocalData` data structures. This increase in granularity is useful for rustc consumers like [Flowistry](https://github.com/willcrichton/flowistry) that rely on getting source-mapping information about the MIR CFG that is as precise as possible.

A test `maximal_mir_to_hir_coverage.rs` has been added to verify that this flag does not break anything.

r? `@cjgillot`

cc `@gavinleroy`
2022-12-06 16:54:55 +01:00
..
config
cgu_reuse_tracker.rs Remove useless borrows and derefs 2022-12-01 17:34:43 +00:00
code_stats.rs
config.rs Auto merge of #105175 - michaelwoerister:add-stable-ord-trait, r=nagisa 2022-12-06 09:21:49 +00:00
cstore.rs
errors.rs Rollup merge of #105050 - WaffleLapkin:uselessrefign, r=jyn514 2022-12-03 17:37:42 +01:00
filesearch.rs
lib.rs
options.rs Add -Z maximal-hir-to-mir-coverage flag 2022-12-04 23:58:20 -08:00
output.rs
parse.rs
search_paths.rs
session.rs Rollup merge of #104780 - BoxyUwU:error_reported_not_be_bad, r=oli-obk 2022-11-24 21:34:54 +01:00
utils.rs