-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expand: fix minor diagnostics bug #123694
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a test triggering these two cases?
compiler/rustc_expand/messages.ftl
Outdated
.help_outer_doc = `///` is for documentation comments. For a plain comment, use `//`. | ||
.help_inner_doc = `//!` is for documentation comments. For a plain comment, insert a space: `// !` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.help_outer_doc = `///` is for documentation comments. For a plain comment, use `//`. | |
.help_inner_doc = `//!` is for documentation comments. For a plain comment, insert a space: `// !` | |
.help_outer_doc = `///` is used for outer documentation comments; for a plain comment, use `//`. | |
.help_inner_doc = `//!` is used for inner documentation comments; for a plain comment, `//` by removing the `!` or inserting a space in between them `// !` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's a missing "use" after the comma in the inner doc help string? Please check if the current version matches what you had in mind.
b3ee37d
to
b493127
Compare
This comment has been minimized.
This comment has been minimized.
2d2062a
to
8e978cb
Compare
The error mentions `///`, when it's actually `//!`: error[E0658]: attributes on expressions are experimental --> test.rs:4:9 | 4 | //! wah | ^^^^^^^ | = note: see issue rust-lang#15701 <rust-lang#15701> for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable = help: `///` is for documentation comments. For a plain comment, use `//`.
8e978cb
to
3289a9a
Compare
ping |
@bors r+ rollup |
…er-errors expand: fix minor diagnostics bug The error mentions `///`, when it's actually `//!`: ``` error[E0658]: attributes on expressions are experimental --> test.rs:4:9 | 4 | //! wah | ^^^^^^^ | = note: see issue rust-lang#15701 <rust-lang#15701> for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable = help: `///` is for documentation comments. For a plain comment, use `//`. ```
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
I don't think that was my fault? Not entirely sure though, maybe the relevant logs are just somewhere else. |
@bors retry |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#123694 (expand: fix minor diagnostics bug) - rust-lang#125171 (Rename `flatten(_mut)` → `as_flattened(_mut)`) - rust-lang#125181 (set `rust.channel` properly in source tarballs) - rust-lang#125186 (Remove duplicate word from addr docs) - rust-lang#125191 (Report better WF obligation leaf obligations in new solver) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#123694 - Xiretza:expand-diagnostics, r=compiler-errors expand: fix minor diagnostics bug The error mentions `///`, when it's actually `//!`: ``` error[E0658]: attributes on expressions are experimental --> test.rs:4:9 | 4 | //! wah | ^^^^^^^ | = note: see issue rust-lang#15701 <rust-lang#15701> for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable = help: `///` is for documentation comments. For a plain comment, use `//`. ```
The error mentions
///
, when it's actually//!
: