Skip to content

Suppress MIR comments of FnDef and unit types - #75670

Merged
bors merged 3 commits into
rust-lang:masterfrom
tesuji:suppress-mir-fndef-ty
Aug 20, 2020
Merged

Suppress MIR comments of FnDef and unit types#75670
bors merged 3 commits into
rust-lang:masterfrom
tesuji:suppress-mir-fndef-ty

Conversation

@tesuji

@tesujitesuji commented Aug 18, 2020

Copy link
Copy Markdown
Contributor

An expansion of #75566.
Comments of FnDef MIR constant already contain ty::Contains comments.

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 18, 2020
@oli-obk

Copy link
Copy Markdown
Contributor

@bors r+

Nice! If you want to do something else along this line, we should really suppress the const infront of FnDefs

@bors

bors commented Aug 18, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 0f7a43c861cb07aadcd5efdc328184ec9023a452 has been approved by oli-obk

@borsbors 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 Aug 18, 2020
@tesuji

Copy link
Copy Markdown
ContributorAuthor

@bors r-
Build failed. Will fix in tommorow morning.

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 18, 2020
@tesuji
tesujiforce-pushed the suppress-mir-fndef-ty branch 2 times, most recently from 432fb42 to 7c4d315CompareAugust 19, 2020 07:59

@tesujitesuji left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some tests output are changes. I don't understand why's that?

Edit: Everything is normal. I just read the diff wrong.

@oli-obk

Copy link
Copy Markdown
Contributor

r=me with CI passing

@tesuji

Copy link
Copy Markdown
ContributorAuthor

CI is green.

@oli-obk

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Aug 19, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 7c4d315 has been approved by oli-obk

@borsbors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 19, 2020
tmandry added a commit to tmandry/rust that referenced this pull request Aug 19, 2020
…-obk
Suppress MIR comments for FnDef in ty::Const
An expansion of rust-lang#75566.
The comments in MIR constant already contains `ty::Contains` comments.
@tmandrytmandry mentioned this pull request Aug 19, 2020
@tmandry

Copy link
Copy Markdown
Member

Failed in #75712 (comment), @bors r-

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 19, 2020
@tesuji

Copy link
Copy Markdown
ContributorAuthor

mir-opt/instrument_coverage.rs test needs profiler support:

// needs-profiler-support

However, profiler is disable by default:
#profiler = false

So the test cannot be run in my machine.

Does profiler need support from LLVM ? I am using local LLVM if that count.

@tesuji
tesujiforce-pushed the suppress-mir-fndef-ty branch from 230b70e to bb34238CompareAugust 20, 2020 09:29
@tesuji
tesujiforce-pushed the suppress-mir-fndef-ty branch from bb34238 to 86cf461CompareAugust 20, 2020 09:33
@tesuji

tesuji commented Aug 20, 2020

Copy link
Copy Markdown
ContributorAuthor

Done!

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 20, 2020
@oli-obk

Copy link
Copy Markdown
Contributor

@bors r+ p=1 (let's schedule it before other mir-opt PRs)

@bors

bors commented Aug 20, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 86cf461 has been approved by oli-obk

@borsbors 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 Aug 20, 2020
@tesujitesuji changed the title Suppress MIR comments for FnDef in ty::ConstSuppress MIR comments of FnDef and unit typesAug 20, 2020
_6 = _3; // scope 4 at $DIR/array-index-is-temporary.rs:16:25: 16:26
_5 = const foo(move _6) -> bb1; // scope 4 at $DIR/array-index-is-temporary.rs:16:21: 16:27
// ty::Const
// + ty: unsafe fn(*mut usize) -> u32 {foo}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exact type of functions can sometimes be useful.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type is still shown right below (though we should probably cut out the val part of the literal field as it's useless for zsts.

@bors

bors commented Aug 20, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 86cf461 with merge 5fff382...

@bors

bors commented Aug 20, 2020

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions, checks-azure
Approved by: oli-obk
Pushing 5fff382 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Aug 20, 2020
@bors
bors merged commit 5fff382 into rust-lang:masterAug 20, 2020
@tesuji
tesuji deleted the suppress-mir-fndef-ty branch August 20, 2020 14:55
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 21, 2020
Suppress "const" prefix of FnDef constants in MIR dump
I [was asked][1] to suppress the `const` infront of `FnDef`.
I tried to suppress comments for other types, but turned out that `const ()` and `()` is different: rust-lang#75697 (comment)
[1]: rust-lang#75670 (comment)
@cuvipercuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: 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.

8 participants

@tesuji@oli-obk@bors@tmandry@bjorn3@cuviper@rust-highfive@rustbot