Remove unused argument features from eval_config_entry · rust-lang/rust@c52b703 (original) (raw)
File tree
5 files changed
lines changed
- rustc_attr_parsing/src/attributes
- rustc_codegen_ssa/src/back
5 files changed
lines changed
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -199,14 +199,13 @@ pub fn eval_config_entry( | ||
| 199 | 199 | sess: &Session, |
| 200 | 200 | cfg_entry: &CfgEntry, |
| 201 | 201 | id: NodeId, |
| 202 | -features: Option<&Features>, | |
| 203 | 202 | emit_lints: ShouldEmit, |
| 204 | 203 | ) -> EvalConfigResult { |
| 205 | 204 | match cfg_entry { |
| 206 | 205 | CfgEntry::All(subs, ..) => { |
| 207 | 206 | let mut all = None; |
| 208 | 207 | for sub in subs { |
| 209 | -let res = eval_config_entry(sess, sub, id, features, emit_lints); | |
| 208 | +let res = eval_config_entry(sess, sub, id, emit_lints); | |
| 210 | 209 | // We cannot short-circuit because `eval_config_entry` emits some lints |
| 211 | 210 | if !res.as_bool() { |
| 212 | 211 | all.get_or_insert(res); |
| @@ -217,7 +216,7 @@ pub fn eval_config_entry( | ||
| 217 | 216 | CfgEntry::Any(subs, span) => { |
| 218 | 217 | let mut any = None; |
| 219 | 218 | for sub in subs { |
| 220 | -let res = eval_config_entry(sess, sub, id, features, emit_lints); | |
| 219 | +let res = eval_config_entry(sess, sub, id, emit_lints); | |
| 221 | 220 | // We cannot short-circuit because `eval_config_entry` emits some lints |
| 222 | 221 | if res.as_bool() { |
| 223 | 222 | any.get_or_insert(res); |
| @@ -229,7 +228,7 @@ pub fn eval_config_entry( | ||
| 229 | 228 | }) |
| 230 | 229 | } |
| 231 | 230 | CfgEntry::Not(sub, span) => { |
| 232 | -if eval_config_entry(sess, sub, id, features, emit_lints).as_bool() { | |
| 231 | +if eval_config_entry(sess, sub, id, emit_lints).as_bool() { | |
| 233 | 232 | EvalConfigResult::False { reason: cfg_entry.clone(), reason_span: *span } |
| 234 | 233 | } else { |
| 235 | 234 | EvalConfigResult::True |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -30,7 +30,6 @@ pub(crate) fn expand_cfg( | ||
| 30 | 30 | cx.sess, |
| 31 | 31 | &cfg, |
| 32 | 32 | cx.current_expansion.lint_node_id, |
| 33 | -Some(cx.ecfg.features), | |
| 34 | 33 | ShouldEmit::ErrorsAndLints, |
| 35 | 34 | ) |
| 36 | 35 | .as_bool(); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -3033,7 +3033,7 @@ fn add_dynamic_crate(cmd: &mut dyn Linker, sess: &Session, cratepath: &Path) { | ||
| 3033 | 3033 | fn relevant_lib(sess: &Session, lib: &NativeLib) -> bool { |
| 3034 | 3034 | match lib.cfg { |
| 3035 | 3035 | Some(ref cfg) => { |
| 3036 | -eval_config_entry(sess, cfg, CRATE_NODE_ID, None, ShouldEmit::ErrorsAndLints).as_bool() | |
| 3036 | +eval_config_entry(sess, cfg, CRATE_NODE_ID, ShouldEmit::ErrorsAndLints).as_bool() | |
| 3037 | 3037 | } |
| 3038 | 3038 | None => true, |
| 3039 | 3039 | } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -322,7 +322,6 @@ impl<'a> StripUnconfigured<'a> { | ||
| 322 | 322 | self.sess, |
| 323 | 323 | &cfg_predicate, |
| 324 | 324 | ast::CRATE_NODE_ID, |
| 325 | -self.features, | |
| 326 | 325 | ShouldEmit::ErrorsAndLints, |
| 327 | 326 | ) |
| 328 | 327 | .as_bool() |
| @@ -443,7 +442,7 @@ impl<'a> StripUnconfigured<'a> { | ||
| 443 | 442 | return EvalConfigResult::True; |
| 444 | 443 | }; |
| 445 | 444 | |
| 446 | -eval_config_entry(self.sess, &cfg, self.lint_node_id, self.features, emit_errors) | |
| 445 | +eval_config_entry(self.sess, &cfg, self.lint_node_id, emit_errors) | |
| 447 | 446 | } |
| 448 | 447 | |
| 449 | 448 | /// If attributes are not allowed on expressions, emit an error for `attr` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -189,7 +189,7 @@ pub(crate) fn collect(tcx: TyCtxt<'_>, LocalCrate: LocalCrate) -> Vec | ||
| 189 | 189 | pub(crate) fn relevant_lib(sess: &Session, lib: &NativeLib) -> bool { |
| 190 | 190 | match lib.cfg { |
| 191 | 191 | Some(ref cfg) => { |
| 192 | -eval_config_entry(sess, cfg, CRATE_NODE_ID, None, ShouldEmit::ErrorsAndLints).as_bool() | |
| 192 | +eval_config_entry(sess, cfg, CRATE_NODE_ID, ShouldEmit::ErrorsAndLints).as_bool() | |
| 193 | 193 | } |
| 194 | 194 | None => true, |
| 195 | 195 | } |