-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Closed
Copy link
Labels
A-macromacro expansionmacro expansionBroken WindowBugs / technical debt to be addressed immediatelyBugs / technical debt to be addressed immediatelyC-bugCategory: bugCategory: bugS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now
Description
This compiles and runs fine but there is a rust-analyzer warning present in 2.776 and 2.768 but not in 2.760 and earlier versions of rust-analyzer.
::::::::::::::
Cargo.toml
::::::::::::::
[package]
name = "foobar"
version = "0.0.1"
edition = "2018"
[dependencies]
rocket = "0.4"
::::::::::::::
src/main.rs
::::::::::::::
#![feature(decl_macro, proc_macro_hygiene)]
#[macro_use]
extern crate rocket;
#[get("/hello")]
fn status() -> String {
format!("rust-analyzer No warnings in this function")
}
// Compiles fine but rust-analyzer highlights function with:
// called `Option::unwrap()` on a `None` value
#[get("/foobar/<_a>")]
fn foobar(_a: bool) -> String {
format!("rust-analyzer Warnings in this function")
}
fn main() {
rocket::ignite()
.mount("/", routes![status, foobar])
.launch();
}
ThouCheese, initprism, grawtar, orangeant, MiroFurtado and 10 moreViniciusSosselaViniciusSossela
Metadata
Metadata
Assignees
Labels
A-macromacro expansionmacro expansionBroken WindowBugs / technical debt to be addressed immediatelyBugs / technical debt to be addressed immediatelyC-bugCategory: bugCategory: bugS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now