I get this macro expansion warning with matklad.rust-analyzer v 0.2.776 with VSCode but not with cargo builld.
If I take out the a and b parameters the macro warning goes away.
Also, if I strip out much of the rest of the code then the warning goes away. Its unclear at what point when I add back in all the rest of my code it trips rust-analyzer into generating this warning for every route get/put/post with an argument.
Any tips on how I can begin to try to debug the issue?
This is the top of my main.rs
#![feature(decl_macro, proc_macro_hygiene)]
#[macro_use]
extern crate rocket;
#[macro_use]
extern crate rocket_contrib;
use rocket::response::Stream;
use rocket_contrib::json::JsonValue;
#[get("/foobar/<a>/<b>")]
fn foobar(a: usize, b: usize) { // <-- this function is highlighted in red
println!("foobar {} {}", a, b);
}
when I cargo expand
I get
fn foobar(a: usize, b: usize) {
{
::std::io::_print(::core::fmt::Arguments::new_v1(
&["foobar ", " ", "\n"],
&match (&a, &b) {
(arg0, arg1) => [
::core::fmt::ArgumentV1::new(arg0, ::core::fmt::Display::fmt),
::core::fmt::ArgumentV1::new(arg1, ::core::fmt::Display::fmt),
],
},
));
};
}