Rollup merge of #103080 - ohno418:fix-hir-pretty-print-lifetimes, r=cjgillot
pretty: fix to print some lifetimes on HIR pretty-print HIR pretty-printer doesn't seem to print some lifetimes in types. This PR fixes that. Closes https://github.com/rust-lang/rust/issues/85089
This commit is contained in:
commit
d08f4a6464
3 changed files with 41 additions and 1 deletions
|
@ -1687,7 +1687,11 @@ impl<'a> State<'a> {
|
|||
|
||||
let mut nonelided_generic_args: bool = false;
|
||||
let elide_lifetimes = generic_args.args.iter().all(|arg| match arg {
|
||||
GenericArg::Lifetime(lt) => lt.is_elided(),
|
||||
GenericArg::Lifetime(lt) if lt.is_elided() => true,
|
||||
GenericArg::Lifetime(_) => {
|
||||
nonelided_generic_args = true;
|
||||
false
|
||||
}
|
||||
_ => {
|
||||
nonelided_generic_args = true;
|
||||
true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue