Skip to content

Commit 23276dd

Browse files
authored
Rollup merge of #143551 - compiler-errors:root-sub, r=cjgillot
Dont resolve instance of root in `mir_callgraph_cyclic` `Instance::try_resolve` on a default trait body method will always fail, since it's still possible to further substitute. This leads to a cycle, since in `tests/mir-opt/inline_default_trait_body.rs`, both `Trait::a` and `Trait::b` need to consider the other to be cyclical, but since we couldn't resolve a body, we'd just consider *nothing* to be cyclical. The root instance we care about when computing `mir_callgraph_cyclic` is trivial to compute (it's just `InstanceKind::Item`), so just replace it with a call to `Instance::new_raw`. r? `@cjgillot` `@oli-obk` Fixes rust-lang/rust#143534
2 parents aa9c42b + cc7f76c commit 23276dd

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)