Skip to content

Commit 3baabc3

Browse files
committed
---
yaml --- r: 160766 b: refs/heads/auto c: b781c8b h: refs/heads/master v: v3
1 parent b6474e3 commit 3baabc3

File tree

128 files changed

+750
-1079
lines changed

Some content is hidden

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

128 files changed

+750
-1079
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 641e2a110de4bb1b2c2b596ef1168ae7865aa529
13+
refs/heads/auto: b781c8b08e5b6b207c0422454ab8f319c90fe64d
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/AUTHORS.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ Cole Mickens <[email protected]>
121121
Colin Davidson <[email protected]>
122122
Colin Sherratt <[email protected]>
123123
Conrad Kleinespel <[email protected]>
124-
Corey Farwell <[email protected]>
125124
Corey Ford <[email protected]>
126125
Corey Richardson <[email protected]>
127126

branches/auto/configure

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -893,10 +893,7 @@ CFG_PREFIX=${CFG_PREFIX%/}
893893
CFG_MANDIR=${CFG_MANDIR%/}
894894
CFG_HOST="$(echo $CFG_HOST | tr ',' ' ')"
895895
CFG_TARGET="$(echo $CFG_TARGET | tr ',' ' ')"
896-
CFG_SUPPORTED_TARGET=""
897-
for target_file in ${CFG_SRC_DIR}mk/cfg/*.mk; do
898-
CFG_SUPPORTED_TARGET="${CFG_SUPPORTED_TARGET} $(basename "$target_file" .mk)"
899-
done
896+
CFG_SUPPORTED_TARGET="$(ls ${CFG_SRC_DIR}mk/cfg)"
900897

901898
# copy host-triples to target-triples so that hosts are a subset of targets
902899
V_TEMP=""

branches/auto/mk/platform.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ $(foreach cvar,CC CXX CPP CFLAGS CXXFLAGS CPPFLAGS, \
113113

114114
CFG_RLIB_GLOB=lib$(1)-*.rlib
115115

116-
include $(wildcard $(CFG_SRC_DIR)mk/cfg/*.mk)
116+
include $(wildcard $(CFG_SRC_DIR)mk/cfg/*)
117117

118118
# The -Qunused-arguments sidesteps spurious warnings from clang
119119
define FILTER_FLAGS

branches/auto/src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1566,7 +1566,7 @@ fn _arm_exec_compiled_test(config: &Config,
15661566

15671567
let mut exitcode: int = 0;
15681568
for c in exitcode_out.as_slice().chars() {
1569-
if !c.is_numeric() { break; }
1569+
if !c.is_digit() { break; }
15701570
exitcode = exitcode * 10 + match c {
15711571
'0' ... '9' => c as int - ('0' as int),
15721572
_ => 101,

branches/auto/src/doc/reference.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,12 +1334,7 @@ specific type; the type-specified aspects of a value include:
13341334
For example, the type `(u8, u8)` defines the set of immutable values that are
13351335
composite pairs, each containing two unsigned 8-bit integers accessed by
13361336
pattern-matching and laid out in memory with the `x` component preceding the
1337-
`y` component:
1338-
1339-
```
1340-
type Point = (u8, u8);
1341-
let p: Point = (41, 68);
1342-
```
1337+
`y` component.
13431338

13441339
### Structures
13451340

branches/auto/src/etc/vim/compiler/cargo.vim

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,29 @@
11
" Vim compiler file
22
" Compiler: Cargo Compiler
33
" Maintainer: Damien Radtke <[email protected]>
4-
" Latest Revision: 2014 Sep 24
4+
" Latest Revision: 2014 Sep 18
55

6-
if exists('current_compiler')
6+
if exists("current_compiler")
77
finish
88
endif
9-
runtime compiler/rustc.vim
109
let current_compiler = "cargo"
1110

12-
if exists(':CompilerSet') != 2
11+
if exists(":CompilerSet") != 2
1312
command -nargs=* CompilerSet setlocal <args>
1413
endif
1514

16-
if exists('g:cargo_makeprg_params')
17-
execute 'CompilerSet makeprg=cargo\ '.escape(g:cargo_makeprg_params, ' \|"').'\ $*'
18-
else
19-
CompilerSet makeprg=cargo\ $*
20-
endif
15+
CompilerSet errorformat&
16+
CompilerSet makeprg=cargo\ $*
2117

2218
" Allow a configurable global Cargo.toml name. This makes it easy to
2319
" support variations like 'cargo.toml'.
24-
let s:cargo_manifest_name = get(g:, 'cargo_manifest_name', 'Cargo.toml')
20+
if !exists('g:cargo_toml_name')
21+
let g:cargo_toml_name = 'Cargo.toml'
22+
endif
2523

26-
function! s:is_absolute(path)
27-
return a:path[0] == '/' || a:path =~ '[A-Z]\+:'
28-
endfunction
24+
let s:toml_dir = fnamemodify(findfile(g:cargo_toml_name, '.;'), ':p:h').'/'
2925

30-
let s:local_manifest = findfile(s:cargo_manifest_name, '.;')
31-
if s:local_manifest != ''
32-
let s:local_manifest = fnamemodify(s:local_manifest, ':p:h').'/'
26+
if s:toml_dir != ''
3327
augroup cargo
3428
au!
3529
au QuickfixCmdPost make call s:FixPaths()
@@ -39,25 +33,15 @@ if s:local_manifest != ''
3933
" to be relative to the current directory instead of Cargo.toml.
4034
function! s:FixPaths()
4135
let qflist = getqflist()
42-
let manifest = s:local_manifest
4336
for qf in qflist
44-
if !qf.valid
45-
let m = matchlist(qf.text, '(file://\(.*\))$')
46-
if !empty(m)
47-
let manifest = m[1].'/'
48-
" Manually strip another slash if needed; usually just an
49-
" issue on Windows.
50-
if manifest =~ '^/[A-Z]\+:/'
51-
let manifest = manifest[1:]
52-
endif
53-
endif
37+
if !qf['valid']
5438
continue
5539
endif
56-
let filename = bufname(qf.bufnr)
57-
if s:is_absolute(filename)
58-
continue
40+
let filename = bufname(qf['bufnr'])
41+
if stridx(filename, s:toml_dir) == -1
42+
let filename = s:toml_dir.filename
5943
endif
60-
let qf.filename = simplify(manifest.filename)
44+
let qf['filename'] = simplify(s:toml_dir.bufname(qf['bufnr']))
6145
call remove(qf, 'bufnr')
6246
endfor
6347
call setqflist(qflist, 'r')

branches/auto/src/etc/vim/doc/rust.txt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,6 @@ g:rust_conceal_pub~
5353
let g:rust_conceal_pub = 1
5454
<
5555

56-
*g:rust_recommended_style*
57-
g:rust_recommended_style~
58-
Set this option to enable vim indentation and textwidth settings to
59-
conform to style conventions of the rust standard library (i.e. use 4
60-
spaces for indents and sets 'textwidth' to 99). This option is enabled
61-
by default. To disable it: >
62-
let g:rust_recommended_style = 0
63-
<
64-
6556
*g:rust_fold*
6657
g:rust_fold~
6758
Set this option to turn on |folding|: >
@@ -88,13 +79,6 @@ g:ftplugin_rust_source_path~
8879
let g:ftplugin_rust_source_path = $HOME.'/dev/rust'
8980
<
9081

91-
*g:cargo_manifest_name*
92-
g:cargo_manifest_name~
93-
Set this option to the name of the manifest file for your projects. If
94-
not specified it defaults to 'Cargo.toml' : >
95-
let g:cargo_manifest_name = 'Cargo.toml'
96-
<
97-
9882
==============================================================================
9983
COMMANDS *rust-commands*
10084

branches/auto/src/etc/vim/ftplugin/rust.vim

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ silent! setlocal formatoptions+=j
3535
" otherwise it's better than nothing.
3636
setlocal smartindent nocindent
3737

38-
if !exists("g:rust_recommended_style") || g:rust_recommended_style == 1
39-
setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab
40-
setlocal textwidth=99
41-
endif
38+
setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab
39+
40+
setlocal textwidth=99
4241

4342
" This includeexpr isn't perfect, but it's a good start
4443
setlocal includeexpr=substitute(v:fname,'::','/','g')

branches/auto/src/etc/vim/syntax/rust.vim

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -66,64 +66,69 @@ syn keyword rustType f64 i8 i16 i32 i64 str Self
6666
" This section is just straight transformation of the contents of the prelude,
6767
" to make it easy to update.
6868

69-
" Reexported core operators {{{3
69+
" Core operators {{{3
7070
syn keyword rustTrait Copy Send Sized Sync
7171
syn keyword rustTrait Add Sub Mul Div Rem Neg Not
7272
syn keyword rustTrait BitAnd BitOr BitXor
7373
syn keyword rustTrait Drop Deref DerefMut
74-
syn keyword rustTrait Shl Shr
75-
syn keyword rustTrait Index IndexMut
76-
syn keyword rustTrait Slice SliceMut
77-
syn keyword rustTrait Fn FnMut FnOnce
74+
syn keyword rustTrait Shl Shr Index IndexMut
75+
syn keyword rustEnum Option
76+
syn keyword rustEnumVariant Some None
77+
syn keyword rustEnum Result
78+
syn keyword rustEnumVariant Ok Err
7879

79-
" Reexported functions {{{3
80-
"syn keyword rustFunction range repeat
81-
"syn keyword rustFunction drop
80+
" Functions {{{3
8281
"syn keyword rustFunction from_str
82+
"syn keyword rustFunction range
83+
"syn keyword rustFunction drop
8384

84-
" Reexported types and traits {{{3
85+
" Types and traits {{{3
8586
syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr
8687
syn keyword rustTrait IntoBytes
8788
syn keyword rustTrait ToCStr
8889
syn keyword rustTrait Char UnicodeChar
8990
syn keyword rustTrait Clone
90-
syn keyword rustTrait PartialEq PartialOrd Eq Ord
91-
syn keyword rustEnum Ordering Equiv
91+
syn keyword rustTrait PartialEq PartialOrd Eq Ord Equiv
92+
syn keyword rustEnum Ordering
9293
syn keyword rustEnumVariant Less Equal Greater
93-
syn keyword rustTrait FromIterator Extend ExactSize
94+
syn keyword rustTrait Collection Mutable Map MutableMap MutableSeq
95+
syn keyword rustTrait Set MutableSet
96+
syn keyword rustTrait FromIterator IntoIterator Extend ExactSize
9497
syn keyword rustTrait Iterator DoubleEndedIterator
9598
syn keyword rustTrait RandomAccessIterator CloneableIterator
9699
syn keyword rustTrait OrdIterator MutableDoubleEndedIterator
97-
syn keyword rustTrait ToPrimitive FromPrimitive
100+
syn keyword rustTrait NumCast Int SignedInt UnsignedInt Float
101+
syn keyword rustTrait FloatMath ToPrimitive FromPrimitive
98102
syn keyword rustTrait Box
99-
syn keyword rustEnum Option
100-
syn keyword rustEnumVariant Some None
101103
syn keyword rustTrait GenericPath Path PosixPath WindowsPath
102-
syn keyword rustTrait RawPtr RawMutPtr
103-
syn keyword rustEnum Result
104-
syn keyword rustEnumVariant Ok Err
105-
syn keyword rustTrait Buffer Writer Reader Seek BufferPrelude
106-
syn keyword rustTrait Str StrVector StrPrelude
107-
syn keyword rustTrait IntoMaybeOwned StrAllocating UnicodeStrPrelude
104+
syn keyword rustTrait RawPtr
105+
syn keyword rustTrait Buffer Writer Reader Seek
106+
syn keyword rustTrait Str StrVector StrSlice
107+
syn keyword rustTrait IntoMaybeOwned StrAllocating UnicodeStrSlice
108+
syn keyword rustTrait ToString IntoString
108109
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
109110
syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8
110111
syn keyword rustTrait Tuple9 Tuple10 Tuple11 Tuple12
111-
syn keyword rustTrait SlicePrelude AsSlice CloneSlicePrelude
112-
syn keyword rustTrait VectorVector PartialEqSlicePrelude OrdSlicePrelude
113-
syn keyword rustTrait CloneSliceAllocPrelude OrdSliceAllocPrelude SliceAllocPrelude
114-
syn keyword rustTrait IntoString String ToString
112+
syn keyword rustTrait CloneableVector ImmutableCloneableVector
113+
syn keyword rustTrait MutableCloneableSlice MutableOrdSlice
114+
syn keyword rustTrait ImmutableSlice MutableSlice
115+
syn keyword rustTrait ImmutablePartialEqSlice ImmutableOrdSlice
116+
syn keyword rustTrait Slice VectorVector
117+
syn keyword rustTrait MutableSliceAllocating
118+
syn keyword rustTrait String
115119
syn keyword rustTrait Vec
116120

117-
" Reexported runtime types {{{3
118121
"syn keyword rustFunction sync_channel channel
119122
syn keyword rustTrait SyncSender Sender Receiver
120123
"syn keyword rustFunction spawn
121124

122-
" Other syntax {{{2
125+
"syn keyword rustConstant GC
123126

124127
syn keyword rustSelf self
125128
syn keyword rustBoolean true false
126129

130+
" Other syntax {{{2
131+
127132
" If foo::bar changes to foo.bar, change this ("::" to "\.").
128133
" If foo::bar changes to Foo::bar, change this (first "\w" to "\u").
129134
syn match rustModPath "\w\(\w\)*::[^<]"he=e-3,me=e-3

branches/auto/src/libcollections/slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ pub use core::slice::{OrdSlicePrelude, SlicePrelude, Items, MutItems};
106106
pub use core::slice::{ImmutableIntSlice, MutableIntSlice};
107107
pub use core::slice::{MutSplits, MutChunks, Splits};
108108
pub use core::slice::{bytes, mut_ref_slice, ref_slice, CloneSlicePrelude};
109-
pub use core::slice::{Found, NotFound, from_raw_buf, from_raw_mut_buf};
109+
pub use core::slice::{Found, NotFound};
110110

111111
// Functional utilities
112112

branches/auto/src/libcollections/str.rs

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,11 @@ use vec::Vec;
7474
pub use core::str::{from_utf8, CharEq, Chars, CharOffsets};
7575
pub use core::str::{Bytes, CharSplits};
7676
pub use core::str::{CharSplitsN, AnyLines, MatchIndices, StrSplits};
77-
pub use core::str::{Utf16Encoder, Utf16CodeUnits};
78-
pub use core::str::{eq_slice, is_utf8, is_utf16, Utf16Items};
77+
pub use core::str::{Utf16CodeUnits, eq_slice, is_utf8, is_utf16, Utf16Items};
7978
pub use core::str::{Utf16Item, ScalarValue, LoneSurrogate, utf16_items};
8079
pub use core::str::{truncate_utf16_at_nul, utf8_char_width, CharRange};
8180
pub use core::str::{FromStr, from_str};
8281
pub use core::str::{Str, StrPrelude};
83-
pub use core::str::{from_utf8_unchecked, from_c_str};
8482
pub use unicode::str::{UnicodeStrPrelude, Words, Graphemes, GraphemeIndices};
8583

8684
// FIXME(conventions): ensure bit/char conventions are followed by str's API
@@ -394,11 +392,11 @@ pub fn replace(s: &str, from: &str, to: &str) -> String {
394392
let mut result = String::new();
395393
let mut last_end = 0;
396394
for (start, end) in s.match_indices(from) {
397-
result.push_str(unsafe { s.slice_unchecked(last_end, start) });
395+
result.push_str(unsafe{raw::slice_bytes(s, last_end, start)});
398396
result.push_str(to);
399397
last_end = end;
400398
}
401-
result.push_str(unsafe { s.slice_unchecked(last_end, s.len()) });
399+
result.push_str(unsafe{raw::slice_bytes(s, last_end, s.len())});
402400
result
403401
}
404402

@@ -631,9 +629,7 @@ pub trait StrAllocating: Str {
631629
let me = self.as_slice();
632630
let mut out = String::with_capacity(me.len());
633631
for c in me.chars() {
634-
for c in c.escape_default() {
635-
out.push(c);
636-
}
632+
c.escape_default(|c| out.push(c));
637633
}
638634
out
639635
}
@@ -643,9 +639,7 @@ pub trait StrAllocating: Str {
643639
let me = self.as_slice();
644640
let mut out = String::with_capacity(me.len());
645641
for c in me.chars() {
646-
for c in c.escape_unicode() {
647-
out.push(c);
648-
}
642+
c.escape_unicode(|c| out.push(c));
649643
}
650644
out
651645
}
@@ -675,7 +669,16 @@ pub trait StrAllocating: Str {
675669
/// assert_eq!(s.replace("cookie monster", "little lamb"), s);
676670
/// ```
677671
fn replace(&self, from: &str, to: &str) -> String {
678-
replace(self.as_slice(), from, to)
672+
let me = self.as_slice();
673+
let mut result = String::new();
674+
let mut last_end = 0;
675+
for (start, end) in me.match_indices(from) {
676+
result.push_str(unsafe{raw::slice_bytes(me, last_end, start)});
677+
result.push_str(to);
678+
last_end = end;
679+
}
680+
result.push_str(unsafe{raw::slice_bytes(me, last_end, me.len())});
681+
result
679682
}
680683

681684
/// Given a string, makes a new string with repeated copies of it.
@@ -1185,7 +1188,7 @@ mod tests {
11851188
assert_eq!("11foo1bar11".trim_left_chars('1'), "foo1bar11");
11861189
let chars: &[char] = &['1', '2'];
11871190
assert_eq!("12foo1bar12".trim_left_chars(chars), "foo1bar12");
1188-
assert_eq!("123foo1bar123".trim_left_chars(|c: char| c.is_numeric()), "foo1bar123");
1191+
assert_eq!("123foo1bar123".trim_left_chars(|c: char| c.is_digit()), "foo1bar123");
11891192
}
11901193

11911194
#[test]
@@ -1200,7 +1203,7 @@ mod tests {
12001203
assert_eq!("11foo1bar11".trim_right_chars('1'), "11foo1bar");
12011204
let chars: &[char] = &['1', '2'];
12021205
assert_eq!("12foo1bar12".trim_right_chars(chars), "12foo1bar");
1203-
assert_eq!("123foo1bar123".trim_right_chars(|c: char| c.is_numeric()), "123foo1bar");
1206+
assert_eq!("123foo1bar123".trim_right_chars(|c: char| c.is_digit()), "123foo1bar");
12041207
}
12051208

12061209
#[test]
@@ -1215,7 +1218,7 @@ mod tests {
12151218
assert_eq!("11foo1bar11".trim_chars('1'), "foo1bar");
12161219
let chars: &[char] = &['1', '2'];
12171220
assert_eq!("12foo1bar12".trim_chars(chars), "foo1bar");
1218-
assert_eq!("123foo1bar123".trim_chars(|c: char| c.is_numeric()), "foo1bar");
1221+
assert_eq!("123foo1bar123".trim_chars(|c: char| c.is_digit()), "foo1bar");
12191222
}
12201223

12211224
#[test]

0 commit comments

Comments
 (0)