Rollup merge of #118915 - compiler-errors:alias-nits, r=lcnr
Add some comments, add `can_define_opaque_ty` check to `try_normalize_ty_recur` Follow-up from #117278, since I was recently re-reviewing this code.
This commit is contained in:
commit
859874f3eb
8 changed files with 65 additions and 45 deletions
|
@ -315,7 +315,7 @@ impl<'tcx> BorrowExplanation<'tcx> {
|
|||
let mut failed = false;
|
||||
|
||||
let elaborated_args = std::iter::zip(*args, &generics.params).map(|(arg, param)| {
|
||||
if let Some(ty::Dynamic(obj, _, ty::DynKind::Dyn)) = arg.as_type().map(Ty::kind) {
|
||||
if let Some(ty::Dynamic(obj, _, ty::Dyn)) = arg.as_type().map(Ty::kind) {
|
||||
let default = tcx.object_lifetime_default(param.def_id);
|
||||
|
||||
let re_static = tcx.lifetimes.re_static;
|
||||
|
@ -339,7 +339,7 @@ impl<'tcx> BorrowExplanation<'tcx> {
|
|||
|
||||
has_dyn = true;
|
||||
|
||||
Ty::new_dynamic(tcx, obj, implied_region, ty::DynKind::Dyn).into()
|
||||
Ty::new_dynamic(tcx, obj, implied_region, ty::Dyn).into()
|
||||
} else {
|
||||
arg
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue