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:
@@ -269,7 +269,7 @@ fn suggestion_for_allocator_api(
|
||||
if feature == sym::allocator_api {
|
||||
if let Some(trait_) = tcx.opt_parent(def_id) {
|
||||
if tcx.is_diagnostic_item(sym::Vec, trait_) {
|
||||
let sm = tcx.sess.parse_sess.source_map();
|
||||
let sm = tcx.sess.psess.source_map();
|
||||
let inner_types = sm.span_extend_to_prev_char(span, '<', true);
|
||||
if let Ok(snippet) = sm.span_to_snippet(inner_types) {
|
||||
return Some((
|
||||
|
||||
Reference in New Issue
Block a user