-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #119069 - matthiaskrgr:rollup-xxk4m30, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #118852 (coverage: Skip instrumenting a function if no spans were extracted from MIR) - #118905 ([AIX] Fix XCOFF metadata) - #118967 (Add better ICE messages for some undescriptive panics) - #119051 (Replace `FileAllocationInfo` with `FileEndOfFileInfo`) - #119059 (Deny `~const` trait bounds in inherent impl headers) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
18 changed files
with
162 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Function name: no_spans_if_not::main | ||
Raw bytes (9): 0x[01, 01, 00, 01, 01, 0b, 01, 02, 02] | ||
Number of files: 1 | ||
- file 0 => global file 1 | ||
Number of expressions: 0 | ||
Number of file 0 mappings: 1 | ||
- Code(Counter(0)) at (prev + 11, 1) to (start + 2, 2) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
LL| |// edition: 2021 | ||
LL| | | ||
LL| |// If the span extractor can't find any relevant spans for a function, | ||
LL| |// but the function contains coverage span-marker statements (e.g. inserted | ||
LL| |// for `if !`), coverage codegen may think that it is instrumented and | ||
LL| |// consequently complain that it has no spans. | ||
LL| |// | ||
LL| |// Regression test for <https://github.com/rust-lang/rust/issues/118850>, | ||
LL| |// "A used function should have had coverage mapping data but did not". | ||
LL| | | ||
LL| 1|fn main() { | ||
LL| 1| affected_function(); | ||
LL| 1|} | ||
LL| | | ||
LL| |macro_rules! macro_that_defines_a_function { | ||
LL| | (fn $name:ident () $body:tt) => { | ||
LL| | fn $name () $body | ||
LL| | } | ||
LL| |} | ||
LL| | | ||
LL| |macro_that_defines_a_function! { | ||
LL| | fn affected_function() { | ||
LL| | if !false { | ||
LL| | () | ||
LL| | } else { | ||
LL| | () | ||
LL| | } | ||
LL| | } | ||
LL| |} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// edition: 2021 | ||
|
||
// If the span extractor can't find any relevant spans for a function, | ||
// but the function contains coverage span-marker statements (e.g. inserted | ||
// for `if !`), coverage codegen may think that it is instrumented and | ||
// consequently complain that it has no spans. | ||
// | ||
// Regression test for <https://github.com/rust-lang/rust/issues/118850>, | ||
// "A used function should have had coverage mapping data but did not". | ||
|
||
fn main() { | ||
affected_function(); | ||
} | ||
|
||
macro_rules! macro_that_defines_a_function { | ||
(fn $name:ident () $body:tt) => { | ||
fn $name () $body | ||
} | ||
} | ||
|
||
macro_that_defines_a_function! { | ||
fn affected_function() { | ||
if !false { | ||
() | ||
} else { | ||
() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.