-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Cleanup mir/borrowck #55122
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
Cleanup mir/borrowck #55122
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me pending nit
@@ -92,12 +92,12 @@ impl<'tcx> fmt::Display for BorrowData<'tcx> { | |||
mir::BorrowKind::Mut { .. } => "mut ", | |||
}; | |||
let region = self.region.to_string(); | |||
let region = if region.len() > 0 { | |||
format!("{} ", region) | |||
let separator = if region.len() > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, traditionally I think we've been refactoring this to !region.is_empty()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have, I just missed that one; I'll update shortly.
2d9b9d1
to
f636079
Compare
@Mark-Simulacrum comment addressed. |
☔ The latest upstream changes (presumably #54941) made this pull request unmergeable. Please resolve the merge conflicts. |
f636079
to
5620f6d
Compare
Rebased. |
@bors r+ rollup |
📌 Commit 5620f6d has been approved by |
…-Simulacrum Cleanup mir/borrowck - remove a redundant `.clone()` - a few string tweaks - deduplicate assignments and `return`s - simplify common patterns - remove redundant `return`s
Rollup of 18 pull requests Successful merges: - #54646 (improve documentation on std::thread::sleep) - #54933 (Cleanup the rest of codegen_llvm) - #54964 (Run both lldb and gdb tests) - #55016 (Deduplicate some code and compile-time values around vtables) - #55031 (Improve verify_llvm_ir config option) - #55050 (doc std::fmt: the Python inspiration is already mentioned in precedin…) - #55077 (rustdoc: Use dyn keyword when rendering dynamic traits) - #55080 (Detect if access to localStorage is forbidden by the user's browser) - #55090 (regression test for move out of borrow via pattern) - #55102 (resolve: Do not skip extern prelude during speculative resolution) - #55104 (Add test for #34229) - #55111 ([Rustc Book] Explain --cfg's arguments) - #55122 (Cleanup mir/borrowck) - #55127 (Remove HybridBitSet::dummy) - #55128 (Fix LLVMRustInlineAsmVerify return type mismatch) - #55142 (miri: layout should not affect CTFE checks (outside of validation)) - #55151 (Cleanup nll) - #55161 ([librustdoc] Disable spellcheck for search field)
.clone()
return
sreturn
s