Skip to content

Commit d66ab4f

Browse files
committed
Upgrade to rustc 0.12.0-pre (0bdac78da 2014-09-01 21:31:00 +0000)
1 parent 3bc6364 commit d66ab4f

File tree

8 files changed

+14
-13
lines changed

8 files changed

+14
-13
lines changed

macros/src/match_token.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ fn make_tag_pattern(cx: &mut ExtCtxt, binding: Tokens, tag: Tag) -> Tokens {
283283
}
284284

285285
/// Expand the `match_token!` macro.
286-
pub fn expand(cx: &mut ExtCtxt, span: Span, tts: &[ast::TokenTree]) -> Box<MacResult> {
286+
pub fn expand(cx: &mut ExtCtxt, span: Span, tts: &[ast::TokenTree]) -> Box<MacResult+'static> {
287287
let Match { discriminant, mut arms } = parse(cx, tts);
288288

289289
// Handle the last arm specially at the end.

macros/src/named_entities.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fn build_map(js: Json) -> Option<HashMap<String, [u32, ..2]>> {
7171
}
7272

7373
// Expand named_entities!("path/to/entities.json") into an invocation of phf_map!().
74-
pub fn expand(cx: &mut ExtCtxt, sp: Span, tt: &[TokenTree]) -> Box<MacResult> {
74+
pub fn expand(cx: &mut ExtCtxt, sp: Span, tt: &[TokenTree]) -> Box<MacResult+'static> {
7575
let usage = "Usage: named_entities!(\"path/to/entities.json\")";
7676

7777
// Argument to the macro should be a single literal string: a path to

src/serialize/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ struct ElemInfo {
5252

5353
pub type AttrRef<'a> = (&'a AttrName, &'a str);
5454

55-
pub struct Serializer<'wr, Wr> {
55+
pub struct Serializer<'wr, Wr:'wr> {
5656
writer: &'wr mut Wr,
5757
opts: SerializeOpts,
5858
stack: Vec<ElemInfo>,

src/tokenizer/buffer_queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ impl Iterator<char> for BufferQueue {
163163
}
164164

165165
#[cfg(test)]
166-
#[allow(non_snake_case_functions)]
166+
#[allow(non_snake_case)]
167167
mod test {
168168
use core::prelude::*;
169169
use collections::string::String;

src/tokenizer/char_ref/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ impl<'sink, Sink: TokenSink> CharRefTokenizer {
270270
}
271271

272272
fn unconsume_name(&mut self, tokenizer: &mut Tokenizer<'sink, Sink>) {
273-
tokenizer.unconsume(self.name_buf_opt.take_unwrap());
273+
tokenizer.unconsume(self.name_buf_opt.take().unwrap());
274274
}
275275

276276
fn finish_named(&mut self,

src/tokenizer/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl Default for TokenizerOpts {
9797
}
9898

9999
/// The HTML tokenizer.
100-
pub struct Tokenizer<'sink, Sink> {
100+
pub struct Tokenizer<'sink, Sink:'sink> {
101101
/// Options controlling the behavior of the tokenizer.
102102
opts: TokenizerOpts,
103103

@@ -1202,7 +1202,7 @@ impl<'sink, Sink: TokenSink> Tokenizer<'sink, Sink> {
12021202
fn step_char_ref_tokenizer(&mut self) -> bool {
12031203
// FIXME HACK: Take and replace the tokenizer so we don't
12041204
// double-mut-borrow self. This is why it's boxed.
1205-
let mut tok = self.char_ref_tokenizer.take_unwrap();
1205+
let mut tok = self.char_ref_tokenizer.take().unwrap();
12061206
let outcome = tok.step(self);
12071207

12081208
let progress = match outcome {
@@ -1364,7 +1364,7 @@ impl<'sink, Sink: TokenSink> Tokenizer<'sink, Sink> {
13641364
}
13651365

13661366
#[cfg(test)]
1367-
#[allow(non_snake_case_functions)]
1367+
#[allow(non_snake_case)]
13681368
mod test {
13691369
use core::prelude::*;
13701370
use collections::vec::Vec;

src/tree_builder/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl Default for TreeBuilderOpts {
7272
}
7373

7474
/// The HTML tree builder.
75-
pub struct TreeBuilder<'sink, Handle, Sink> {
75+
pub struct TreeBuilder<'sink, Handle, Sink:'sink> {
7676
/// Options controlling the behavior of the tree builder.
7777
opts: TreeBuilderOpts,
7878

src/util/str.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,10 @@ impl<'a> AsciiExt<String> for &'a str {
152152
/// If `c` is an ASCII letter, return the corresponding lowercase
153153
/// letter, otherwise None.
154154
pub fn lower_ascii_letter(c: char) -> Option<char> {
155-
c.to_ascii_opt()
156-
.filtered(|a| a.is_alphabetic())
157-
.map(|a| a.to_lowercase().to_char())
155+
match c.to_ascii_opt() {
156+
Some(a) if a.is_alphabetic() => Some(a.to_lowercase().to_char()),
157+
_ => None,
158+
}
158159
}
159160

160161
/// Map ASCII uppercase to lowercase; preserve other characters.
@@ -200,7 +201,7 @@ pub fn char_run<Pred: CharEq>(mut pred: Pred, buf: &str) -> Option<(uint, bool)>
200201
}
201202

202203
#[cfg(test)]
203-
#[allow(non_snake_case_functions)]
204+
#[allow(non_snake_case)]
204205
mod test {
205206
use core::prelude::*;
206207
use super::{char_run, is_ascii_whitespace, is_ascii_alnum, lower_ascii, lower_ascii_letter};

0 commit comments

Comments
 (0)