mirror of
https://github.com/rwf2/Rocket.git
synced 2025-01-30 05:12:13 +00:00
8183f63630
Rust's linting API is incredibly unstable, resulting in unnecessary breakage to `rocket_codegen`. Rocket's lints are also not as conservative as would be desired, resulting in spurious warnings. For these reasons, this commit removes linting from `rocket_codegen`. These lints will likely be reintroduced as part of a 'rocket_lints' crate. Factoring the lints out to a separate crate means that lint breakage can be dealt with by uncommenting the dependency instead of waiting for a new release or backtracking nightlies. In the same vein, it will likely improve stability of the 'rocket_codegen' crate.
42 lines
786 B
Rust
42 lines
786 B
Rust
#![feature(plugin)]
|
|
#![plugin(rocket_codegen)]
|
|
#![allow(dead_code)]
|
|
|
|
extern crate rocket;
|
|
|
|
use rocket::State;
|
|
|
|
#[get("/one")]
|
|
fn one() { }
|
|
|
|
#[get("/two")]
|
|
fn two() { }
|
|
|
|
#[get("/three")]
|
|
fn three() { }
|
|
|
|
#[get("/four")]
|
|
fn four() { }
|
|
|
|
fn main() {
|
|
let instance = rocket::ignite()
|
|
.mount("/", routes![one]);
|
|
|
|
let other = instance.mount("/", routes![two]);
|
|
other.mount("/", routes![three])
|
|
.mount("/", routes![four]);
|
|
|
|
rocket::ignite()
|
|
.mount("/", routes![one])
|
|
.mount("/", routes![two])
|
|
.mount("/", routes![three])
|
|
.mount("/", routes![four]);
|
|
|
|
let a = rocket::ignite()
|
|
.mount("/", routes![one])
|
|
.mount("/", routes![two]);
|
|
|
|
let b = a.mount("/", routes![three])
|
|
.mount("/", routes![four]);
|
|
}
|