rust/compiler/rustc_interface/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
..
callbacks.rs typo 2022-05-23 22:51:34 +02:00
errors.rs Migrate all diagnostics 2022-10-23 10:09:44 +02:00
interface.rs Rename NestedMetaItem::[Ll]iteral as NestedMetaItem::[Ll]it. 2022-11-28 15:18:53 +11:00
lib.rs Fix rustdoc --version when used with download-rustc 2022-11-09 02:54:51 -06:00
passes.rs Auto merge of #105220 - oli-obk:feeding, r=cjgillot 2022-12-06 03:47:41 +00:00
proc_macro_decls.rs Simplify code 2022-11-05 17:54:06 +01:00
queries.rs Remove all but one call site of prepare_outputs and fetch the value from the TyCtxt instead 2022-12-03 12:28:01 +00:00
tests.rs Add -Z maximal-hir-to-mir-coverage flag 2022-12-04 23:58:20 -08:00
util.rs Use as_deref in compiler (but only where it makes sense) 2022-11-16 21:58:58 +00:00