Skip to content

Commit d44b5ee

Browse files
committed
---
yaml --- r: 63609 b: refs/heads/snap-stage3 c: 7ba1a23 h: refs/heads/master i: 63607: f373d3c v: v3
1 parent 1b6ccc3 commit d44b5ee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+243
-640
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: f82756180bec5a8405e1fc6ee1b22949db24861f
4+
refs/heads/snap-stage3: 7ba1a239a4fc54f101434128e76b370b926cb8ef
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/etc/vim/syntax/rust.vim

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
" Language: Rust
33
" Maintainer: Patrick Walton <[email protected]>
44
" Maintainer: Ben Blum <[email protected]>
5-
" Last Change: 2012 Jun 14
5+
" Last Change: 2012 Dec 25
66

77
if version < 600
88
syntax clear
@@ -13,16 +13,13 @@ endif
1313
syn keyword rustConditional match if else
1414
syn keyword rustOperator as
1515

16-
syn match rustAssert "\<assert\(\w\)*!"
17-
syn match rustFail "\<fail\(\w\)*!"
1816
syn keyword rustKeyword break copy do drop extern
1917
syn keyword rustKeyword for if impl let log
2018
syn keyword rustKeyword copy do extern
2119
syn keyword rustKeyword for impl let log
2220
syn keyword rustKeyword loop mod once priv pub
2321
syn keyword rustKeyword return
24-
syn keyword rustKeyword unsafe while
25-
syn keyword rustKeyword use nextgroup=rustModPath skipwhite
22+
syn keyword rustKeyword unsafe use while
2623
" FIXME: Scoped impl's name is also fallen in this category
2724
syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite
2825
syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite
@@ -48,8 +45,7 @@ syn keyword rustType c_longlong c_ulonglong intptr_t uintptr_t
4845
syn keyword rustType off_t dev_t ino_t pid_t mode_t ssize_t
4946

5047
syn keyword rustTrait Const Copy Send Owned Sized " inherent traits
51-
syn keyword rustTrait Clone Decodable Encodable IterBytes Rand ToStr
52-
syn keyword rustTrait Eq Ord TotalEq TotalOrd Num Ptr
48+
syn keyword rustTrait Eq Ord Num Ptr
5349
syn keyword rustTrait Drop Add Sub Mul Quot Rem Neg BitAnd BitOr
5450
syn keyword rustTrait BitXor Shl Shr Index
5551

@@ -76,21 +72,19 @@ syn keyword rustConstant STDIN_FILENO STDOUT_FILENO STDERR_FILENO
7672
" If foo::bar changes to foo.bar, change this ("::" to "\.").
7773
" If foo::bar changes to Foo::bar, change this (first "\w" to "\u").
7874
syn match rustModPath "\w\(\w\)*::[^<]"he=e-3,me=e-3
79-
syn match rustModPath "\w\(\w\)*" contained " only for 'use path;'
8075
syn match rustModPathSep "::"
8176

8277
syn match rustFuncCall "\w\(\w\)*("he=e-1,me=e-1
8378
syn match rustFuncCall "\w\(\w\)*::<"he=e-3,me=e-3 " foo::<T>();
8479

85-
syn match rustMacro '\w\(\w\)*!' contains=rustAssert,rustFail
86-
syn match rustMacro '#\w\(\w\)*' contains=rustAssert,rustFail
80+
syn match rustMacro '\w\(\w\)*!'
81+
syn match rustMacro '#\w\(\w\)*'
8782

8883
syn match rustFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn?]\|\[\^\=.[^]]*\]\)" contained
8984
syn match rustFormat display "%%" contained
9085
syn region rustString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=rustTodo,rustFormat
9186

92-
syn region rustAttribute start="#\[" end="\]" contains=rustString,rustDeriving
93-
syn region rustDeriving start="deriving(" end=")" contains=rustTrait
87+
syn region rustAttribute start="#\[" end="\]" contains=rustString
9488

9589
" Number literals
9690
syn match rustNumber display "\<[0-9][0-9_]*\>"
@@ -149,17 +143,11 @@ hi def link rustMacro Macro
149143
hi def link rustType Type
150144
hi def link rustTodo Todo
151145
hi def link rustAttribute PreProc
152-
hi def link rustDeriving PreProc
153146
hi def link rustStorage StorageClass
154147
hi def link rustLifetime Special
155148

156149
" Other Suggestions:
157-
" hi rustAttribute ctermfg=cyan
158-
" hi rustDeriving ctermfg=cyan
159-
" hi rustAssert ctermfg=yellow
160-
" hi rustFail ctermfg=red
161150
" hi rustMacro ctermfg=magenta
162-
" hi rustModPathSep ctermfg=grey
163151

164152
syn sync minlines=200
165153
syn sync maxlines=500

branches/snap-stage3/src/libextra/arena.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -39,7 +39,7 @@ use core::prelude::*;
3939
use list::{MutList, MutCons, MutNil};
4040

4141
use core::at_vec;
42-
use core::cast::{transmute, transmute_mut_region};
42+
use core::cast::{transmute, transmute_mut, transmute_mut_region};
4343
use core::cast;
4444
use core::libc::size_t;
4545
use core::ptr;
@@ -74,6 +74,7 @@ struct Chunk {
7474
is_pod: bool,
7575
}
7676

77+
#[mutable]
7778
pub struct Arena {
7879
// The head is separated out from the list as a unbenchmarked
7980
// microoptimization, to avoid needing to case on the list to
@@ -269,23 +270,22 @@ impl Arena {
269270

270271
// The external interface
271272
#[inline]
272-
pub fn alloc<'a, T>(&'a mut self, op: &fn() -> T) -> &'a T {
273+
pub fn alloc<'a, T>(&'a self, op: &fn() -> T) -> &'a T {
273274
unsafe {
274275
// XXX: Borrow check
275-
let this = transmute_mut_region(self);
276-
if !intrinsics::needs_drop::<T>() {
277-
return this.alloc_pod(op);
276+
let this = transmute_mut(self);
277+
if intrinsics::needs_drop::<T>() {
278+
this.alloc_nonpod(op)
279+
} else {
280+
this.alloc_pod(op)
278281
}
279-
// XXX: Borrow check
280-
let this = transmute_mut_region(self);
281-
this.alloc_nonpod(op)
282282
}
283283
}
284284
}
285285

286286
#[test]
287287
fn test_arena_destructors() {
288-
let mut arena = Arena();
288+
let arena = Arena();
289289
for uint::range(0, 10) |i| {
290290
// Arena allocate something with drop glue to make sure it
291291
// doesn't leak.
@@ -300,7 +300,7 @@ fn test_arena_destructors() {
300300
#[should_fail]
301301
#[ignore(cfg(windows))]
302302
fn test_arena_destructors_fail() {
303-
let mut arena = Arena();
303+
let arena = Arena();
304304
// Put some stuff in the arena.
305305
for uint::range(0, 10) |i| {
306306
// Arena allocate something with drop glue to make sure it

branches/snap-stage3/src/librustc/metadata/encoder.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -954,8 +954,7 @@ fn encode_info_for_item(ecx: &EncodeContext,
954954
encode_name(ecx, ebml_w, item.ident);
955955
encode_attributes(ebml_w, item.attrs);
956956
match ty.node {
957-
ast::ty_path(path, bounds, _) if path.idents.len() == 1 => {
958-
assert!(bounds.is_empty());
957+
ast::ty_path(path, _) if path.idents.len() == 1 => {
959958
encode_impl_type_basename(ecx, ebml_w,
960959
ast_util::path_to_ident(path));
961960
}

branches/snap-stage3/src/librustc/metadata/tydecode.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,8 @@ fn parse_ty(st: &mut PState, conv: conv_did) -> ty::t {
311311
let substs = parse_substs(st, conv);
312312
let store = parse_trait_store(st);
313313
let mt = parse_mutability(st);
314-
let bounds = parse_bounds(st, conv);
315314
assert_eq!(next(st), ']');
316-
return ty::mk_trait(st.tcx, def, substs, store, mt, bounds.builtin_bounds);
315+
return ty::mk_trait(st.tcx, def, substs, store, mt);
317316
}
318317
'p' => {
319318
let did = parse_def(st, TypeParameter, conv);

branches/snap-stage3/src/librustc/metadata/tyencode.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,16 +261,13 @@ fn enc_sty(w: @io::Writer, cx: @ctxt, st: ty::sty) {
261261
enc_substs(w, cx, substs);
262262
w.write_char(']');
263263
}
264-
ty::ty_trait(def, ref substs, store, mt, bounds) => {
264+
ty::ty_trait(def, ref substs, store, mt) => {
265265
w.write_str(&"x[");
266266
w.write_str((cx.ds)(def));
267267
w.write_char('|');
268268
enc_substs(w, cx, substs);
269269
enc_trait_store(w, cx, store);
270270
enc_mutability(w, mt);
271-
let bounds = ty::ParamBounds {builtin_bounds: bounds,
272-
trait_bounds: ~[]};
273-
enc_bounds(w, cx, &bounds);
274271
w.write_char(']');
275272
}
276273
ty::ty_tup(ts) => {

0 commit comments

Comments
 (0)