Auto merge of #4683 - HMPerson1:inefficient_to_string, r=Manishearth
Add `inefficient_to_string` lint Closes #4586 changelog: Add `inefficient_to_string` lint, which checks for calling `to_string` on `&&str`, which would bypass the `str`'s specialization
This commit is contained in:
commit
14a0f36617
11 changed files with 216 additions and 4 deletions
|
|
@ -71,7 +71,7 @@ pub fn get_attr<'a>(
|
|||
})
|
||||
{
|
||||
let mut db = sess.struct_span_err(attr_segments[1].ident.span, "Usage of deprecated attribute");
|
||||
match deprecation_status {
|
||||
match *deprecation_status {
|
||||
DeprecationStatus::Deprecated => {
|
||||
db.emit();
|
||||
false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue