diff options
| author | bors <bors@rust-lang.org> | 2013-02-20 21:22:30 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-02-20 21:22:30 -0800 |
| commit | a02da4ecdef0bc810357db3566f97e9cc1f24c46 (patch) | |
| tree | e61b61fe772d4454a0901fbe48a4828933e5a0eb /src/libsyntax | |
| parent | 0aa1aaa2c1d095365e341017e443d61a960e0af6 (diff) | |
| parent | bf2a225c0b6f90f61bcaf4a6f33d9eaf424795b6 (diff) | |
| download | rust-a02da4ecdef0bc810357db3566f97e9cc1f24c46.tar.gz rust-a02da4ecdef0bc810357db3566f97e9cc1f24c46.zip | |
auto merge of #5063 : pcwalton/rust/plussing, r=pcwalton
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/codemap.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/diagnostic.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/auto_encode.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/ext/pipes/ast_builder.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/common.rs | 14 | ||||
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/util/interner.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/util/testing.rs | 4 |
9 files changed, 21 insertions, 21 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 234cef5f6eb..6befb2f1880 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -32,7 +32,7 @@ macro_rules! interner_key ( #[deriving_eq] pub struct ident { repr: uint } -pub impl<S: Encoder> Encodable<S> for ident { +pub impl<S:Encoder> Encodable<S> for ident { fn encode(&self, s: &S) { let intr = match unsafe { task::local_data::local_data_get(interner_key!()) @@ -45,7 +45,7 @@ pub impl<S: Encoder> Encodable<S> for ident { } } -pub impl<D: Decoder> Decodable<D> for ident { +pub impl<D:Decoder> Decodable<D> for ident { static fn decode(d: &D) -> ident { let intr = match unsafe { task::local_data::local_data_get(interner_key!()) @@ -383,7 +383,7 @@ pub enum inferable<T> { infer(node_id) } -pub impl<T: to_bytes::IterBytes> to_bytes::IterBytes for inferable<T> { +pub impl<T:to_bytes::IterBytes> to_bytes::IterBytes for inferable<T> { pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) { match *self { expl(ref t) => diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index 851b35ca3bd..c9bc41ed61e 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -140,12 +140,12 @@ pub impl cmp::Eq for span { pure fn ne(&self, other: &span) -> bool { !(*self).eq(other) } } -pub impl<S: Encoder> Encodable<S> for span { +pub impl<S:Encoder> Encodable<S> for span { /* Note #1972 -- spans are encoded but not decoded */ fn encode(&self, _s: &S) { } } -pub impl<D: Decoder> Decodable<D> for span { +pub impl<D:Decoder> Decodable<D> for span { static fn decode(_d: &D) -> span { dummy_sp() } diff --git a/src/libsyntax/diagnostic.rs b/src/libsyntax/diagnostic.rs index ad0998d503a..f378325d0ab 100644 --- a/src/libsyntax/diagnostic.rs +++ b/src/libsyntax/diagnostic.rs @@ -300,7 +300,7 @@ fn print_macro_backtrace(cm: @codemap::CodeMap, sp: span) { } } -pub fn expect<T: Copy>(diag: span_handler, +pub fn expect<T:Copy>(diag: span_handler, opt: Option<T>, msg: fn() -> ~str) -> T { match opt { diff --git a/src/libsyntax/ext/auto_encode.rs b/src/libsyntax/ext/auto_encode.rs index 9ceaebe6dd1..7fbba987cc7 100644 --- a/src/libsyntax/ext/auto_encode.rs +++ b/src/libsyntax/ext/auto_encode.rs @@ -23,7 +23,7 @@ For example, a type like: would generate two implementations like: -impl<S: std::serialize::Encoder> Encodable<S> for Node { +impl<S:std::serialize::Encoder> Encodable<S> for Node { fn encode(&self, s: &S) { do s.emit_struct("Node", 1) { s.emit_field("id", 0, || s.emit_uint(self.id)) @@ -31,7 +31,7 @@ impl<S: std::serialize::Encoder> Encodable<S> for Node { } } -impl<D: Decoder> Decodable for node_id { +impl<D:Decoder> Decodable for node_id { static fn decode(d: &D) -> Node { do d.read_struct("Node", 1) { Node { @@ -54,7 +54,7 @@ would yield functions like: S: Encoder, T: Encodable<S> > spanned<T>: Encodable<S> { - fn encode<S: Encoder>(s: &S) { + fn encode<S:Encoder>(s: &S) { do s.emit_rec { s.emit_field("node", 0, || self.node.encode(s)); s.emit_field("span", 1, || self.span.encode(s)); diff --git a/src/libsyntax/ext/pipes/ast_builder.rs b/src/libsyntax/ext/pipes/ast_builder.rs index f4d0e57c595..49f7fe5853e 100644 --- a/src/libsyntax/ext/pipes/ast_builder.rs +++ b/src/libsyntax/ext/pipes/ast_builder.rs @@ -319,7 +319,7 @@ pub impl ext_ctxt_ast_builder for ext_ctxt { +items: ~[@ast::item]) -> @ast::item { // XXX: Total hack: import `core::kinds::Owned` to work around a - // parser bug whereby `fn f<T: ::kinds::Owned>` doesn't parse. + // parser bug whereby `fn f<T:::kinds::Owned>` doesn't parse. let vi = ast::view_item_use(~[ @codemap::spanned { node: ast::view_path_simple( diff --git a/src/libsyntax/parse/common.rs b/src/libsyntax/parse/common.rs index e7b5005d8db..4c9c9a5e52a 100644 --- a/src/libsyntax/parse/common.rs +++ b/src/libsyntax/parse/common.rs @@ -212,7 +212,7 @@ pub impl Parser { // parse a sequence bracketed by '<' and '>', stopping // before the '>'. - fn parse_seq_to_before_gt<T: Copy>(sep: Option<token::Token>, + fn parse_seq_to_before_gt<T:Copy>(sep: Option<token::Token>, f: fn(Parser) -> T) -> ~[T] { let mut first = true; let mut v = ~[]; @@ -231,7 +231,7 @@ pub impl Parser { return v; } - fn parse_seq_to_gt<T: Copy>(sep: Option<token::Token>, + fn parse_seq_to_gt<T:Copy>(sep: Option<token::Token>, f: fn(Parser) -> T) -> ~[T] { let v = self.parse_seq_to_before_gt(sep, f); self.expect_gt(); @@ -240,7 +240,7 @@ pub impl Parser { } // parse a sequence bracketed by '<' and '>' - fn parse_seq_lt_gt<T: Copy>(sep: Option<token::Token>, + fn parse_seq_lt_gt<T:Copy>(sep: Option<token::Token>, f: fn(Parser) -> T) -> spanned<~[T]> { let lo = self.span.lo; self.expect(token::LT); @@ -253,7 +253,7 @@ pub impl Parser { // parse a sequence, including the closing delimiter. The function // f must consume tokens until reaching the next separator or // closing bracket. - fn parse_seq_to_end<T: Copy>(ket: token::Token, sep: seq_sep, + fn parse_seq_to_end<T:Copy>(ket: token::Token, sep: seq_sep, f: fn(Parser) -> T) -> ~[T] { let val = self.parse_seq_to_before_end(ket, sep, f); self.bump(); @@ -263,7 +263,7 @@ pub impl Parser { // parse a sequence, not including the closing delimiter. The function // f must consume tokens until reaching the next separator or // closing bracket. - fn parse_seq_to_before_end<T: Copy>(ket: token::Token, sep: seq_sep, + fn parse_seq_to_before_end<T:Copy>(ket: token::Token, sep: seq_sep, f: fn(Parser) -> T) -> ~[T] { let mut first: bool = true; let mut v: ~[T] = ~[]; @@ -284,7 +284,7 @@ pub impl Parser { // parse a sequence, including the closing delimiter. The function // f must consume tokens until reaching the next separator or // closing bracket. - fn parse_unspanned_seq<T: Copy>(bra: token::Token, + fn parse_unspanned_seq<T:Copy>(bra: token::Token, ket: token::Token, sep: seq_sep, f: fn(Parser) -> T) -> ~[T] { @@ -296,7 +296,7 @@ pub impl Parser { // NB: Do not use this function unless you actually plan to place the // spanned list in the AST. - fn parse_seq<T: Copy>(bra: token::Token, ket: token::Token, sep: seq_sep, + fn parse_seq<T:Copy>(bra: token::Token, ket: token::Token, sep: seq_sep, f: fn(Parser) -> T) -> spanned<~[T]> { let lo = self.span.lo; self.expect(bra); diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index eeba00be704..ab7e3204b7b 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -2282,7 +2282,7 @@ pub mod test { //use util; use util::testing::check_equal; - fn string_check<T : Eq> (given : &T, expected: &T) { + fn string_check<T:Eq> (given : &T, expected: &T) { if !(given == expected) { fail!(fmt!("given %?, expected %?",given,expected)); } diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs index dcb3261169b..4b13818974c 100644 --- a/src/libsyntax/util/interner.rs +++ b/src/libsyntax/util/interner.rs @@ -23,7 +23,7 @@ pub struct Interner<T> { } // when traits can extend traits, we should extend index<uint,T> to get [] -pub impl<T: Eq IterBytes Hash Const Copy> Interner<T> { +pub impl<T:Eq + IterBytes + Hash + Const + Copy> Interner<T> { static fn new() -> Interner<T> { Interner { map: LinearMap::new(), diff --git a/src/libsyntax/util/testing.rs b/src/libsyntax/util/testing.rs index b6d333349a0..78a175df29f 100644 --- a/src/libsyntax/util/testing.rs +++ b/src/libsyntax/util/testing.rs @@ -11,13 +11,13 @@ // support for test cases. use core::cmp; -pub pure fn check_equal_ptr<T : cmp::Eq> (given : &T, expected: &T) { +pub pure fn check_equal_ptr<T:cmp::Eq> (given : &T, expected: &T) { if !((given == expected) && (expected == given )) { fail!(fmt!("given %?, expected %?",given,expected)); } } -pub pure fn check_equal<T : cmp::Eq> (given : T, expected: T) { +pub pure fn check_equal<T:cmp::Eq> (given : T, expected: T) { if !((given == expected) && (expected == given )) { fail!(fmt!("given %?, expected %?",given,expected)); } |
