Add check for ui_testing via promoting parameters from ParseSess to Session
This commit is contained in:
@@ -256,12 +256,7 @@ impl<'a> StripUnconfigured<'a> {
|
||||
);
|
||||
}
|
||||
|
||||
if !attr::cfg_matches(
|
||||
&cfg_predicate,
|
||||
&self.sess.parse_sess,
|
||||
self.lint_node_id,
|
||||
self.features,
|
||||
) {
|
||||
if !attr::cfg_matches(&cfg_predicate, &self.sess, self.lint_node_id, self.features) {
|
||||
return vec![];
|
||||
}
|
||||
|
||||
@@ -369,12 +364,7 @@ impl<'a> StripUnconfigured<'a> {
|
||||
};
|
||||
(
|
||||
parse_cfg(&meta_item, self.sess).map_or(true, |meta_item| {
|
||||
attr::cfg_matches(
|
||||
meta_item,
|
||||
&self.sess.parse_sess,
|
||||
self.lint_node_id,
|
||||
self.features,
|
||||
)
|
||||
attr::cfg_matches(meta_item, &self.sess, self.lint_node_id, self.features)
|
||||
}),
|
||||
Some(meta_item),
|
||||
)
|
||||
@@ -385,7 +375,7 @@ impl<'a> StripUnconfigured<'a> {
|
||||
pub(crate) fn maybe_emit_expr_attr_err(&self, attr: &Attribute) {
|
||||
if self.features.is_some_and(|features| !features.stmt_expr_attributes) {
|
||||
let mut err = feature_err(
|
||||
&self.sess.parse_sess,
|
||||
&self.sess,
|
||||
sym::stmt_expr_attributes,
|
||||
attr.span,
|
||||
"attributes on expressions are experimental",
|
||||
|
||||
Reference in New Issue
Block a user