about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/librustc_typeck/check/demand.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_typeck/check/demand.rs b/src/librustc_typeck/check/demand.rs
index 0c5f3d3e99d..14f7a6b6817 100644
--- a/src/librustc_typeck/check/demand.rs
+++ b/src/librustc_typeck/check/demand.rs
@@ -526,7 +526,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                 // we may want to suggest removing a `&`.
                 if !sm.span_to_filename(expr.span).is_real() {
                     if let Ok(code) = sm.span_to_snippet(sp) {
-                        if code.chars().next() == Some('&') {
+                        if code.starts_with('&') {
                             return Some((
                                 sp,
                                 "consider removing the borrow",