Rocket/codegen/tests/run-pass/instanced-mounting.rs
Sergio Benitez 8183f63630 Remove lints and associated code from 'rocket_codegen'.
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.
2017-08-15 11:39:22 -07:00

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]);
}