rkt_codegen 0.6.0

Procedural macros for the rkt web framework.
Documentation
error: attribute can only be applied to `async` functions
 --> tests/ui-fail-stable/async-entry.rs:4:5
  |
4 |     #[rkt::main]
  |     ^^^^^^^^^^^^
  |
  = note: this error originates in the attribute macro `rkt::main` (in Nightly builds, run with -Z macro-backtrace for more info)

error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mthis function must be `async`␛[0m
 --> tests/ui-fail-stable/async-entry.rs:5:5
  |
5 |     fn foo() { }
  |     ^^^^^^^^

error: attribute can only be applied to `async` functions
  --> tests/ui-fail-stable/async-entry.rs:16:5
   |
16 |     #[rkt::main]
   |     ^^^^^^^^^^^^
   |
   = note: this error originates in the attribute macro `rkt::main` (in Nightly builds, run with -Z macro-backtrace for more info)

error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mthis function must be `async`␛[0m
  --> tests/ui-fail-stable/async-entry.rs:17:5
   |
17 |     fn main() {
   |     ^^^^^^^^^

error: attribute cannot be applied to `main` function
       ␛[1;34m= ␛[0m␛[1;32mnote␛[0m␛[39m: ␛[0m␛[1;39mthis attribute generates a `main` function␛[0m
  --> tests/ui-fail-stable/async-entry.rs:49:5
   |
49 |     #[rkt::launch]
   |     ^^^^^^^^^^^^^^
   |
   = note: this error originates in the attribute macro `rkt::launch` (in Nightly builds, run with -Z macro-backtrace for more info)

error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mthis function cannot be `main`␛[0m
  --> tests/ui-fail-stable/async-entry.rs:50:8
   |
50 |     fn main() -> rkt::Rocket<rkt::Build> {
   |        ^^^^

error: attribute can only be applied to functions that return a value
  --> tests/ui-fail-stable/async-entry.rs:56:5
   |
56 |     #[rkt::launch]
   |     ^^^^^^^^^^^^^^
   |
   = note: this error originates in the attribute macro `rkt::launch` (in Nightly builds, run with -Z macro-backtrace for more info)

error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mthis function must return a value␛[0m
  --> tests/ui-fail-stable/async-entry.rs:57:5
   |
57 |     async fn rocket() {
   |     ^^^^^^^^^^^^^^^^^

error: attribute can only be applied to functions that return a value
  --> tests/ui-fail-stable/async-entry.rs:64:5
   |
64 |     #[rkt::launch]
   |     ^^^^^^^^^^^^^^
   |
   = note: this error originates in the attribute macro `rkt::launch` (in Nightly builds, run with -Z macro-backtrace for more info)

error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mthis function must return a value␛[0m
  --> tests/ui-fail-stable/async-entry.rs:65:5
   |
65 |     fn rocket() {
   |     ^^^^^^^^^^^

error: attribute cannot be applied to `main` function
       ␛[1;34m= ␛[0m␛[1;32mnote␛[0m␛[39m: ␛[0m␛[1;39mthis attribute generates a `main` function␛[0m
  --> tests/ui-fail-stable/async-entry.rs:79:5
   |
79 |     #[rkt::launch]
   |     ^^^^^^^^^^^^^^
   |
   = note: this error originates in the attribute macro `rkt::launch` (in Nightly builds, run with -Z macro-backtrace for more info)

error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mthis function cannot be `main`␛[0m
  --> tests/ui-fail-stable/async-entry.rs:80:8
   |
80 |     fn main() -> &'static str {
   |        ^^^^

error: attribute cannot be applied to `main` function
       ␛[1;34m= ␛[0m␛[1;32mnote␛[0m␛[39m: ␛[0m␛[1;39mthis attribute generates a `main` function␛[0m
  --> tests/ui-fail-stable/async-entry.rs:87:5
   |
87 |     #[rkt::launch]
   |     ^^^^^^^^^^^^^^
   |
   = note: this error originates in the attribute macro `rkt::launch` (in Nightly builds, run with -Z macro-backtrace for more info)

error: ␛[1;34m[␛[0m␛[1;32mnote␛[0m␛[1;34m] ␛[0m␛[1;39mthis function cannot be `main`␛[0m
  --> tests/ui-fail-stable/async-entry.rs:88:14
   |
88 |     async fn main() -> _ {
   |              ^^^^

error[E0728]: `await` is only allowed inside `async` functions and blocks
  --> tests/ui-fail-stable/async-entry.rs:73:39
   |
72 |     fn rocket() -> _ {
   |     ---------------- this is not `async`
73 |         let _ = rkt::build().launch().await;
   |                                       ^^^^^ only allowed inside `async` functions and blocks

error[E0308]: mismatched types
  --> tests/ui-fail-stable/async-entry.rs:35:9
   |
33 |     async fn rocket() -> String {
   |                          ------ expected `std::string::String` because of return type
34 |         let _ = rkt::build().launch().await;
35 |         rkt::build()
   |         ^^^^^^^^^^^^ expected `String`, found `Rocket<Build>`
   |
   = note: expected struct `std::string::String`
              found struct `Rocket<Build>`

error[E0308]: mismatched types
  --> tests/ui-fail-stable/async-entry.rs:44:9
   |
42 |     async fn rocket() -> _ {
   |                          - expected `Rocket<Build>` because of return type
43 |         let _ = rkt::build().launch().await;
44 |         "hi".to_string()
   |         ^^^^^^^^^^^^^^^^ expected `Rocket<Build>`, found `String`
   |
   = note: expected struct `Rocket<Build>`
              found struct `std::string::String`

error[E0277]: `main` has invalid return type `Rocket<Build>`
  --> tests/ui-fail-stable/async-entry.rs:94:20
   |
94 | async fn main() -> rkt::Rocket<rkt::Build> {
   |                    ^^^^^^^^^^^^^^^^^^^^^^^ `main` can only return types that implement `Termination`
   |
   = help: consider using `()`, or a `Result`

error[E0308]: mismatched types
  --> tests/ui-fail-stable/async-entry.rs:24:21
   |
24 |       async fn main() {
   |  ____________________-^
   | |                    |
   | |                    expected `()` because of default return type
25 | |         rkt::build()
26 | |     }
   | |     ^- help: consider using a semicolon here: `;`
   | |_____|
   |       expected `()`, found `Rocket<Build>`
   |
   = note: expected unit type `()`
                 found struct `Rocket<Build>`

error[E0308]: mismatched types
  --> tests/ui-fail-stable/async-entry.rs:35:9
   |
35 |         rkt::build()
   |         ^^^^^^^^^^^^ expected `String`, found `Rocket<Build>`
   |
   = note: expected struct `std::string::String`
              found struct `Rocket<Build>`

error[E0308]: mismatched types
  --> tests/ui-fail-stable/async-entry.rs:44:9
   |
44 |         "hi".to_string()
   |         ^^^^^^^^^^^^^^^^ expected `Rocket<Build>`, found `String`
   |
   = note: expected struct `Rocket<Build>`
              found struct `std::string::String`