]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_builtin_macros/assert.rs
Auto merge of #68522 - estebank:impl-trait-sugg-2, r=oli-obk
[rust.git] / src / librustc_builtin_macros / assert.rs
index c96ba516f0ced83a17ad5f7cf5b8aa3f5453bf2c..a992b6e2662d2ec34537dce0b3e4e82425702cc5 100644 (file)
@@ -106,7 +106,7 @@ fn parse_assert<'a>(
     let custom_message =
         if let token::Literal(token::Lit { kind: token::Str, .. }) = parser.token.kind {
             let mut err = cx.struct_span_warn(parser.token.span, "unexpected string literal");
-            let comma_span = cx.source_map().next_point(parser.prev_span);
+            let comma_span = parser.prev_span.shrink_to_hi();
             err.span_suggestion_short(
                 comma_span,
                 "try adding a comma",