Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Dec 2, 2020

This test relies on deduplication of constants. I do not think that this is a guarantee that Rust currently makes, and indeed Miri does not deduplicate constants the same way that rustc does, leading to different behavior in this test.

For now, I propose we simply disable this test in Miri.

@rust-highfive
Copy link
Contributor

r? @dtolnay

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 2, 2020

unsafe {
// Miri does not deduplicate consts (https://github.com/rust-lang/miri/issues/131)
#[cfg(not(miri))]
Copy link
Member Author

Choose a reason for hiding this comment

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

I'd prefer to have the comment and the attribute on the same line (so that grepping for the attribute also shows explanations) but rustfmt won't let me. :(

@oli-obk
Copy link
Contributor

oli-obk commented Dec 3, 2020

r? @oli-obk

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Dec 3, 2020

📌 Commit 7e74b72 has been approved by oli-obk

@rust-highfive rust-highfive assigned oli-obk and unassigned dtolnay Dec 3, 2020
@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 Dec 3, 2020
@bors bors merged commit 0a52b43 into rust-lang:master Dec 4, 2020
@rustbot rustbot added this to the 1.50.0 milestone Dec 4, 2020
@RalfJung RalfJung deleted the miri-const_str_ptr branch December 5, 2020 09:00
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.

6 participants