Rename all ParseSess variables/fields/lifetimes as psess.

Existing names for values of this type are `sess`, `parse_sess`,
`parse_session`, and `ps`. `sess` is particularly annoying because
that's also used for `Session` values, which are often co-located, and
it can be difficult to know which type a value named `sess` refers to.
(That annoyance is the main motivation for this change.) `psess` is nice
and short, which is good for a name used this much.

The commit also renames some `parse_sess_created` values as
`psess_created`.
This commit is contained in:
Nicholas Nethercote
2024-03-04 16:31:49 +11:00
parent 4260f7ec67
commit 80d2bdb619
98 changed files with 653 additions and 687 deletions

View File

@@ -85,7 +85,7 @@ impl<'a> Parser<'a> {
// Always make an outer attribute - this allows us to recover from a misplaced
// inner attribute.
Some(attr::mk_doc_comment(
&self.sess.attr_id_generator,
&self.psess.attr_id_generator,
comment_kind,
ast::AttrStyle::Outer,
data,
@@ -135,7 +135,7 @@ impl<'a> Parser<'a> {
this.error_on_forbidden_inner_attr(attr_sp, inner_parse_policy);
}
Ok(attr::mk_attr_from_item(&self.sess.attr_id_generator, item, None, style, attr_sp))
Ok(attr::mk_attr_from_item(&self.psess.attr_id_generator, item, None, style, attr_sp))
})
}
@@ -288,7 +288,7 @@ impl<'a> Parser<'a> {
if attr_style == ast::AttrStyle::Inner {
self.bump();
Some(attr::mk_doc_comment(
&self.sess.attr_id_generator,
&self.psess.attr_id_generator,
comment_kind,
attr_style,
data,