Fix misuses of a vs an
Signed-off-by: cui fliter <imcusg@gmail.com>
This commit is contained in:
parent
aeaa5c30e5
commit
f44d116e1f
16 changed files with 18 additions and 18 deletions
|
@ -1358,9 +1358,9 @@ fn suggest_ampmut<'tcx>(
|
|||
None => (false, decl_span),
|
||||
};
|
||||
|
||||
// if the binding already exists and is a reference with a explicit
|
||||
// if the binding already exists and is a reference with an explicit
|
||||
// lifetime, then we can suggest adding ` mut`. this is special-cased from
|
||||
// the path without a explicit lifetime.
|
||||
// the path without an explicit lifetime.
|
||||
if let Ok(src) = tcx.sess.source_map().span_to_snippet(span)
|
||||
&& src.starts_with("&'")
|
||||
// note that `& 'a T` is invalid so this is correct.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue