Skip to content

"newtype" structs fail to work across crates #4577

Closed
@ghost

Description

a.rs:

pub struct Foo { x : int }
pub struct Bar( int );

b.rs:

extern mod a;
use a::*;

fn main() {
    let foo = Foo { x : 0 };
    let bar = Bar( 0 );
}

rustc --lib a.rs && rustc -L. b.rs yields:

b.rs:6:11: 6:14 error: unresolved name: Bar
b.rs:6  let bar = Bar( 0 );
                  ^~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesA-type-systemArea: Type system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions