Auto merge of #120100 - oli-obk:astconv_lifetimes, r=BoxyUwU
Don't forget that the lifetime on hir types is `'tcx` This PR just tracks the `'tcx` lifetime to wherever the original objects actually have that lifetime. This code is needed for https://github.com/rust-lang/rust/pull/107606 (now #120131) so that `ast_ty_to_ty` can invoke `lit_to_const` on an argument passed to it. Currently the argument is `&hir::Ty<'_>`, but after this PR it is `&'tcx hir::Ty<'tcx>`.
This commit is contained in:
commit
867d39cdf6
26 changed files with 105 additions and 98 deletions
|
@ -248,7 +248,7 @@ pub struct InferArg {
|
|||
}
|
||||
|
||||
impl InferArg {
|
||||
pub fn to_ty(&self) -> Ty<'_> {
|
||||
pub fn to_ty(&self) -> Ty<'static> {
|
||||
Ty { kind: TyKind::Infer, span: self.span, hir_id: self.hir_id }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue