Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit e347239

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

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ 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 => ImplSource::Param(nested),
162161
CandidateSource::CoherenceUnknowable => {
163162
span_bug!(span, "didn't expect to select an unknowable candidate")
164163
}
Lines changed: 13 additions & 0 deletions
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)