-
Notifications
You must be signed in to change notification settings - Fork 12
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 get the basename of an intrinsic #65
Comments
In the compiler we have a |
I like the idea of adding it to the |
I've tried adding it to
which makes me think that this may not be the best option. |
another possibility is to add a method |
Closing as this was completed in rust-lang/rust#122203 |
Context: In Kani we used to get the basename of intrinsic instances with
mangled_name()
until rust-lang/rust#121309 landed in the Rust compiler. Then some intrinsics became inlineable so their names became qualified, and this made ourmatch
on the intrinsic name to fail in those cases, leaving them as unsupported constructs as in this example:In model-checking/kani#3048 we switched to using
trimmed_name()
to work around this, but that API may include type arguments if the intrinsic is defined on generics. So in those cases, we tweak the name to remove the type parameters as follows:However, this looks a little fragile and we probably shouldn't be doing it ourselves in the first place. Therefore, would it be possible to add an API to get the basename of an intrinsic? Or, if it's more appropriate, an API that removes the type arguments from the trimmed name as we're doing now.
The text was updated successfully, but these errors were encountered: