about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/hidden_unicode_codepoints.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_lint/src/hidden_unicode_codepoints.rs')
-rw-r--r--compiler/rustc_lint/src/hidden_unicode_codepoints.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/hidden_unicode_codepoints.rs b/compiler/rustc_lint/src/hidden_unicode_codepoints.rs
index fde84be9a7c..fc99d759a03 100644
--- a/compiler/rustc_lint/src/hidden_unicode_codepoints.rs
+++ b/compiler/rustc_lint/src/hidden_unicode_codepoints.rs
@@ -127,7 +127,7 @@ impl HiddenUnicodeCodepoints {
 impl EarlyLintPass for HiddenUnicodeCodepoints {
     fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &ast::Attribute) {
         if let ast::AttrKind::DocComment(_, comment) = attr.kind {
-            if contains_text_flow_control_chars(&comment.as_str()) {
+            if contains_text_flow_control_chars(comment.as_str()) {
                 self.lint_text_direction_codepoint(cx, comment, attr.span, 0, false, "doc comment");
             }
         }
@@ -138,7 +138,7 @@ impl EarlyLintPass for HiddenUnicodeCodepoints {
         let (text, span, padding) = match &expr.kind {
             ast::ExprKind::Lit(ast::Lit { token, kind, span }) => {
                 let text = token.symbol;
-                if !contains_text_flow_control_chars(&text.as_str()) {
+                if !contains_text_flow_control_chars(text.as_str()) {
                     return;
                 }
                 let padding = match kind {