Segfault due to impossible_predicates
treating ambiguous obligation as impossible
#141119
Labels
A-codegen
Area: Code generation
C-bug
Category: This is a bug.
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
P-critical
Critical priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
WG-trait-system-refactor
The Rustc Trait System Refactor Initiative (-Znext-solver)
I tried this code:
I expected it to work. But instead:
This is a manifestation of two bugs:
dyn Trait: Trait
impossible_predicates
methodSince the new trait solver treats some
dyn Trait: Trait
overlap as ambiguity (specifically when the responses from the two candidates differ), and we strike methods from the vtable ifimpossible_predicates
returns true, a false positive will lead to a segfault.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: