rust/compiler/rustc_mir/src
bors e1886935b7 Auto merge of #84532 - richkadel:issue-83792, r=tmandry
Fix coverage ICE because fn_sig can have a span that crosses file bou…

Fixes: #83792

MIR `InstrumentCoverage` assumed the `FnSig` span was contained within a
single file, but this is not always the case. Some macro constructions
can result in a span that starts in one `SourceFile` and ends in a
different one.

The `FnSig` span is included in coverage results as long as that span is
in the same `SourceFile` and the same macro context, but by assuming the
`FnSig` span's `hi()` and `lo()` were in the same file, I took this for
granted, and checked only that the `FnSig` `hi()` was in the same
`SourceFile` as the `body_span`.

I actually drop the `hi()` though, and extend the `FnSig` span to the
`body_span.lo()`, so I really should have simply checked that the
`FnSig` span's `lo()` was in the `SourceFile` of the `body_span`.

r? `@tmandry`
cc: `@wesleywiser`
2021-04-27 07:29:26 +00:00
..
borrow_check Auto merge of #84353 - estebank:as-ref-mir, r=davidtwco 2021-04-20 14:05:12 +00:00
const_eval remove now-unused 'is_min_const_fn' 2021-04-25 12:54:34 +02:00
dataflow fix few typos 2021-04-19 15:57:08 +03:00
interpret fix few typos 2021-04-19 15:57:08 +03:00
monomorphize Add an attribute to be able to configure the limit 2021-04-20 09:30:28 -04:00
transform Auto merge of #84532 - richkadel:issue-83792, r=tmandry 2021-04-27 07:29:26 +00:00
util fix few typos 2021-04-19 15:57:08 +03:00
lib.rs fix feature use in rustc libs 2021-04-18 22:05:45 +02:00
shim.rs Prepare mir::Constant for ty::Const only supporting valtrees 2021-03-12 12:43:54 +00:00