Skip to content

pub unit struct constructors can't be resolved cross-crate #8233

Closed
@bblum

Description

@bblum

...even though mentioning the type works fine. This doesn't work:

use std::util;

fn main() {
    let _: Option<util::NonCopyable> = Some(util::NonCopyable);
}

but replacing the expression with None works fine.

nominating well-covered

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-metadataArea: Crate metadataA-resolveArea: Name/path resolution done by `rustc_resolve` specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions