Skip to content

Regression in interaction between 'use' statements, crates, and 'pub use'. #32106

Closed

Description

@brson

This compiles on stable but not on nightly:

extern crate std;

pub use a::*;
pub use b::*;

pub mod a {
    use std;
}

pub mod b {
    use std;
}

fn main() { }

Here's the error:

<anon>:9:9: 9:12 error: unresolved import [E0432]
<anon>:9     use std;
                 ^~~
<anon>:9:9: 9:12 help: see the detailed explanation for E0432
<anon>:5:9: 5:12 error: unresolved import [E0432]
<anon>:5     use std;
                 ^~~
<anon>:5:9: 5:12 help: see the detailed explanation for E0432
error: aborting due to 2 previous errors
playpen: application terminated with error code 101

Activity

  1. added
    A-resolveArea: Name/path resolution done by `rustc_resolve` specifically
    on Mar 7, 2016
  2. alexcrichton commented on Mar 7, 2016

    @alexcrichton
    Member

    Might be a dupe of #32089 which is fixed in #32097, but not sure?

    cc @jseyfried

  3. jseyfried commented on Mar 7, 2016

    @jseyfried
    Contributor

    Yeah, this is a dupe of #32089.

    This actually doesn't compile on stable since the explicit extern crate std; conflicts with the implicit, injected version. It does compile on stable without the explicit extern crate std; or with #![no_std].

  4. alexcrichton commented on Mar 7, 2016

    @alexcrichton
    Member

    Ah ok, closing as a dupe, thanks @jseyfried!

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

    A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyregression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions