-
Notifications
You must be signed in to change notification settings - Fork 12.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
Add rust_analyzer
as a predefined tool
#125241
base: master
Are you sure you want to change the base?
Conversation
If you add this, can you please update the recognized tool attributes in https://github.com/rust-lang/reference/blob/e356977fceaa8591c762312d8d446769166d4b3e/src/attributes.md#L199? |
r? @ehuss |
I am not the correct person to review this. r? compiler Also, I would expect this to go through the MCP process. This is adding a new attribute which can be used on stable. I think there is still an open design question around how tools are registered, and I think caution should be used when adding more built-in attributes. I think there should be some mechanism for being able to support tool attributes that doesn't bake them into the language, or require different compiler implementations to also hard-code this list. My concern is that if I handed this code to some other compiler: #[rustfmt::skip]
fn f() {} should all implementations know what #66079 has implemented I'm not quite seeing how tools could be registered, while keeping code portable across implementations. One option would be to keep all tools in a cc @petrochenkov FYI, not sure if you have an opinion here. |
From what I remember the existing tools were hardcoded because Is there any specific motivation for adding |
I saw the miri one being added without second thoughts and figured rust project tools would be just fine.
How would that even work? Removing them would break things so that doesn't seem like an option?
rust-lang/rust-analyzer#11556 has a bunch of ideas listed, but if you ask right now there isn't a concrete plan yet. This would make experimenting for these feature for r-a nicer though. I'm fine with this being closed though for now, if we don't want to add every rust-project tool here (though as I read the |
I think this makes sense to do. Tools have been added to this list in the past without any broader approvals other than the review (most recently, miri in #124293), but I think we probably should do an MCP for this (and tools going forward). After that, r=me. |
They can be removed on an edition bump. |
Given all the other rust-lang tools have it, I'd expect r-a to have it too. (we have a few ideas for using this rust-lang/rust-analyzer#11556).