Skip to content

Commit e3f1760

Browse files
Use correct ImplSource for alias bounds
1 parent 207b4b8 commit e3f1760

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

compiler/rustc_trait_selection/src/solve/eval_ctxt/select.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,9 @@ fn to_selection<'tcx>(
157157
})
158158
}
159159
CandidateSource::BuiltinImpl(builtin) => ImplSource::Builtin(builtin, nested),
160-
CandidateSource::ParamEnv(_) => ImplSource::Param(nested),
161-
CandidateSource::AliasBound => ImplSource::Builtin(BuiltinImplSource::Misc, nested),
160+
CandidateSource::ParamEnv(_) | CandidateSource::AliasBound => {
161+
ImplSource::Builtin(BuiltinImplSource::Misc, nested)
162+
}
162163
CandidateSource::CoherenceUnknowable => {
163164
span_bug!(span, "didn't expect to select an unknowable candidate")
164165
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//@ check-pass
2+
//@ compile-flags: -Znext-solver
3+
4+
pub(crate) fn y() -> impl FnMut() {
5+
|| {}
6+
}
7+
8+
pub(crate) fn x(a: (), b: ()) {
9+
let x = ();
10+
y()()
11+
}
12+
13+
fn main() {}

0 commit comments

Comments
 (0)