Skip to content

builtin object candidates: ReplaceProjectionWith relate failures #171

Closed
rust-lang/rust
#139774
@lcnr

Description

@lcnr

encountered during try builds when compiling wasmparser.

pub trait Trait: Super {}
pub trait Super {
    type Output;
}

fn bound<T: Trait + ?Sized>() {}
fn visit_simd_operator<V: Super + ?Sized>() {
    bound::<dyn Trait<Output = <V as Super>::Output>>();
}

compiles on stable, results in the following ICE with the new solver

thread 'rustc' panicked at /home/lcnr/rust/compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs:930:26:
expected to be able to unify goal projection with dyn's projection: NoSolution

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions