Skip to content

Imprecise language about function "access" #2135

@umanwizard

Description

@umanwizard

vis.usage claims:

Accessing a module, for example, would mean looking inside of it (to import more items). On the other hand, accessing a function would mean that it is invoked.

I don't understand what this is supposed to mean, other than perhaps "usually, the reason you might want to access a function is to invoke it".

But of course while usually true that's not always true.

mod m1 {
    pub fn f() {}
}

fn main() {
    let p: fn() = m1::f;
    println!("{:?}", p);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-visibilityArea: visibility and privacy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions