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
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 30, 2024
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 30, 2024
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 30, 2024
Disable tree traversal optimization that is wrong due to lazy nodes.

See rust-lang#3846 for more information.

For now, the optimization is disabled in a very "hotfix" way, while we think about potential fixes. Nonetheless, this fixes rust-lang#3846
RalfJung added a commit to RalfJung/rust that referenced this issue Dec 8, 2024
This commit supplies a real fix, which makes retags more complicated, at the benefit of
making accesses more performant.

Co-authored-by: Ralf Jung <[email protected]>
RalfJung added a commit to RalfJung/rust that referenced this issue Dec 8, 2024
Fix rust-lang#3846 properly, so that subtrees can be skipped again
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