Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19.

This commit is contained in:
Ms2ger 2015-01-02 12:45:28 +01:00 committed by Josh Matthews
parent cf616b90a2
commit 16c7060bc8
153 changed files with 2095 additions and 1298 deletions

View file

@ -11,7 +11,6 @@ use hyper::http::RawStatus;
use servo_util::resource_files::resources_dir_path;
use std::io::fs::PathExtensions;
use std::str::Slice;
pub fn factory(mut load_data: LoadData, start_chan: Sender<TargetedLoadResponse>) {
let senders = ResponseSenders {
@ -25,7 +24,7 @@ pub fn factory(mut load_data: LoadData, start_chan: Sender<TargetedLoadResponse>
content_type: Some(("text".to_string(), "html".to_string())),
charset: Some("utf-8".to_string()),
headers: None,
status: Some(RawStatus(200, Slice("OK")))
status: Some(RawStatus(200, "OK".into_string()))
});
chan.send(Done(Ok(())));
return

View file

@ -11,6 +11,7 @@ use fetch::cors_cache::CORSCache;
use fetch::response::Response;
/// A [request context](http://fetch.spec.whatwg.org/#concept-request-context)
#[deriving(Copy)]
pub enum Context {
Audio, Beacon, CSPreport, Download, Embed, Eventsource,
Favicon, Fetch, Font, Form, Frame, Hyperlink, IFrame, Image,
@ -20,6 +21,7 @@ pub enum Context {
}
/// A [request context frame type](http://fetch.spec.whatwg.org/#concept-request-context-frame-type)
#[deriving(Copy)]
pub enum ContextFrameType {
Auxiliary,
TopLevel,
@ -35,6 +37,7 @@ pub enum Referer {
}
/// A [request mode](http://fetch.spec.whatwg.org/#concept-request-mode)
#[deriving(Copy)]
pub enum RequestMode {
SameOrigin,
NoCORS,
@ -43,6 +46,7 @@ pub enum RequestMode {
}
/// Request [credentials mode](http://fetch.spec.whatwg.org/#concept-request-credentials-mode)
#[deriving(Copy)]
pub enum CredentialsMode {
Omit,
CredentialsSameOrigin,
@ -50,6 +54,7 @@ pub enum CredentialsMode {
}
/// [Response tainting](http://fetch.spec.whatwg.org/#concept-request-response-tainting)
#[deriving(Copy)]
pub enum ResponseTainting {
Basic,
CORSTainting,

View file

@ -9,7 +9,7 @@ use std::ascii::AsciiExt;
use std::comm::Receiver;
/// [Response type](http://fetch.spec.whatwg.org/#concept-response-type)
#[deriving(Clone, PartialEq)]
#[deriving(Clone, PartialEq, Copy)]
pub enum ResponseType {
Basic,
CORS,
@ -19,7 +19,7 @@ pub enum ResponseType {
}
/// [Response termination reason](http://fetch.spec.whatwg.org/#concept-response-termination-reason)
#[deriving(Clone)]
#[deriving(Clone, Copy)]
pub enum TerminationReason {
EndUserAbort,
Fatal,

View file

@ -85,7 +85,7 @@ fn load(load_data: LoadData, start_chan: Sender<TargetedLoadResponse>) {
// FIXME(seanmonstar): use AcceptEncoding from Hyper once available
//if !req.headers.has::<AcceptEncoding>() {
// We currently don't support HTTP Compression (FIXME #2587)
req.headers_mut().set_raw("Accept-Encoding", vec![b"identity".to_vec()]);
req.headers_mut().set_raw("Accept-Encoding".into_string(), vec![b"identity".to_vec()]);
//}
let writer = match load_data.data {
Some(ref data) => {

View file

@ -7,7 +7,7 @@ use image_cache_task::ImageResponseMsg;
use local_image_cache::LocalImageCache;
use geom::size::Size2D;
use sync::{Arc, Mutex};
use std::sync::{Arc, Mutex};
use url::Url;
// FIXME: Nasty coupling here This will be a problem if we want to factor out image handling from

View file

@ -13,7 +13,7 @@ use std::comm::{channel, Receiver, Sender};
use std::collections::HashMap;
use std::collections::hash_map::{Occupied, Vacant};
use std::mem::replace;
use sync::{Arc, Mutex};
use std::sync::{Arc, Mutex};
use serialize::{Encoder, Encodable};
use url::Url;

View file

@ -16,7 +16,6 @@ extern crate log;
extern crate serialize;
extern crate "util" as servo_util;
extern crate stb_image;
extern crate sync;
extern crate time;
extern crate url;

View file

@ -21,7 +21,6 @@ use hyper::mime::{Mime, Attr};
use url::Url;
use std::comm::{channel, Receiver, Sender};
use std::str::Slice;
pub enum ControlMsg {
/// Request the data associated with a particular URL
@ -86,7 +85,8 @@ impl Metadata {
content_type: None,
charset: None,
headers: None,
status: Some(RawStatus(200, Slice("OK"))) // http://fetch.spec.whatwg.org/#concept-response-status-message
// http://fetch.spec.whatwg.org/#concept-response-status-message
status: Some(RawStatus(200, "OK".into_string()))
}
}