Merged
Conversation
Previously it was printing the address of the Unsafe contained in the Cell (i.e. the address of the Cell itself). This is clearly useless, and was presumably a mistake due to writing `*&` instead of `&*`. However, this later expression is likely also incorrect, since it takes a reference into a Cell while other user code is executing (i.e. the Show instance for the contained type), hence the contents should just be copied out.
bors
added a commit
that referenced
this pull request
Apr 2, 2014
std: fix Cell's Show instance. Previously it was printing the address of the Unsafe contained in the Cell (i.e. the address of the Cell itself). This is clearly useless, and was presumably a mistake due to writing `*&` instead of `&*`. However, this later expression is likely also incorrect, since it takes a reference into a Cell while other user code is executing (i.e. the Show instance for the contained type), hence the contents should just be copied out.
notriddle
pushed a commit
to notriddle/rust
that referenced
this pull request
Sep 20, 2022
Use memmem when searching for usages in ide-db We already have this dependency, so there is no reason not to use it as it is generally faster than std in our use case.
Jarcho
pushed a commit
to Jarcho/rust
that referenced
this pull request
Aug 24, 2024
Replace `rustc_semver` with `rustc_session::RustcVersion` Allows dropping a dependency but there is a behaviour change here, the following versions are no longer accepted: * `1` (would need to be `1.0` or `1.0.0`) * `1.0.0-alpha` * `1.0.0-alpha.2` * `1.0.0-beta` But this seems unlikely to effect anybody, I did some GitHub searching and found no occurrences outside our UI tests r? `@flip1995` changelog: none
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
std: fix Cell's Show instance.
Previously it was printing the address of the Unsafe contained in the
Cell (i.e. the address of the Cell itself). This is clearly useless, and
was presumably a mistake due to writing
*&instead of&*.However, this later expression is likely also incorrect, since it takes
a reference into a Cell while other user code is executing (i.e. the
Show instance for the contained type), hence the contents should just be
copied out.