Uh oh!
There was an error while loading. Please reload this page.
Less confusing placeholder when RefCell is exclusively borrowed - #44770
Merged
Conversation
Based on ExpHP's comment in https://users.rust-lang.org/t/refcell-borrow-mut-get-strange-result/12994 > it would perhaps be nicer if it didn't put something that could be > misinterpreted as a valid string value The previous Debug implementation would show: RefCell { value: "<borrowed>" } The new one is: RefCell { value: <borrowed> }
rust-highfive
commented
Sep 22, 2017
Contributor
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
sfackler
commented
Sep 22, 2017
Member
LGTM. I think Mutex might have something similar? |
dtolnay
commented
Sep 22, 2017
MemberAuthor
Here is what I ran to check for anything similar. RefCell is the only one outside of tests. Mutex prints |
dtolnay
commented
Sep 22, 2017
MemberAuthor
@bors r=sfackler rollup |
bors
commented
Sep 22, 2017
Collaborator
📌 Commit f9d92d2 has been approved by |
frewsxcv added a commit
to frewsxcv/rust
that referenced
this pull request
Sep 23, 2017
Less confusing placeholder when RefCell is exclusively borrowed Based on ExpHP's comment in [*RefCell.borrow_mut get strange result*](https://users.rust-lang.org/t/refcell-borrow-mut-get-strange-result/12994): > it would perhaps be nicer if it didn't put something that could be misinterpreted as a valid string value The previous Debug implementation would show: RefCell { value: "<borrowed>" } The new one is: RefCell { value: <borrowed> }
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 freeto 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.
Based on ExpHP's comment in RefCell.borrow_mut get strange result:
The previous Debug implementation would show:
The new one is: