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:
parent
4260f7ec67
commit
80d2bdb619
98 changed files with 653 additions and 687 deletions
|
@ -40,8 +40,8 @@ impl AttrWrapper {
|
|||
AttrWrapper { attrs: AttrVec::new(), start_pos: usize::MAX }
|
||||
}
|
||||
|
||||
pub(crate) fn take_for_recovery(self, sess: &ParseSess) -> AttrVec {
|
||||
sess.dcx.span_delayed_bug(
|
||||
pub(crate) fn take_for_recovery(self, psess: &ParseSess) -> AttrVec {
|
||||
psess.dcx.span_delayed_bug(
|
||||
self.attrs.get(0).map(|attr| attr.span).unwrap_or(DUMMY_SP),
|
||||
"AttrVec is taken for recovery but no error is produced",
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue