We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eceb6cf commit e8f5555Copy full SHA for e8f5555
core/codegen/tests/async-routes.rs
@@ -0,0 +1,19 @@
1
+#![feature(proc_macro_hygiene)]
2
+
3
+#[macro_use] extern crate rocket;
4
+use rocket::http::uri::Origin;
5
+use rocket::request::Request;
6
7
+async fn noop() { }
8
9
+#[get("/")]
10
+async fn hello(_origin: &Origin<'_>) -> &'static str {
11
+ noop().await;
12
+ "Hello, world!"
13
+}
14
15
+#[catch(404)]
16
+async fn not_found(req: &Request<'_>) -> String {
17
18
+ format!("{} not found", req.uri())
19
0 commit comments