Replace as_ref with &

This commit is contained in:
varkor 2018-04-02 22:57:47 +01:00 committed by GitHub
parent 44ad8fd136
commit b2ed9dd546
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -587,7 +587,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
// 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
};