From b9cef6984b606705f42adf9587f4f1c3babf4d4d Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 22 Oct 2019 11:04:25 +1100 Subject: Simplify various `Symbol` use points. Including removing a bunch of unnecessary `.as_str()` calls, and a bunch of unnecessary sigils. --- src/libsyntax/feature_gate/check.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax/feature_gate') 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); -- cgit 1.4.1-3-g733a5