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

Make note of noalias in unsafe reference section #23813

Merged
merged 1 commit into from
Mar 31, 2015

Conversation

steveklabnik
Copy link
Member

Fixes #19733

@rust-highfive
Copy link
Collaborator

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@Manishearth
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Mar 29, 2015

📌 Commit 8a015e5 has been approved by Manishearth

@huonw
Copy link
Member

huonw commented Mar 29, 2015

@bors r-

@luqmana noted on IRC that the statement about & isn't quite true:

[18:01:26] <Luqman> steveklabnik: for https://github.com/rust-lang/rust/pull/23813, not all &T are marked noalias just those for which T contains no UnsafeCell<U>

@steveklabnik
Copy link
Member Author

@huonw @luqmana updated, r?

@@ -1237,6 +1237,9 @@ the guarantee that these issues are never caused by safe code.
* Breaking the [pointer aliasing
rules](http://llvm.org/docs/LangRef.html#pointer-aliasing-rules)
with raw pointers (a subset of the rules used by C)
* `&mut` and `&` follow LLVM’s scoped [noalias] model, except if the `&T`
Copy link
Member

Choose a reason for hiding this comment

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

There's a point just above talking about UnsafeCell, maybe these could be merged/moved closer together?

@steveklabnik
Copy link
Member Author

@huonw : makes sense. I've moved that down, as I think it flows better overall.

@emberian
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Mar 30, 2015

📌 Commit 6c0314a has been approved by cmr

Manishearth added a commit to Manishearth/rust that referenced this pull request Mar 31, 2015
bors added a commit that referenced this pull request Mar 31, 2015
@bors bors merged commit 6c0314a into rust-lang:master Mar 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mutable Pointer Aliasing Rules are Unclear for Unsafe Code
6 participants