-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Inlay hints should work in attributed items with bodies #10043
Comments
Inlay hints should work inside all macro invocations if they are unambiguous, I'd say |
I wouldn't say so, there are plenty of macros where showing inlay hints would feel out of place since a lot of them are used for domain specific language purposes. Having inlay hints show up in those might disrupt that. Attributes on the other hand always take in full items which are valid rust syntax so showing them there at all times shouldn't have problems. |
Hmm, still broken in this situation, using use std::io;
use actix_web::{web, App, HttpServer};
#[actix_web::main]
async fn main() -> io::Result<()> {
HttpServer::new(move || {
App::new()
.route("/foo", web::get().to(handle_health))
.default_service(web::to(handle_default))
})
.bind("0.0.0.0:9090")?
.run()
.await
}
async fn handle_health() -> &'static str {
"ok"
}
async fn handle_default() -> &'static str {
"ok"
} |
Looks like we expand #[actix_web::rt::main(system = "::actix_web::rt::System")]
async fn main() -> io::Result<()>{
HttpServer::new(move| |{
App::new().route("/foo",web::get().to(handle_health)).default_service(web::to(handle_default))
}).bind("0.0.0.0:9090")? .run().await
} but then we fail to expand the |
|
Ah, |
I guess this will require #9403, not sure whats wrong but I assume the node down mapping for attributes doesn't work as well as I'd hoped |
So this actually does work, at least on current rustc stable 1.56. It didn't before because we didn't patch the necessary changes for the older proc-macro abi server. #10633 should make it work on the rest. |
Currently attributes turn these items into macro expansion so our inlay hints disappear from function bodies and the like.
The text was updated successfully, but these errors were encountered: