# Curly brace support for mod

**URL:** <https://internals.rust-lang.org/t/curly-brace-support-for-mod/23437>\
**Category:** Uncategorized\
**Created:** [August 21, 2025, 3:12pm UTC](https://internals.rust-lang.org/t/curly-brace-support-for-mod/23437 "2025-08-21T15:12:09Z")\
**Posts on this page:** 1\
**Showing post:** 51

<div class="post-metadata">

**Author:** ![kornel](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/kornel/32/2711_2.png) [@kornel](https://internals.rust-lang.org/u/kornel)\
**Post date:** [September 1, 2025, 2:48am UTC](https://internals.rust-lang.org/t/curly-brace-support-for-mod/23437/51 "2025-09-01T02:48:40Z")

</div>

There used to be recurring questions about `mod` vs `use` in the user forum, until I've added a note to the error message:

> help: to create the module `foo`, create file "src/foo.rs" or "src/foo/mod.rs"  
> note: if there is a `mod foo` elsewhere in the crate already, import it with `use crate::...` instead

and I think it largely solved the problem. This message could have been better if it could suggest actual `use` path, but unfortunately it's quite tricky, because when the `mod` items are parsed, the crate's module structure doesn't exist yet.

---

_[View the full topic](https://internals.rust-lang.org/t/curly-brace-support-for-mod/23437)._
