Fix bootstrap
This commit is contained in:
parent
ed32482534
commit
6c4feb681f
|
@ -978,7 +978,9 @@ fn assemble_candidates_from_predicates<'cx, 'tcx>(
|
||||||
if is_match {
|
if is_match {
|
||||||
candidate_set.push_candidate(ctor(data));
|
candidate_set.push_candidate(ctor(data));
|
||||||
|
|
||||||
if potentially_unnormalized_candidates && !obligation.predicate.needs_infer() {
|
if potentially_unnormalized_candidates
|
||||||
|
&& !obligation.predicate.has_infer_types_or_consts()
|
||||||
|
{
|
||||||
// HACK: Pick the first trait def candidate for a fully
|
// HACK: Pick the first trait def candidate for a fully
|
||||||
// inferred predicate. This is to allow duplicates that
|
// inferred predicate. This is to allow duplicates that
|
||||||
// differ only in normalization.
|
// differ only in normalization.
|
||||||
|
|
|
@ -165,7 +165,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||||
|
|
||||||
debug!("winnowed to {} candidates for {:?}: {:?}", candidates.len(), stack, candidates);
|
debug!("winnowed to {} candidates for {:?}: {:?}", candidates.len(), stack, candidates);
|
||||||
|
|
||||||
let needs_infer = stack.obligation.predicate.needs_infer();
|
let needs_infer = stack.obligation.predicate.has_infer_types_or_consts();
|
||||||
|
|
||||||
// If there are STILL multiple candidates, we can further
|
// If there are STILL multiple candidates, we can further
|
||||||
// reduce the list by dropping duplicates -- including
|
// reduce the list by dropping duplicates -- including
|
||||||
|
|
|
@ -16,5 +16,5 @@ where
|
||||||
fn main() {
|
fn main() {
|
||||||
foo((), drop)
|
foo((), drop)
|
||||||
//~^ ERROR type mismatch in function arguments
|
//~^ ERROR type mismatch in function arguments
|
||||||
//~| ERROR the size for values of type `<() as Trait<'_>>::Item` cannot be known at compilation time
|
//~| ERROR size for values of type `<() as Trait<'_>>::Item` cannot be known at compilation time
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@ error[E0308]: mismatched types
|
||||||
LL | type X<'a> = impl Into<&'static str> + From<&'a str>;
|
LL | type X<'a> = impl Into<&'static str> + From<&'a str>;
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
||||||
|
|
|
|
||||||
= note: expected type `std::convert::From<&'a str>`
|
= note: expected trait `std::convert::From<&'a str>`
|
||||||
found type `std::convert::From<&'static str>`
|
found trait `std::convert::From<&'static str>`
|
||||||
note: the lifetime `'a` as defined on the item at 6:8...
|
note: the lifetime `'a` as defined on the item at 6:8...
|
||||||
--> $DIR/bounds-are-checked.rs:6:8
|
--> $DIR/bounds-are-checked.rs:6:8
|
||||||
|
|
|
|
||||||
|
|
Loading…
Reference in New Issue