Skip to content

Conversation

reddevilmidzy
Copy link
Contributor

@reddevilmidzy reddevilmidzy commented Oct 6, 2025

I moved the content from the note to a help message, as it seemed more appropriate there, and then added new information to the note(Modules are usually placed outside of blocks, at the top level of the file)!

resolve: #147314

@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 Oct 6, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 6, 2025

r? @jackh726

rustbot has assigned @jackh726.
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

Copy link
Member

@Kivooeo Kivooeo left a comment

Choose a reason for hiding this comment

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

Thanks, some nits as was discussed before

View changes since this review

.note = if there is a `mod {$name}` elsewhere in the crate already, import it with `use crate::...` instead
expand_module_in_block =
cannot declare a non-inline module inside a block unless it has a path attribute
Copy link
Member

Choose a reason for hiding this comment

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

As was little discussed here #147314 (comment), in my opinion it worth to use other than "non-inline" word here, this one is not obvious for non native English speakers, so we could use other one that will be more simple

cc @hkBst

cannot declare a non-inline module inside a block unless it has a path attribute
.note = maybe `use` the module `{$name}` instead of redeclaring it
.help = maybe `use` the module `{$name}` instead of redeclaring it
.note = modules are usually placed outside of blocks, at the top level of the file
Copy link
Member

Choose a reason for hiding this comment

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

Also this note as far as I can say shouldn't say just "modules" but " modules"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Diagnostic for non-inline modules inside blocks should encourage moving it out of the block
4 participants