Skip to content

Structure instantiation doesn't handle structure typedefs #4508

Closed
@jdm

Description

@jdm

This is from a build of Rust from around Christmas, so it would bear retesting on master.

rusti> struct foo_struct { a: int };
()
rusti> type foo = foo_struct;
c()
rusti> let f: foo = foo { a: 0 };
<anon>:41:15: 41:18 error: `foo` does not name a structure
<anon>:41 let f: foo = foo { a: 0 };
                         ^~~
error: aborting due to previous error
rust: task failed at 'explicit failure', /run/media/jdm/ssd/rust/src/libsyntax/diagnostic.rs:88
rusti> let f: foo = foo_struct { a: 0 };
()

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions