-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
E0425: Don't recommend the use of intrinsics first #97618
Comments
I'd be satisfied if we filtered out intrinsics altogether except for when the |
I also get quite annoyed when stable rustc recommends I use unstable features (maybe that should be fixed in an RFC) |
Checking the DefId of each suggested path to see if they are annotated with |
This seems to be harder than I initially thought... so since we emit this "consider importing" suggestion in |
We might want to consider adding yet another dumping ground field in the |
For now, I guess it wouldn't hurt just to filter suggesting paths that are literally |
…-intrinsics, r=oli-obk Filter out intrinsics if we have other import candidates to suggest Fixes rust-lang#97618 Also open to just sorting these candidates to be last. Pretty easy to modify the code to do that, too.
…-intrinsics, r=oli-obk Filter out intrinsics if we have other import candidates to suggest Fixes rust-lang#97618 Also open to just sorting these candidates to be last. Pretty easy to modify the code to do that, too.
Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=dc1180286b0a5d9e0f1dbac02ccdb7b3
The current output is:
Ideally the output should look like:
In cases where intrinsics have been stabilised in
core
|std
it would be useful to suggest these to users first.Especially as using intrinsics generates another
rustc
error that tells you to prefer stabilized functions instd
.This would hopefully make handling this error easier for new rust users coming from languages like C/C++ and looking for the equivalent of
sizeof()
The output is the same on stable, beta and nightly
The text was updated successfully, but these errors were encountered: