Better Debug for Vars and VarsOs#114132
Conversation
|
r? @cuviper (rustbot has picked a reviewer for you, use r? to override) |
987b627 to
a99b5c4
Compare
This comment has been minimized.
This comment has been minimized.
9f46040 to
c9f89d1
Compare
|
This is missing Perhaps it would be easier if the debug printing logic was in the common code and the underlying OS-specific iterator could just be cloned? |
I'd rather not introduce additional allocations. Done. |
c9f89d1 to
3b5f414
Compare
|
@bors r+ |
|
📌 Commit 3b5f41477d4c279c9870d567e31965619396d9f1 has been approved by It is now in the queue for this repository. |
|
⌛ Testing commit 3b5f41477d4c279c9870d567e31965619396d9f1 with merge 1ef1988cc8a8ac40375b19a25a71cf9546abdbc4... |
|
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
3b5f414 to
216edcb
Compare
|
Missed a necessary deref, should compile now. |
|
@bors r+ |
…manieu Better Debug for Vars and VarsOs Display actual vars instead of two dots. The same was done for Args and ArgsOs in 275f9a0.
|
@bors r- |
|
Looks like an environment variable containing a single quoted string on windows was the culprit: |
|
This is caused by Will fix momentarily. |
Display actual vars instead of two dots. The same was done for Args and ArgsOs in 275f9a0.
216edcb to
35c0c03
Compare
|
This should be ready for another run. |
| } | ||
|
|
||
| // FIXME(https://github.com/rust-lang/rust/issues/114583): Remove this when <OsStr as Debug>::fmt matches <str as Debug>::fmt. | ||
| pub struct EnvStrDebug<'a> { |
There was a problem hiding this comment.
Could we avoid the code duplication here and move EnvStrDebug into common code?
There was a problem hiding this comment.
Not without introducing additional allocations.
There was a problem hiding this comment.
Perhaps I should elaborate. The various Env structures contain iterators - even when they are backed by vectors - so it isn't possible to implement Debug without iterating those iterators. This means the iterators must be cloned. In the case of a vector-backed iterator, cloning would allocate, which this approach avoids.
|
@bors r+ |
…manieu Better Debug for Vars and VarsOs Display actual vars instead of two dots. The same was done for Args and ArgsOs in 275f9a0.
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#94455 (Partially stabilize `int_roundings`) - rust-lang#114132 (Better Debug for Vars and VarsOs) - rust-lang#114584 (E0277 nolonger points at phantom `.await`) - rust-lang#114667 (Record binder for bare trait object in LifetimeCollectVisitor) - rust-lang#114692 (downgrade `internal_features` to warn) - rust-lang#114703 (Cover ParamConst in smir) - rust-lang#114734 (Mark oli as "on vacation") r? `@ghost` `@rustbot` modify labels: rollup
Display actual vars instead of two dots.
The same was done for Args and ArgsOs in 275f9a0.