fix(rustup): switch to unstable features
This commit is contained in:
		| @@ -1,4 +1,4 @@ | |||||||
| #![allow(unstable)] | #![feature(core, io, test)] | ||||||
| extern crate hyper; | extern crate hyper; | ||||||
|  |  | ||||||
| extern crate test; | extern crate test; | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| #![allow(unstable)] | #![feature(core, collections, io, test)] | ||||||
| extern crate hyper; | extern crate hyper; | ||||||
|  |  | ||||||
| extern crate test; | extern crate test; | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| #![allow(unstable)] | #![feature(io, test)] | ||||||
| extern crate hyper; | extern crate hyper; | ||||||
| extern crate test; | extern crate test; | ||||||
|  |  | ||||||
| @@ -26,7 +26,7 @@ fn bench_hyper(b: &mut Bencher) { | |||||||
|     let server = hyper::Server::http(Ipv4Addr(127, 0, 0, 1), 0); |     let server = hyper::Server::http(Ipv4Addr(127, 0, 0, 1), 0); | ||||||
|     let mut listener = server.listen(hyper_handle).unwrap(); |     let mut listener = server.listen(hyper_handle).unwrap(); | ||||||
|  |  | ||||||
|     let url = hyper::Url::parse(format!("http://{}", listener.socket).as_slice()).unwrap(); |     let url = hyper::Url::parse(&*format!("http://{}", listener.socket)).unwrap(); | ||||||
|     b.iter(|| request(url.clone())); |     b.iter(|| request(url.clone())); | ||||||
|     listener.close().unwrap(); |     listener.close().unwrap(); | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| #![allow(unstable)] | #![feature(os, io)] | ||||||
| extern crate hyper; | extern crate hyper; | ||||||
|  |  | ||||||
| use std::os; | use std::os; | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| #![allow(unstable)] | #![feature(io)] | ||||||
| extern crate hyper; | extern crate hyper; | ||||||
|  |  | ||||||
| use std::old_io::net::ip::Ipv4Addr; | use std::old_io::net::ip::Ipv4Addr; | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| #![allow(unstable)] | #![feature(core, io)] | ||||||
| extern crate hyper; | extern crate hyper; | ||||||
| #[macro_use] extern crate log; | #[macro_use] extern crate log; | ||||||
|  |  | ||||||
| @@ -21,7 +21,7 @@ macro_rules! try_return( | |||||||
|  |  | ||||||
| fn echo(mut req: Request, mut res: Response) { | fn echo(mut req: Request, mut res: Response) { | ||||||
|     match req.uri { |     match req.uri { | ||||||
|         AbsolutePath(ref path) => match (&req.method, path.as_slice()) { |         AbsolutePath(ref path) => match (&req.method, &path[]) { | ||||||
|             (&Get, "/") | (&Get, "/echo") => { |             (&Get, "/") | (&Get, "/echo") => { | ||||||
|                 let out = b"Try POST /echo"; |                 let out = b"Try POST /echo"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ use header; | |||||||
| /// > during the actual request. | /// > during the actual request. | ||||||
| /// | /// | ||||||
| /// Spec: www.w3.org/TR/cors/#access-control-allow-headers-response-header | /// Spec: www.w3.org/TR/cors/#access-control-allow-headers-response-header | ||||||
| #[derive(Clone, PartialEq, Show)] | #[derive(Clone, PartialEq, Debug)] | ||||||
| pub struct AccessControlAllowHeaders(pub Vec<String>); | pub struct AccessControlAllowHeaders(pub Vec<String>); | ||||||
|  |  | ||||||
| impl header::Header for AccessControlAllowHeaders { | impl header::Header for AccessControlAllowHeaders { | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ use method; | |||||||
| /// > actual request. | /// > actual request. | ||||||
| /// | /// | ||||||
| /// Spec: www.w3.org/TR/cors/#access-control-allow-methods-response-header | /// Spec: www.w3.org/TR/cors/#access-control-allow-methods-response-header | ||||||
| #[derive(Clone, PartialEq, Show)] | #[derive(Clone, PartialEq, Debug)] | ||||||
| pub struct AccessControlAllowMethods(pub Vec<method::Method>); | pub struct AccessControlAllowMethods(pub Vec<method::Method>); | ||||||
|  |  | ||||||
| impl header::Header for AccessControlAllowMethods { | impl header::Header for AccessControlAllowMethods { | ||||||
|   | |||||||
| @@ -13,7 +13,7 @@ use header; | |||||||
| /// > "*", or "null" in the response. | /// > "*", or "null" in the response. | ||||||
| /// | /// | ||||||
| /// Spec: www.w3.org/TR/cors/#access-control-allow-origin-response-header | /// Spec: www.w3.org/TR/cors/#access-control-allow-origin-response-header | ||||||
| #[derive(Clone, PartialEq, Show)] | #[derive(Clone, PartialEq, Debug)] | ||||||
| pub enum AccessControlAllowOrigin { | pub enum AccessControlAllowOrigin { | ||||||
|     /// Allow all origins |     /// Allow all origins | ||||||
|     AllowStar, |     AllowStar, | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ use header; | |||||||
| /// > preflight request can be cached in a preflight result cache. | /// > preflight request can be cached in a preflight result cache. | ||||||
| /// | /// | ||||||
| /// Spec: www.w3.org/TR/cors/#access-control-max-age-response-header | /// Spec: www.w3.org/TR/cors/#access-control-max-age-response-header | ||||||
| #[derive(Clone, Copy, PartialEq, Show)] | #[derive(Clone, Copy, PartialEq, Debug)] | ||||||
| pub struct AccessControlMaxAge(pub u32); | pub struct AccessControlMaxAge(pub u32); | ||||||
|  |  | ||||||
| impl header::Header for AccessControlMaxAge { | impl header::Header for AccessControlMaxAge { | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ use header; | |||||||
| /// > be used in the actual request as part of the preflight request. | /// > be used in the actual request as part of the preflight request. | ||||||
| /// | /// | ||||||
| /// Spec: www.w3.org/TR/cors/#access-control-request-headers-request-header | /// Spec: www.w3.org/TR/cors/#access-control-request-headers-request-header | ||||||
| #[derive(Clone, PartialEq, Show)] | #[derive(Clone, PartialEq, Debug)] | ||||||
| pub struct AccessControlRequestHeaders(pub Vec<String>); | pub struct AccessControlRequestHeaders(pub Vec<String>); | ||||||
|  |  | ||||||
| impl header::Header for AccessControlRequestHeaders { | impl header::Header for AccessControlRequestHeaders { | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ use method::Method; | |||||||
| /// > used in the actual request as part of the preflight request. | /// > used in the actual request as part of the preflight request. | ||||||
| /// | /// | ||||||
| /// Spec: www.w3.org/TR/cors/#access-control-request-method-request-header | /// Spec: www.w3.org/TR/cors/#access-control-request-method-request-header | ||||||
| #[derive(Clone, PartialEq, Show)] | #[derive(Clone, PartialEq, Debug)] | ||||||
| pub struct AccessControlRequestMethod(pub Method); | pub struct AccessControlRequestMethod(pub Method); | ||||||
|  |  | ||||||
| impl header::Header for AccessControlRequestMethod { | impl header::Header for AccessControlRequestMethod { | ||||||
|   | |||||||
| @@ -484,7 +484,7 @@ impl fmt::Display for Box<HeaderFormat + Send + Sync> { | |||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
| /// A wrapper around any Header with a Show impl that calls fmt_header. | /// A wrapper around any Header with a Display impl that calls fmt_header. | ||||||
| /// | /// | ||||||
| /// This can be used like so: `format!("{}", HeaderFormatter(&header))` to | /// This can be used like so: `format!("{}", HeaderFormatter(&header))` to | ||||||
| /// get the representation of a Header which will be written to an | /// get the representation of a Header which will be written to an | ||||||
| @@ -555,7 +555,7 @@ mod tests { | |||||||
|         assert_eq!(accept, Some(Accept(vec![application_vendor, text_plain]))); |         assert_eq!(accept, Some(Accept(vec![application_vendor, text_plain]))); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     #[derive(Clone, Show)] |     #[derive(Clone, Debug)] | ||||||
|     struct CrazyLength(Option<bool>, usize); |     struct CrazyLength(Option<bool>, usize); | ||||||
|  |  | ||||||
|     impl Header for CrazyLength { |     impl Header for CrazyLength { | ||||||
|   | |||||||
| @@ -586,7 +586,7 @@ pub fn read_request_line<R: Reader>(stream: &mut R) -> HttpResult<RequestLine> { | |||||||
| pub type StatusLine = (HttpVersion, RawStatus); | pub type StatusLine = (HttpVersion, RawStatus); | ||||||
|  |  | ||||||
| /// The raw status code and reason-phrase. | /// The raw status code and reason-phrase. | ||||||
| #[derive(PartialEq, Show)] | #[derive(PartialEq, Debug)] | ||||||
| pub struct RawStatus(pub u16, pub CowString<'static>); | pub struct RawStatus(pub u16, pub CowString<'static>); | ||||||
|  |  | ||||||
| impl Clone for RawStatus { | impl Clone for RawStatus { | ||||||
|   | |||||||
| @@ -1,7 +1,8 @@ | |||||||
| #![feature(slicing_syntax, box_syntax)] | #![feature(core, collections, hash, io, os, std_misc, | ||||||
|  |            slicing_syntax, box_syntax)] | ||||||
| #![deny(missing_docs)] | #![deny(missing_docs)] | ||||||
| #![allow(unstable)] |  | ||||||
| #![cfg_attr(test, deny(warnings))] | #![cfg_attr(test, deny(warnings))] | ||||||
|  | #![cfg_attr(test, feature(test))] | ||||||
|  |  | ||||||
| //! # Hyper | //! # Hyper | ||||||
| //! Hyper is a fast, modern HTTP implementation written in and for Rust. It | //! Hyper is a fast, modern HTTP implementation written in and for Rust. It | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user