Manually walk into WF obligations in BestObligation proof tree visitor#135900
Manually walk into WF obligations in BestObligation proof tree visitor#135900bors merged 2 commits intorust-lang:masterfrom
BestObligation proof tree visitor#135900Conversation
|
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor changes to the core type system |
|
☔ The latest upstream changes (presumably #135893) made this pull request unmergeable. Please resolve the merge conflicts. |
| // HACK: We walk the nested obligations for a well-formed arg manually, | ||
| // since there's nontrivial logic in `wf.rs` to set up an obligation cause. | ||
| // Ideally we'd be able to track this better. |
There was a problem hiding this comment.
doc comment on visit_well_formed_goal instead
| match self.consider_ambiguities { | ||
| true if matches!( | ||
| nested_goal.result(), | ||
| Ok(Certainty::Maybe(MaybeCause::Ambiguity)) | ||
| ) => {} | ||
| false if matches!(nested_goal.result(), Err(_)) => {} | ||
| _ => continue, | ||
| } |
There was a problem hiding this comment.
match (self.condider_ambiguities, nested_goal.result())
lcnr
left a comment
There was a problem hiding this comment.
that's a fun solution 😁
r=me after nits
3568624 to
5f76f1a
Compare
|
@bors r=lcnr |
This comment has been minimized.
This comment has been minimized.
Manually walk into WF obligations in `BestObligation` proof tree visitor When we encounter a `WellFormed` obligation in the `BestObligation` proof tree visitor, ignore the proof tree and call `wf::unnormalized_obligations` to derive well-formed obligations with the correct cause codes. This is to avoid having to replicate the somewhat delicate logic that `wf.rs` does to set up its obligation causes... Don't see a better way to do this. vibes?? r? lcnr
|
@bors r- |
5f76f1a to
94ef5cf
Compare
|
@bors r=lcnr |
Manually walk into WF obligations in `BestObligation` proof tree visitor When we encounter a `WellFormed` obligation in the `BestObligation` proof tree visitor, ignore the proof tree and call `wf::unnormalized_obligations` to derive well-formed obligations with the correct cause codes. This is to avoid having to replicate the somewhat delicate logic that `wf.rs` does to set up its obligation causes... Don't see a better way to do this. vibes?? r? lcnr
|
failed locally in #136276 I think, may need rebase or something |
|
ya needs rebase @bors r- |
|
☔ The latest upstream changes (presumably #136318) made this pull request unmergeable. Please resolve the merge conflicts. |
94ef5cf to
304b3cf
Compare
|
@bors r=lcnr |
Manually walk into WF obligations in `BestObligation` proof tree visitor When we encounter a `WellFormed` obligation in the `BestObligation` proof tree visitor, ignore the proof tree and call `wf::unnormalized_obligations` to derive well-formed obligations with the correct cause codes. This is to avoid having to replicate the somewhat delicate logic that `wf.rs` does to set up its obligation causes... Don't see a better way to do this. vibes?? r? lcnr
…kingjubilee Rollup of 16 pull requests Successful merges: - rust-lang#133266 (ci: fix explanation why LLVM download is disabled for windows-gnu) - rust-lang#135768 (tests: Port `symbol-mangling-hashed` to rmake.rs) - rust-lang#135836 (bootstrap: only build `crt{begin,end}.o` when compiling to MUSL) - rust-lang#135840 (omit unused args warnings for intrinsics without body) - rust-lang#135900 (Manually walk into WF obligations in `BestObligation` proof tree visitor) - rust-lang#136146 (Explicitly choose x86 softfloat/hardfloat ABI) - rust-lang#136154 (Use +secure-plt for powerpc-unknown-linux-gnu{,spe}) - rust-lang#136163 (Fix off-by-one error causing slice::sort to abort the program) - rust-lang#136266 (fix broken release notes id) - rust-lang#136283 (Update encode_utf16 to mention it is native endian) - rust-lang#136309 (set rustc dylib on manually constructed rustc command) - rust-lang#136314 (Use proper type when applying deref adjustment in const) - rust-lang#136339 (CompileTest: Add Directives to Ignore `arm-unknown-*` Targets) - rust-lang#136348 (miri: make float min/max non-deterministic) - rust-lang#136351 (Add documentation for derive(CoercePointee)) - rust-lang#136358 (`#[optimize(none)]` implies `#[inline(never)]`) Failed merges: - rust-lang#135994 (Rename rustc_middle::Ty::is_unsafe_ptr to is_raw_ptr) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#135840 (omit unused args warnings for intrinsics without body) - rust-lang#135900 (Manually walk into WF obligations in `BestObligation` proof tree visitor) - rust-lang#136163 (Fix off-by-one error causing slice::sort to abort the program) - rust-lang#136266 (fix broken release notes id) - rust-lang#136314 (Use proper type when applying deref adjustment in const) - rust-lang#136348 (miri: make float min/max non-deterministic) - rust-lang#136351 (Add documentation for derive(CoercePointee)) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#135900 - compiler-errors:derive-wf, r=lcnr Manually walk into WF obligations in `BestObligation` proof tree visitor When we encounter a `WellFormed` obligation in the `BestObligation` proof tree visitor, ignore the proof tree and call `wf::unnormalized_obligations` to derive well-formed obligations with the correct cause codes. This is to avoid having to replicate the somewhat delicate logic that `wf.rs` does to set up its obligation causes... Don't see a better way to do this. vibes?? r? lcnr
When we encounter a
WellFormedobligation in theBestObligationproof tree visitor, ignore the proof tree and callwf::unnormalized_obligationsto derive well-formed obligations with the correct cause codes. This is to avoid having to replicate the somewhat delicate logic thatwf.rsdoes to set up its obligation causes... Don't see a better way to do this.vibes?? r? lcnr