triage: I-nominated T-lang
I don’t have time to really dig into it, but I suspect the bug here might be that the associated type version does compile (although the two examples are fairly different: the second one only has three traits but the first one has 4?). Rust tries to avoid reasoning about implementations that don’t exist, unless it absolutely has to (which is what the #[fundamental] attribute does, see e.g. https://dxr.mozilla.org/rust/rev/c14b615534ebcd5667f594c86d18eebff6afc7cb/src/libcore/marker.rs#60 and https://dxr.mozilla.org/rust/rev/c14b615534ebcd5667f594c86d18eebff6afc7cb/src/libcore/ops.rs#1637), because doing this reasoning is a pretty large backwards compatibility risk.
#[fundamental]
cc @rust-lang/lang, but especially @nikomatsakis
triage: I-nominated
triage: P-medium
@sfackler indicated that he was interested in making a PR for this and limiting it to the I/O adaptors for now.
Good catch reporting this bug! This should definitely be fixed, but PowerPC is not a “tier 1” platform, so it’s not a high priority (drop everything) sort of bug.
The libs team discussed this in triage yesterday and the conclusion was that the defer-the-error strategy is fine for Command. We discussed briefly that this may be altering the contract of Command (e.g. changing panics to results), but the Result behavior seems more consistent with the std::fs APIs.
Command
Result
std::fs
@sfackler is fixing the data corruption in #31068
Permalink to this digest
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.