Skip to content

Commit 6c4feb6

Browse files
committed
Fix bootstrap
1 parent ed32482 commit 6c4feb6

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

compiler/rustc_trait_selection/src/traits/project.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,9 @@ fn assemble_candidates_from_predicates<'cx, 'tcx>(
978978
if is_match {
979979
candidate_set.push_candidate(ctor(data));
980980

981-
if potentially_unnormalized_candidates && !obligation.predicate.needs_infer() {
981+
if potentially_unnormalized_candidates
982+
&& !obligation.predicate.has_infer_types_or_consts()
983+
{
982984
// HACK: Pick the first trait def candidate for a fully
983985
// inferred predicate. This is to allow duplicates that
984986
// differ only in normalization.

compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
165165

166166
debug!("winnowed to {} candidates for {:?}: {:?}", candidates.len(), stack, candidates);
167167

168-
let needs_infer = stack.obligation.predicate.needs_infer();
168+
let needs_infer = stack.obligation.predicate.has_infer_types_or_consts();
169169

170170
// If there are STILL multiple candidates, we can further
171171
// reduce the list by dropping duplicates -- including

src/test/ui/issues/issue-60283.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ where
1616
fn main() {
1717
foo((), drop)
1818
//~^ ERROR type mismatch in function arguments
19-
//~| ERROR the size for values of type `<() as Trait<'_>>::Item` cannot be known at compilation time
19+
//~| ERROR size for values of type `<() as Trait<'_>>::Item` cannot be known at compilation time
2020
}

src/test/ui/type-alias-impl-trait/bounds-are-checked.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ error[E0308]: mismatched types
1212
LL | type X<'a> = impl Into<&'static str> + From<&'a str>;
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
1414
|
15-
= note: expected type `std::convert::From<&'a str>`
16-
found type `std::convert::From<&'static str>`
15+
= note: expected trait `std::convert::From<&'a str>`
16+
found trait `std::convert::From<&'static str>`
1717
note: the lifetime `'a` as defined on the item at 6:8...
1818
--> $DIR/bounds-are-checked.rs:6:8
1919
|

0 commit comments

Comments
 (0)