Move binder for dyn to each list item
This commit is contained in:
parent
aec0fc58ad
commit
42b267d221
@ -480,17 +480,19 @@ fn assert_assignable<'tcx>(
|
|||||||
// fn(&T) -> for<'l> fn(&'l T) is allowed
|
// fn(&T) -> for<'l> fn(&'l T) is allowed
|
||||||
}
|
}
|
||||||
(&ty::Dynamic(from_traits, _), &ty::Dynamic(to_traits, _)) => {
|
(&ty::Dynamic(from_traits, _), &ty::Dynamic(to_traits, _)) => {
|
||||||
let from_traits = fx
|
for (from, to) in from_traits.iter().zip(to_traits) {
|
||||||
.tcx
|
let from = fx
|
||||||
.normalize_erasing_late_bound_regions(ParamEnv::reveal_all(), from_traits);
|
.tcx
|
||||||
let to_traits = fx
|
.normalize_erasing_late_bound_regions(ParamEnv::reveal_all(), from);
|
||||||
.tcx
|
let to = fx
|
||||||
.normalize_erasing_late_bound_regions(ParamEnv::reveal_all(), to_traits);
|
.tcx
|
||||||
assert_eq!(
|
.normalize_erasing_late_bound_regions(ParamEnv::reveal_all(), to);
|
||||||
from_traits, to_traits,
|
assert_eq!(
|
||||||
"Can't write trait object of incompatible traits {:?} to place with traits {:?}\n\n{:#?}",
|
from, to,
|
||||||
from_traits, to_traits, fx,
|
"Can't write trait object of incompatible traits {:?} to place with traits {:?}\n\n{:#?}",
|
||||||
);
|
from_traits, to_traits, fx,
|
||||||
|
);
|
||||||
|
}
|
||||||
// dyn for<'r> Trait<'r> -> dyn Trait<'_> is allowed
|
// dyn for<'r> Trait<'r> -> dyn Trait<'_> is allowed
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
|
Loading…
Reference in New Issue
Block a user