]> git.lizzy.rs Git - rust.git/commitdiff
Use consistent prose for `::`
authorMichael Howell <michael@notriddle.com>
Sat, 12 Mar 2022 15:20:36 +0000 (08:20 -0700)
committerMichael Howell <michael@notriddle.com>
Sat, 12 Mar 2022 15:20:36 +0000 (08:20 -0700)
Co-authored-by: Camille Gillot <gillot.camille@gmail.com>
compiler/rustc_parse/src/parser/diagnostics.rs
src/test/ui/generics/single-colon-path-not-const-generics.rs
src/test/ui/generics/single-colon-path-not-const-generics.stderr

index 5b398a513185a90f51642f473d16191be91d370d..21d5bec65f03a8f57d2a19d087eb17f08836d315 100644 (file)
@@ -2080,7 +2080,7 @@ pub fn recover_const_arg(
                     // Find a mistake like "foo::var:A".
                     err.span_suggestion(
                         snapshot.token.span,
-                        "you might have meant to write a path",
+                        "write a path separator here",
                         "::".to_string(),
                         Applicability::MaybeIncorrect,
                     );
index d8ed8fbfe72f114f05a25e16957d76a0f4a136b7..55a7ae0bb6d91efa71b081a50516bd7e8c785c16 100644 (file)
@@ -7,7 +7,7 @@ pub mod bar {
 pub struct Foo {
   a: Vec<foo::bar:A>,
   //~^ ERROR expected
-  //~| HELP you might have meant to write a path
+  //~| HELP path separator
 }
 
 fn main() {}
index d509fb7aeaa8235cf37380bc79777f1564554279..3eafa9fa5a9dd9da1197ea8101122065b325130b 100644 (file)
@@ -5,7 +5,7 @@ LL |   a: Vec<foo::bar:A>,
    |                  ^
    |                  |
    |                  expected one of `,` or `>`
-   |                  help: you might have meant to write a path: `::`
+   |                  help: write a path separator here: `::`
 
 error: aborting due to previous error