-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Cover reference equality in primitive.reference API docs #54197
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Can I help with this issue? |
@brson Still waiting for your reply |
lucasloisp
added a commit
to lucasloisp/rust
that referenced
this issue
Oct 2, 2018
Clarification of the use of `ptr::eq` to test equality of references via address by pointer coercion
@V1shvesh Sorry, it looks like @lucasloisp got to this now, in #54755. |
pietroalbini
added a commit
to pietroalbini/rust
that referenced
this issue
Oct 9, 2018
…ss-eq, r=QuietMisdreavus Documents reference equality by address (rust-lang#54197) Clarification of the use of `ptr::eq` to test equality of references via address by pointer coercion, regarding issue rust-lang#54197 . The same example as in `ptr::eq` docs is shown here to clarify that `PartialEq` compares values pointed-to instead of via address (which can be desired in some cases)
pietroalbini
added a commit
to pietroalbini/rust
that referenced
this issue
Oct 10, 2018
…ss-eq, r=QuietMisdreavus Documents reference equality by address (rust-lang#54197) Clarification of the use of `ptr::eq` to test equality of references via address by pointer coercion, regarding issue rust-lang#54197 . The same example as in `ptr::eq` docs is shown here to clarify that `PartialEq` compares values pointed-to instead of via address (which can be desired in some cases)
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this issue
Oct 11, 2018
…ss-eq, r=QuietMisdreavus Documents reference equality by address (rust-lang#54197) Clarification of the use of `ptr::eq` to test equality of references via address by pointer coercion, regarding issue rust-lang#54197 . The same example as in `ptr::eq` docs is shown here to clarify that `PartialEq` compares values pointed-to instead of via address (which can be desired in some cases)
kennytm
added a commit
to kennytm/rust
that referenced
this issue
Oct 12, 2018
…ss-eq, r=QuietMisdreavus Documents reference equality by address (rust-lang#54197) Clarification of the use of `ptr::eq` to test equality of references via address by pointer coercion, regarding issue rust-lang#54197 . The same example as in `ptr::eq` docs is shown here to clarify that `PartialEq` compares values pointed-to instead of via address (which can be desired in some cases)
bors
added a commit
that referenced
this issue
Oct 12, 2018
Rollup of 16 pull requests Successful merges: - #54755 (Documents reference equality by address (#54197)) - #54811 (During rustc bootstrap, make default for `optimize` independent of `debug`) - #54825 (NLL says "borrowed content" instead of more precise "dereference of raw pointer") - #54860 (Add doc comments about safest way to initialize a vector of zeros) - #54869 (Fix mobile docs) - #54891 (Fix tracking issue for Once::is_completed) - #54913 (doc fix: it's auto traits that make for automatic implementations) - #54920 (Fix handling of #[must_use] on unit and uninhabited types) - #54932 (A handful of random string-related improvements) - #54936 (impl Eq+Hash for TyLayout) - #54950 (std: Synchronize global allocator on wasm32) - #54956 ("(using ..." doesn't have the matching ")") - #54958 (add a macro for static (compile-time) assertions) - #54967 (Remove incorrect span for second label inner macro invocation) - #54983 (Fix slice's benchmarks) - #54989 (Fix spelling in the documentation to htmldocck.py) Failed merges: r? @ghost
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
This page: https://doc.rust-lang.org/std/primitive.reference.html
It's not obvious that reference equality is accomplished via implicit reference-pointer coercion plus
ptr::eq
. Theptr::eq
docs mention this, but I would not look there to find reference equality.The reference primitive page is someplace I would look for info about reference equality. Update this page to discuss reference equality, and link to
ptr::eq
.The text was updated successfully, but these errors were encountered: