Add check for ui_testing via promoting parameters from ParseSess to Session
This commit is contained in:
@@ -82,7 +82,7 @@ pub(crate) fn collect(tcx: TyCtxt<'_>, LocalCrate: LocalCrate) -> Vec<NativeLib>
|
||||
|
||||
pub(crate) fn relevant_lib(sess: &Session, lib: &NativeLib) -> bool {
|
||||
match lib.cfg {
|
||||
Some(ref cfg) => attr::cfg_matches(cfg, &sess.parse_sess, CRATE_NODE_ID, None),
|
||||
Some(ref cfg) => attr::cfg_matches(cfg, sess, CRATE_NODE_ID, None),
|
||||
None => true,
|
||||
}
|
||||
}
|
||||
@@ -163,7 +163,7 @@ impl<'tcx> Collector<'tcx> {
|
||||
"link-arg" => {
|
||||
if !features.link_arg_attribute {
|
||||
feature_err(
|
||||
&sess.parse_sess,
|
||||
sess,
|
||||
sym::link_arg_attribute,
|
||||
span,
|
||||
"link kind `link-arg` is unstable",
|
||||
@@ -206,13 +206,8 @@ impl<'tcx> Collector<'tcx> {
|
||||
continue;
|
||||
};
|
||||
if !features.link_cfg {
|
||||
feature_err(
|
||||
&sess.parse_sess,
|
||||
sym::link_cfg,
|
||||
item.span(),
|
||||
"link cfg is unstable",
|
||||
)
|
||||
.emit();
|
||||
feature_err(sess, sym::link_cfg, item.span(), "link cfg is unstable")
|
||||
.emit();
|
||||
}
|
||||
cfg = Some(link_cfg.clone());
|
||||
}
|
||||
@@ -277,7 +272,7 @@ impl<'tcx> Collector<'tcx> {
|
||||
macro report_unstable_modifier($feature: ident) {
|
||||
if !features.$feature {
|
||||
feature_err(
|
||||
&sess.parse_sess,
|
||||
sess,
|
||||
sym::$feature,
|
||||
span,
|
||||
format!("linking modifier `{modifier}` is unstable"),
|
||||
|
||||
Reference in New Issue
Block a user