Skip to content

Reintroduce directory modules #4116

Closed
Closed

Description

@brson

As part of #2176 I removed directory modules from the language. As a result, crates make heavy use of #[path] to create directory structure.

We probably do want to have some directory convention that rustc understands.

Here's one idea: the mod foo; statement continues to be the only way to load external modules. The parser looks for foo.rs and foo/mod.rs. If either exists then it loads it, otherwise error.

This assumes that we like the mod.rs convention. I haven't decided yet.

Activity

  1. nikomatsakis commented on Mar 24, 2013

    @nikomatsakis
    Contributor

    I believe we agreed in a meeting to stick with the mod.rs convention
    (which is also compatible with graydon's proposed rustpkg conventions)

  2. nikomatsakis commented on Mar 24, 2013

    @nikomatsakis
    Contributor

    Not critical for 0.6; removing milestone

  3. brson commented on Apr 16, 2013

    @brson
    ContributorAuthor
  4. brson commented on Apr 16, 2013

    @brson
    ContributorAuthor

    I would like to nominate this for a milestone. It is important for usability.

    Let's also remove all the redundant uses of #[path].

  5. brson commented on Jul 24, 2013

    @brson
    ContributorAuthor

    Done

  6. added a commit that references this issue on Jan 19, 2025
  7. added a commit that references this issue on Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions