Skip to content

Conversation

richkadel
Copy link
Contributor

This replaces the relevant commits (2 and 3) from PR #85082, and also corrects an error querying for coverageinfo.

  1. coverageinfo query needs to use the same MIR as codegen

I ran into an error trying to fix dead block coverage and realized the
coverageinfo query is getting a different MIR compared to the
codegenned MIR, which can sometimes be a problem during mapgen.

I changed that query to use the InstandeDef (which includes the
generic parameter substitutions, prosibly specific to const params)
instead of the DefId (without unknown/default const substitutions).

  1. Simplified body_span and filtered span code

Some code cleanup extracted from future (but unfinished) commit to fix
coverage in attr macro functions.

  1. Spanview needs the relevant body_span used for coverage

The coverage body_span doesn't always match the function body_span.

r? @tmandry

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 12, 2021
@bors
Copy link
Collaborator

bors commented May 12, 2021

☔ The latest upstream changes (presumably #84278) made this pull request unmergeable. Please resolve the merge conflicts.

@tmandry
Copy link
Member

tmandry commented May 12, 2021

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 12, 2021

📌 Commit bd3c4b0986110a509ce3cb3db82eed2bf0a662ce has been approved by tmandry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 12, 2021
richkadel added 2 commits May 12, 2021 20:10
The coverage body_span doesn't always match the function body_span.
Some code cleanup extracted from future (but unfinished) commit to fix
coverage in attr macro functions.
@richkadel richkadel force-pushed the ice-fixes-minus-dead-blocks branch from bd3c4b0 to 501cd79 Compare May 13, 2021 03:15
I ran into an error trying to fix dead block coverage and realized the
`coverageinfo` query is getting a different MIR compared to the
codegenned MIR, which can sometimes be a problem during mapgen.

I changed that query to use the `InstandeDef` (which includes the
generic parameter substitutions, prosibly specific to const params)
instead of the `DefId` (without unknown/default const substitutions).
@richkadel richkadel force-pushed the ice-fixes-minus-dead-blocks branch from 501cd79 to aed8ef5 Compare May 13, 2021 03:27
@richkadel
Copy link
Contributor Author

@bors r=tmandry

@bors
Copy link
Collaborator

bors commented May 13, 2021

@richkadel: 🔑 Insufficient privileges: Not in reviewers

@tmandry
Copy link
Member

tmandry commented May 14, 2021

@bors r+

@bors
Copy link
Collaborator

bors commented May 14, 2021

📌 Commit aed8ef5 has been approved by tmandry

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request May 15, 2021
…ks, r=tmandry

coverage bug fixes and some refactoring

This replaces the relevant commits (2 and 3) from PR rust-lang#85082, and also corrects an error querying for coverageinfo.

1. `coverageinfo` query needs to use the same MIR as codegen

I ran into an error trying to fix dead block coverage and realized the
`coverageinfo` query is getting a different MIR compared to the
codegenned MIR, which can sometimes be a problem during mapgen.

I changed that query to use the `InstandeDef` (which includes the
generic parameter substitutions, prosibly specific to const params)
instead of the `DefId` (without unknown/default const substitutions).

2. Simplified body_span and filtered span code

  Some code cleanup extracted from future (but unfinished) commit to fix
  coverage in attr macro functions.

3. Spanview needs the relevant body_span used for coverage

The coverage body_span doesn't always match the function body_span.

r? `@tmandry`
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request May 15, 2021
…ks, r=tmandry

coverage bug fixes and some refactoring

This replaces the relevant commits (2 and 3) from PR rust-lang#85082, and also corrects an error querying for coverageinfo.

1. `coverageinfo` query needs to use the same MIR as codegen

I ran into an error trying to fix dead block coverage and realized the
`coverageinfo` query is getting a different MIR compared to the
codegenned MIR, which can sometimes be a problem during mapgen.

I changed that query to use the `InstandeDef` (which includes the
generic parameter substitutions, prosibly specific to const params)
instead of the `DefId` (without unknown/default const substitutions).

2. Simplified body_span and filtered span code

  Some code cleanup extracted from future (but unfinished) commit to fix
  coverage in attr macro functions.

3. Spanview needs the relevant body_span used for coverage

The coverage body_span doesn't always match the function body_span.

r? ``@tmandry``
bors added a commit to rust-lang-ci/rust that referenced this pull request May 15, 2021
…laumeGomez

Rollup of 12 pull requests

Successful merges:

 - rust-lang#84461 (rustdoc: Remove unnecessary `StripItem` wrapper)
 - rust-lang#85067 (Minimize amount of fake `DefId`s used in rustdoc)
 - rust-lang#85207 (Fix typo in comment)
 - rust-lang#85215 (coverage bug fixes and some refactoring)
 - rust-lang#85221 (dbg macro: Discuss use in tests, and slightly clarify)
 - rust-lang#85246 (Miner code formatting)
 - rust-lang#85253 (swap function order for better read flow)
 - rust-lang#85256 (Fix display for "implementors" section)
 - rust-lang#85268 (Use my real name)
 - rust-lang#85278 (Improve match statements)
 - rust-lang#85289 (Fix toggle position on mobile)
 - rust-lang#85323 (Fix eslint errors)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e611e64 into rust-lang:master May 15, 2021
@rustbot rustbot added this to the 1.54.0 milestone May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants