diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-10-22 11:04:25 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-11-02 09:01:02 +1100 |
| commit | b9cef6984b606705f42adf9587f4f1c3babf4d4d (patch) | |
| tree | 361f6ab139c3f9fd37c3a8bf7263ac5937ddb82f /src/libsyntax/feature_gate | |
| parent | 5bc7084f7e1be9da93bb014e05f19a80ff6fa188 (diff) | |
Simplify various `Symbol` use points.
Including removing a bunch of unnecessary `.as_str()` calls, and a bunch of unnecessary sigils.
Diffstat (limited to 'src/libsyntax/feature_gate')
| -rw-r--r-- | src/libsyntax/feature_gate/check.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/feature_gate/check.rs b/src/libsyntax/feature_gate/check.rs index 97b99b9392f..4389dae2770 100644 --- a/src/libsyntax/feature_gate/check.rs +++ b/src/libsyntax/feature_gate/check.rs @@ -730,7 +730,7 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute], } if let Some(allowed) = allow_features.as_ref() { - if allowed.iter().find(|&f| f == &name.as_str() as &str).is_none() { + if allowed.iter().find(|&f| name.as_str() == *f).is_none() { span_err!(span_handler, mi.span(), E0725, "the feature `{}` is not in the list of allowed features", name); |
