Skip to content

imported modules aren't exported #268

Closed

Description

@marijnh

If I have, in mod1:

import foo = x.y;

And then in another mod try to refer to mod1.foo.[something], I get (with rustboot) "error: the name 'foo' can't be found in the module".

Maybe this is by design, but I'd argue that it'd be very good to have this supported (and that it's not hard to support). I ran into this trying to factor out the duplicated native modules in lib/linux_os.rs and lib/macosx_os.rs.

Activity

  1. graydon commented on Mar 12, 2011

    @graydon
    Contributor

    Supported in rustc; buggy in rustboot. Unfortunately I don't think we can easily fix it in rustboot. Need to stick with either redundant declarations or compiler-conditional crate components until after we bootstrap.

  2. added a commit that references this issue on Sep 19, 2017
  3. added a commit that references this issue on Dec 12, 2017
  4. added a commit that references this issue on Nov 29, 2018
  5. added a commit that references this issue on Dec 9, 2021
  6. added a commit that references this issue on Mar 17, 2025
  7. added a commit that references this issue on Aug 21, 2026
  8. added a commit that references this issue on Nov 14, 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions