Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
momvart opened this issue May 2, 2024 · 1 comment · Fixed by rust-lang/rust#125336
Closed

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

momvart opened this issue May 2, 2024 · 1 comment · Fixed by rust-lang/rust#125336
Assignees

Comments

@momvart
Copy link

momvart commented May 2, 2024

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;
}
@momvart
Copy link
Author

momvart commented May 18, 2024

@rustbot claim

fmease added a commit to fmease/rust that referenced this issue May 23, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue May 23, 2024
Rollup merge of rust-lang#125336 - momvart:smir-77-intrinsic, r=celinval

Add dedicated definition for intrinsics

Closes rust-lang/project-stable-mir#77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants