Skip to content

Method selection doesn't find enum variant constructors in other ingots #1049

Closed
@sbillig

Description

@sbillig

Example: in some other ingot (eg core):

pub enum Option<T> {
    Some(T),
    None,
}

in a file that uses core:

use core::Option

fn f() {
    let x = Option::None // this is fine
    let y = Option::Some(10) // `Some` is not found in `Option`
}

The CandidateAssembler only collects enum variant constructors defined in the ingot of the current scope.

I'll try to fix this in the next day or two, just putting it here in case someone else runs into it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions