Skip to content

Add an API to check if a function is intrinsic #77

Closed
rust-lang/rust
#125336
@momvart

Description

@momvart

Can we have the following API in FnDef?

impl FnDef {
    pub fn is_intrinsic(&self) -> bool {
        with(|cx| cx.is_intrinsic(*self))
    }
}

and

pub trait Context {
    fn is_intrinsic(&self, def: FnDef) -> bool;
}

Metadata

Metadata

Assignees

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