Skip to content

Commit

Permalink
chore(tests): update compile-fail tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryman committed Jul 6, 2015
1 parent f297694 commit 6a48868
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions tests/compile-fail/inference_fully_hinted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ use nickel::{Nickel, HttpRouter, Request, Response};
fn main() {
let mut server = Nickel::new();

server.utilize(|_: &mut Request, res: Response| res.send("Hello World!"));
//~^ ERROR type mismatch resolving `for<'r,'b,'a> <[closure tests/com
server.utilize(|_: &mut Request<()>, res: Response<()>| res.send("Hello World!"));
//~^ ERROR type mismatch resolving `for<'r, 'b, 'a> <[closure tests/com

server.get("**", |_: &mut Request, res: Response| res.send("Hello World!"));
//~^ ERROR type mismatch resolving `for<'r,'b,'a> <[closure tests/com
server.get("**", |_: &mut Request<()>, res: Response<()>| res.send("Hello World!"));
//~^ ERROR type mismatch resolving `for<'r, 'b, 'a> <[closure tests/com

server.listen("127.0.0.1:6767");
}
4 changes: 2 additions & 2 deletions tests/compile-fail/inference_no_hints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ fn main() {
let mut server = Nickel::new();

server.utilize(|_, res| res.send("Hello World!"));
//~^ ERROR type mismatch resolving `for<'r,'b,'a> <[closure tests/compile-fail
//~^ ERROR type mismatch resolving `for<'r, 'b, 'a> <[closure tests/compile-fail
//~^^ ERROR the type of this value must be known in this context
//~^^^ ERROR type mismatch: the type `[closure tests/compile

server.get("**", |_, res| res.send("Hello World!"));
//~^ ERROR type mismatch resolving `for<'r,'b,'a> <[closure tests/compile-fail
//~^ ERROR type mismatch resolving `for<'r, 'b, 'a> <[closure tests/compile-fail
//~^^ ERROR the type of this value must be known in this context
//~^^^ ERROR type mismatch: the type `[closure tests/compile

Expand Down
8 changes: 4 additions & 4 deletions tests/compile-fail/inference_request_hinted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ fn main() {
let mut server = Nickel::new();

// Request hinted
server.utilize(|_: &mut Request, res| res.send("Hello World!"));
server.utilize(|_: &mut Request<()>, res| res.send("Hello World!"));
//~^ ERROR the type of this value must be known in this context
//~^^ ERROR type mismatch resolving `for<'r,'b,'a>
//~^^ ERROR type mismatch resolving `for<'r, 'b, 'a>

server.get("**", |_: &mut Request, res| res.send("Hello World!"));
server.get("**", |_: &mut Request<()>, res| res.send("Hello World!"));
//~^ ERROR the type of this value must be known in this context
//~^^ ERROR type mismatch resolving `for<'r,'b,'a>
//~^^ ERROR type mismatch resolving `for<'r, 'b, 'a>

server.listen("127.0.0.1:6767");
}
8 changes: 4 additions & 4 deletions tests/compile-fail/inference_response_hinted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ use nickel::{Nickel, HttpRouter, Request, Response};
fn main() {
let mut server = Nickel::new();

server.utilize(|_, res: Response| res.send("Hello World!"));
//~^ ERROR type mismatch resolving `for<'r,'b,'a> <[closure tests/compile-fail
server.utilize(|_, res: Response<()>| res.send("Hello World!"));
//~^ ERROR type mismatch resolving `for<'r, 'b, 'a> <[closure tests/compile-fail
//~^^ ERROR type mismatch: the type `[closure tests/compile-fail

server.get("**", |_, res: Response| res.send("Hello World!"));
//~^ ERROR type mismatch resolving `for<'r,'b,'a> <[closure tests/compile-fail
server.get("**", |_, res: Response<()>| res.send("Hello World!"));
//~^ ERROR type mismatch resolving `for<'r, 'b, 'a> <[closure tests/compile-fail
//~^^ ERROR type mismatch: the type `[closure tests/compile-fail

server.listen("127.0.0.1:6767");
Expand Down

0 comments on commit 6a48868

Please sign in to comment.