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 Change process spawning to inherit the parent's signal mask by default 2022-10-20 14:53:38 -07:00
cgu_reuse_tracker.rs Remove useless borrows and derefs 2022-12-01 17:34:43 +00:00
code_stats.rs avoid some Symbol to String conversions 2022-07-17 04:09:20 +09:00
config.rs Auto merge of #105175 - michaelwoerister:add-stable-ord-trait, r=nagisa 2022-12-06 09:21:49 +00:00
cstore.rs change rlib format to discern native dependencies 2022-09-12 16:45:03 +03:00
errors.rs Rollup merge of #105050 - WaffleLapkin:uselessrefign, r=jyn514 2022-12-03 17:37:42 +01:00
filesearch.rs improve filesearch::get_or_default_sysroot r=ozkanonur 2022-11-04 17:06:47 +03:00
lib.rs remove cfg(bootstrap) 2022-09-26 10:14:45 +02:00
options.rs Add -Z maximal-hir-to-mir-coverage flag 2022-12-04 23:58:20 -08:00
output.rs translations(rustc_session): migrate output.rs 2022-09-10 08:19:17 +02:00
parse.rs Add more track_caller 2022-10-31 16:14:29 +01:00
search_paths.rs incr. comp.: Don't export impl_stable_hash_via_hash!() and warn about using it. 2022-04-19 10:43:20 +02:00
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 Get rid of native_library projection queries 2022-10-19 16:21:21 +02:00