]> git.lizzy.rs Git - rust.git/commitdiff
Replace as_ref with &
authorvarkor <github@varkor.com>
Mon, 2 Apr 2018 21:57:47 +0000 (22:57 +0100)
committerGitHub <noreply@github.com>
Mon, 2 Apr 2018 21:57:47 +0000 (22:57 +0100)
src/librustc/middle/stability.rs

index d1202b59e04f5520bb13df029894277768f8326e..328b2db2b58282ade9b5d6267842fb50af59aa29 100644 (file)
@@ -587,7 +587,7 @@ pub fn eval_stability(self, def_id: DefId, id: Option<NodeId>, span: Span) -> Ev
                 // version, then we should display no warning message.
                 let deprecated_in_future_version = if let Some(sym) = depr_entry.attr.since {
                     let since = sym.as_str();
-                    !deprecation_in_effect(since.as_ref())
+                    !deprecation_in_effect(&since)
                 } else {
                     false
                 };