Uh oh!
There was an error while loading. Please reload this page.
Accurately portray raw identifiers in error messages - #67010
Conversation
When refering to or suggesting raw identifiers, refer to them with `r#`. Fixrust-lang#65634.
rust-highfive
commented
Dec 4, 2019
(rust_highfive has picked a reviewer for you, use r? to override) |
Uh oh!
There was an error while loading. Please reload this page.
r? @Centril r=me rollup with ^-- fixed. |
This comment has been minimized.
This comment has been minimized.
estebank
commented
Dec 4, 2019
@bors r=Centril rollup |
bors
commented
Dec 4, 2019
📌 Commit 0103308 has been approved by |
Accurately portray raw identifiers in error messages When refering to or suggesting raw identifiers, refer to them with `r#`. Fixrust-lang#65634.
Accurately portray raw identifiers in error messages When refering to or suggesting raw identifiers, refer to them with `r#`. Fixrust-lang#65634.
Accurately portray raw identifiers in error messages When refering to or suggesting raw identifiers, refer to them with `r#`. Fixrust-lang#65634.
Rollup of 13 pull requests Successful merges: - #66405 (Tweak `ObligationForest` `NodeState`s) - #66730 (remove dependency from libhermit) - #66764 (Tweak wording of `collect()` on bad target type) - #66899 (Standard library support for riscv64gc-unknown-linux-gnu) - #66900 (Clean up error codes) - #66974 ([CI] fix the `! isCI` check in src/ci/run.sh) - #66979 (Add long error for E0631 and update ui tests.) - #67005 (capitalize Rust) - #67010 (Accurately portray raw identifiers in error messages) - #67011 (Include a span in more `expected...found` notes) - #67017 (cleanup long error explanations) - #67021 (Fix docs for formatting delegations) - #67041 (add ExitStatusExt into prelude) Failed merges: r? @ghost
Accurately portray raw identifiers in error messages When refering to or suggesting raw identifiers, refer to them with `r#`. Fixrust-lang#65634.
Rollup of 9 pull requests Successful merges: - #66710 (weak-into-raw: Clarify some details in Safety) - #66863 (Check break target availability when checking breaks with values) - #67002 (Fix documentation of pattern for str::matches()) - #67005 (capitalize Rust) - #67010 (Accurately portray raw identifiers in error messages) - #67011 (Include a span in more `expected...found` notes) - #67044 (E0023: handle expected != tuple pattern type) - #67045 (rustc_parser: cleanup imports) - #67055 (Make const-qualification look at more `const fn`s) Failed merges: r? @ghost
olegnn
left a comment
There was a problem hiding this comment.
Some hints with raw identifiers are still incorrect.
| | | ||
| LL | fn r#struct(&self) { | ||
| | ^^^^^^^^^^^^^^^^^^ | ||
| = help: to disambiguate the method call, write `async::r#struct(r#fn {})` instead |
There was a problem hiding this comment.
I think this should be r#async::r#struct(r#fn {}) instead of async::r#struct(r#fn {})
| LL | r#fn {}.r#struct(); | ||
| | ^^^^^^^^ multiple `r#struct` found | ||
| | | ||
| note: candidate #1 is defined in an impl of the trait `async` for the type `r#fn` |
| | | ||
| LL | fn r#struct(&self) { | ||
| | ^^^^^^^^^^^^^^^^^^ | ||
| = help: to disambiguate the method call, write `await::r#struct(r#fn {})` instead |
estebank
commented
Dec 6, 2019
@olegnn it isn't clear from the test (but tested locally, just forgot to add the test file) that this is because the test is running as edition 2015, where |
olegnn
commented
Dec 6, 2019
Sorry, I didn't notice that it's edition 2015. But anyway, if item is declared with |
estebank
commented
Dec 6, 2019
We don't keep track of whether an identifier was raw or not, we currently infer it from the fact that they couldn't be written any other way (if we have a struct called |
…crum Deduplicate identifier printing a bit rust-lang#67010 introduced a couple more subtly different ways to print an identifier. This PR attempts to restore the order. The most basic identifier printing interface is `Formatter`-based now, so `String`s are not allocated unless required. r? @Mark-Simulacrum
…crum Deduplicate identifier printing a bit rust-lang#67010 introduced a couple more subtly different ways to print an identifier. This PR attempts to restore the order. The most basic identifier printing interface is `Formatter`-based now, so `String`s are not allocated unless required. r? @Mark-Simulacrum
When refering to or suggesting raw identifiers, refer to them with
r#.Fix#65634.