Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve error when initializing a struct with explicit module #3846

Closed
burg opened this issue Oct 23, 2012 · 1 comment
Closed

Resolve error when initializing a struct with explicit module #3846

burg opened this issue Oct 23, 2012 · 1 comment

Comments

@burg
Copy link

burg commented Oct 23, 2012

This doesn't make any sense to me.

Test case

mod buildings {
    struct Tower { height: uint }
}

fn main() {
    let sears = buildings::Tower { height: 1451 };
    io::println(sears.height.to_str());
}

Output

[burg@host-7-150 Desktop]# rustc test.rs
test.rs:6:16: 6:32 error: `buildings::Tower` does not name a structure
test.rs:6     let sears = buildings::Tower { height: 1451 };
                          ^~~~~~~~~~~~~~~~
error: aborting due to previous error
@catamorphism
Copy link
Contributor

Dup of #3767

bors pushed a commit to rust-lang-ci/rust that referenced this issue May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants