Skip to content
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

Merged
merged 3 commits into from
May 17, 2024
Merged

Conversation

Xiretza
Copy link
Contributor

@Xiretza Xiretza commented Apr 9, 2024

The error mentions ///, when it's actually //!:

error[E0658]: attributes on expressions are experimental
 --> test.rs:4:9
  |
4 |         //! wah
  |         ^^^^^^^
  |
  = note: see issue https://github.com/rust-lang/rust/issues/15701 <https://github.com/rust-lang/rust/issues/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 `//`.

@rustbot
Copy link
Collaborator

rustbot commented Apr 9, 2024

r? @estebank

rustbot has assigned @estebank.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 9, 2024
compiler/rustc_expand/messages.ftl Outdated Show resolved Hide resolved
Copy link
Contributor

@estebank estebank left a 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?

Comment on lines 15 to 16
.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: `// !`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.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 `// !`

Copy link
Contributor Author

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.

@rust-log-analyzer

This comment has been minimized.

@Xiretza Xiretza force-pushed the expand-diagnostics branch 2 times, most recently from 2d2062a to 8e978cb Compare April 11, 2024 17:10
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 `//`.
@Xiretza
Copy link
Contributor Author

Xiretza commented May 15, 2024

ping

@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 15, 2024

📌 Commit 3289a9a has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 15, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request May 15, 2024
…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 `//`.
```
@bors
Copy link
Contributor

bors commented May 15, 2024

⌛ Testing commit 3289a9a with merge 8e9eaff...

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling test v0.0.0 (/checkout/library/test)
   Compiling sysroot v0.0.0 (/checkout/library/sysroot)
[RUSTC-TIMING] getopts test:false 2.086
[RUSTC-TIMING] sysroot test:false 0.046
##[error]The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled.

Session terminated, killing shell...::group::Clock drift check
  network time: Thu, 16 May 2024 00:04:56 GMT
##[endgroup]
 ...killed.
##[error]The operation was canceled.

@bors
Copy link
Contributor

bors commented May 16, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 16, 2024
@Xiretza
Copy link
Contributor Author

Xiretza commented May 16, 2024

I don't think that was my fault? Not entirely sure though, maybe the relevant logs are just somewhere else.

@compiler-errors
Copy link
Member

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 16, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request May 17, 2024
…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
@bors bors merged commit e62688e into rust-lang:master May 17, 2024
12 of 13 checks passed
@rustbot rustbot added this to the 1.80.0 milestone May 17, 2024
@bors
Copy link
Contributor

bors commented May 17, 2024

⌛ Testing commit 3289a9a with merge 1189851...

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 17, 2024
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 `//`.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants