Use correct ImplSource for alias bounds
This commit is contained in:
parent
207b4b8e88
commit
e34723997a
@ -157,8 +157,7 @@ fn to_selection<'tcx>(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
CandidateSource::BuiltinImpl(builtin) => ImplSource::Builtin(builtin, nested),
|
CandidateSource::BuiltinImpl(builtin) => ImplSource::Builtin(builtin, nested),
|
||||||
CandidateSource::ParamEnv(_) => ImplSource::Param(nested),
|
CandidateSource::ParamEnv(_) | CandidateSource::AliasBound => ImplSource::Param(nested),
|
||||||
CandidateSource::AliasBound => ImplSource::Builtin(BuiltinImplSource::Misc, nested),
|
|
||||||
CandidateSource::CoherenceUnknowable => {
|
CandidateSource::CoherenceUnknowable => {
|
||||||
span_bug!(span, "didn't expect to select an unknowable candidate")
|
span_bug!(span, "didn't expect to select an unknowable candidate")
|
||||||
}
|
}
|
||||||
|
13
tests/ui/traits/next-solver/select-alias-bound-as-param.rs
Normal file
13
tests/ui/traits/next-solver/select-alias-bound-as-param.rs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
//@ check-pass
|
||||||
|
//@ compile-flags: -Znext-solver
|
||||||
|
|
||||||
|
pub(crate) fn y() -> impl FnMut() {
|
||||||
|
|| {}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(crate) fn x(a: (), b: ()) {
|
||||||
|
let x = ();
|
||||||
|
y()()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {}
|
Loading…
Reference in New Issue
Block a user