Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a test for #107975 #127003

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

GrigorenkoPV
Copy link
Contributor

@GrigorenkoPV GrigorenkoPV commented Jun 26, 2024

The int is zero. But also not zero. This is so much fun.

This is a part of #105107.

Initially I was going to just rebase #108445, but quite a few things changed since then:

As an aside, the naming for addr_of! is quite unfortunate in context of provenance APIs. Because addr_of! gives you a pointer, but what provenance APIs refer to as "address" is the usize value. Oh well.

UPD1: GitHub is incapable of parsing #107975 in the PR name, so let's add it here.

Footnotes

  1. UPD2: The other mcve does not work anymore either, saying "this behavior recently changed as a result of a bug fix; see tracking issue for "universe transition" #56105 for details."

@rustbot
Copy link
Collaborator

rustbot commented Jun 26, 2024

r? @pnkfelix

rustbot has assigned @pnkfelix.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 26, 2024
#![feature(exposed_provenance)]

use std::ptr::addr_of;

Copy link
Member

Choose a reason for hiding this comment

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

We'd better add a comment describing the expected result

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

assert_ne!(i, 0);
println!("{}", i);
assert_eq!(i, 0);
}
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add some more scenarios like #107975 (comment), #107975 (comment), #107975 (comment) and #107975 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@GrigorenkoPV
Copy link
Contributor Author

@rustbot author

@rustbot rustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Jun 30, 2024
@rust-log-analyzer

This comment has been minimized.

@GrigorenkoPV
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot 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 Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants