Skip to content

Commit ef951b2

Browse files
committed
---
yaml --- r: 15753 b: refs/heads/try c: bbf73bd h: refs/heads/master i: 15751: 651cf2b v: v3
1 parent 9c10d3d commit ef951b2

Some content is hidden

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

74 files changed

+771
-1533
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 95a2b5d42f1acb96b035f21f192b0fab6cb2af6a
5+
refs/heads/try: bbf73bdfc682dd778cd0827540026477dd073c3f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/LICENSE.txt

Lines changed: 11 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ included:
186186
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
187187
OF SUCH DAMAGE.
188188

189-
190189
* The auxiliary file src/etc/pkg/modpath.iss contains a
191190
library routine compiled, by Inno Setup, into the Windows
192191
installer binary. This file is licensed under the LGPL,
@@ -199,9 +198,8 @@ included:
199198
of any of the files installed by such an installer (such
200199
as the Rust compiler or runtime libraries themselves).
201200

202-
203201
* The libuv asynchronous I/O library. Code for this package
204-
is found in the src/libuv directory, within this
202+
is found in the src/rt/libuv directory, within this
205203
distribution. This package is redistributed under the
206204
following terms, as noted in its source:
207205

@@ -232,102 +230,10 @@ included:
232230

233231

234232
* Additional libraries included in libuv carry separate
235-
BSD-compatible licenses. See src/libuv/LICENSE for
233+
BSD-compatible licenses. See src/rt/libuv/LICENSE for
236234
details.
237235

238236

239-
* LLVM and Clang. Code for this package is found in
240-
src/llvm.
241-
242-
Copyright (c) 2003-2012 University of Illinois at
243-
Urbana-Champaign. All rights reserved.
244-
245-
Developed by:
246-
247-
LLVM Team
248-
249-
University of Illinois at Urbana-Champaign
250-
251-
http://llvm.org
252-
253-
Permission is hereby granted, free of charge, to any
254-
person obtaining a copy of this software and associated
255-
documentation files (the "Software"), to deal with the
256-
Software without restriction, including without
257-
limitation the rights to use, copy, modify, merge,
258-
publish, distribute, sublicense, and/or sell copies of
259-
the Software, and to permit persons to whom the Software
260-
is furnished to do so, subject to the following
261-
conditions:
262-
263-
* Redistributions of source code must retain the
264-
above copyright notice, this list of conditions
265-
and the following disclaimers.
266-
267-
* Redistributions in binary form must reproduce the
268-
above copyright notice, this list of conditions
269-
and the following disclaimers in the documentation
270-
and/or other materials provided with the
271-
distribution.
272-
273-
* Neither the names of the LLVM Team, University of
274-
Illinois at Urbana-Champaign, nor the names of its
275-
contributors may be used to endorse or promote
276-
products derived from this Software without
277-
specific prior written permission.
278-
279-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
280-
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
281-
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
282-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
283-
SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE
284-
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
285-
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
286-
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
287-
OTHER DEALINGS WITH THE SOFTWARE.
288-
289-
290-
* Additional libraries included in LLVM carry separate
291-
BSD-compatible licenses. See src/llvm/LICENSE.txt for
292-
details.
293-
294-
295-
* Portions of the FFI code for interacting with the native ABI
296-
is derived from the Clay programming language, which carries
297-
the following license.
298-
299-
Copyright (C) 2008-2010 Tachyon Technologies.
300-
All rights reserved.
301-
302-
Redistribution and use in source and binary forms, with
303-
or without modification, are permitted provided that the
304-
following conditions are met:
305-
306-
1. Redistributions of source code must retain the above
307-
copyright notice, this list of conditions and the
308-
following disclaimer.
309-
310-
2. Redistributions in binary form must reproduce the
311-
above copyright notice, this list of conditions and
312-
the following disclaimer in the documentation and/or
313-
other materials provided with the distribution.
314-
315-
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR
316-
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
317-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
318-
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
319-
DEVELOPERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
320-
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
321-
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
322-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
323-
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
324-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
325-
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
326-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
327-
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
328-
OF SUCH DAMAGE.
329-
330-
331237
* Additional copyright may be retained by contributors other
332238
than Mozilla or the parties enumerated in this file. Such
333239
copyright can be determined on a case-by-case basis by
@@ -336,19 +242,19 @@ included:
336242
consulting representative comments claiming copyright
337243
ownership for a file.
338244

339-
For example, the text:
245+
For example, the text:
340246

341247
"Copyright (c) 2011 Google Inc."
342248

343-
appears in some files, and these files thereby denote
344-
that their author and copyright-holder is Google Inc.
249+
appears in some files, and these files thereby denote
250+
that their author and copyright-holder is Google Inc.
345251

346-
In all such cases, the absence of explicit licensing text
347-
indicates that the contributor chose to license their
348-
work for distribution under identical terms to those
349-
Mozilla has chosen for the collective work, enumerated
350-
below. The only difference is the retention of copyright
351-
itself, held by the contributor.
252+
In all such cases, the absence of explicit licensing text
253+
indicates that the contributor chose to license their
254+
work for distribution under identical terms to those
255+
Mozilla has chosen for the collective work, enumerated
256+
below. The only difference is the retention of copyright
257+
itself, held by the contributor.
352258

353259

354260
The remaining code and documentation in the collective work

branches/try/src/compiletest/header.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn load_props(testfile: str) -> test_props {
2929
let mut exec_env = [];
3030
let mut compile_flags = option::none;
3131
let mut pp_exact = option::none;
32-
for iter_header(testfile) {|ln|
32+
iter_header(testfile) {|ln|
3333
alt parse_error_pattern(ln) {
3434
option::some(ep) { error_patterns += [ep]; }
3535
option::none { }
@@ -62,11 +62,14 @@ fn load_props(testfile: str) -> test_props {
6262

6363
fn is_test_ignored(config: config, testfile: str) -> bool {
6464
let mut found = false;
65-
for iter_header(testfile) {|ln|
66-
if parse_name_directive(ln, "xfail-test") { ret true; }
67-
if parse_name_directive(ln, xfail_target()) { ret true; }
68-
if config.mode == common::mode_pretty &&
69-
parse_name_directive(ln, "xfail-pretty") { ret true; }
65+
iter_header(testfile) {|ln|
66+
// FIXME: Can't return or break from iterator
67+
// (Fix when Issue #1619 is resolved)
68+
found = found || parse_name_directive(ln, "xfail-test");
69+
found = found || parse_name_directive(ln, xfail_target());
70+
if (config.mode == common::mode_pretty) {
71+
found = found || parse_name_directive(ln, "xfail-pretty");
72+
}
7073
};
7174
ret found;
7275

@@ -75,7 +78,7 @@ fn is_test_ignored(config: config, testfile: str) -> bool {
7578
}
7679
}
7780

78-
fn iter_header(testfile: str, it: fn(str) -> bool) -> bool {
81+
fn iter_header(testfile: str, it: fn(str)) {
7982
let rdr = result::get(io::file_reader(testfile));
8083
while !rdr.eof() {
8184
let ln = rdr.read_line();
@@ -85,10 +88,9 @@ fn iter_header(testfile: str, it: fn(str) -> bool) -> bool {
8588
// with a warm page cache. Maybe with a cold one.
8689
if str::starts_with(ln, "fn")
8790
|| str::starts_with(ln, "mod") {
88-
ret false;
89-
} else { if !(it(ln)) { ret false; } }
91+
break;
92+
} else { it(ln); }
9093
}
91-
ret true;
9294
}
9395

9496
fn parse_error_pattern(line: str) -> option<str> {

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

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,17 @@ if !exists("main_syntax")
1515
endif
1616

1717
syn keyword rustKeyword alt as assert be bind break
18-
syn keyword rustKeyword check claim cont const copy do else enum export fail
19-
syn keyword rustKeyword fn for if iface impl import in inline lambda let log
18+
syn keyword rustKeyword check claim cont const copy do else export fail
19+
syn keyword rustKeyword for if impl import in inline lambda let log
2020
syn keyword rustKeyword loop mod mut mutable native note of prove pure
21-
syn keyword rustKeyword resource ret self syntax to type unchecked
21+
syn keyword rustKeyword ret self syntax to unchecked
2222
syn keyword rustKeyword unsafe use while with
23+
" FIXME: Scoped impl's name is also fallen in this category
24+
syn keyword rustKeyword mod iface resource class enum type nextgroup=rustIdentifier skipwhite
25+
syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite
26+
27+
syn match rustIdentifier "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
28+
syn match rustFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
2329

2430
" Reserved words
2531
syn keyword rustKeyword m32 m64 m128 f80 f16 f128 class trait
@@ -33,35 +39,49 @@ syn match rustItemPath "\(\w\|::\)\+"
3339

3440
syn region rustString start=+L\="+ skip=+\\\\\|\\"+ end=+"+
3541

36-
"integer number, or floating point number without a dot and with "f".
37-
syn case ignore
38-
syn match rustNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
39-
"hex number
40-
syn match rustNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
41-
syn match rustFloat display contained "\d\+f"
42-
"floating point number, with dot, optional exponent
43-
syn match rustFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
44-
"floating point number, starting with a dot, optional exponent
45-
syn match rustFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
46-
"floating point number, without dot, with exponent
47-
syn match rustFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>"
48-
49-
syn case match
42+
" Number/Float literals
43+
syn match rustNumber display "\<\d\>"
44+
syn match rustNumber display "\<[1-9]\d\+\>"
45+
syn match rustNumber display "\<\d\+\(u\|u8\|u16\|u32\|u64\)\>"
46+
syn match rustNumber display "\<\d\+\(i8\|i16\|i32\|i64\)\>"
47+
48+
syn match rustHexNumber display "\<0[xX]\x\+\>"
49+
syn match rustHexNumber display "\<0[xX]\x\+_\(u\|u8\|u16\|u32\|u64\)\>"
50+
syn match rustHexNumber display "\<0[xX]\x\+_\(i8\|i16\|i32\|i64\)\>"
51+
syn match rustOctNumber display "\<0\o\+\>"
52+
syn match rustOctNumber display "\<0\o\+_\(u\|u8\|u16\|u32\|u64\)\>"
53+
syn match rustOctNumber display "\<0\o\+_\(i8\|i16\|i32\|i64\)\>"
54+
syn match rustBinNumber display "\<0[bB][01]\+\>"
55+
syn match rustBinNumber display "\<0[bB][01]\+_\(u\|u8\|u16\|u32\|u64\)\>"
56+
syn match rustBinNumber display "\<0[bB][01]\+_\(i8\|i16\|i32\|i64\)\>"
57+
58+
syn match rustFloat display "\.\d\+\%([eE][+-]\=\d\+\)\=\>"
59+
syn match rustFloat display "\<\d\+[eE][+-]\=\d\+\>"
60+
syn match rustFloat display "\<\d\+\.\d*\%([eE][+-]\=\d\+\)\="
5061

5162
syn match rustCharacter "'\([^'\\]\|\\\(['nrt\\\"]\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'"
5263

53-
syn region rustComment start="/\*" end="\*/" contains=rustComment
54-
syn region rustComment start="//" skip="\\$" end="$" keepend
64+
syn region rustComment start="/\*" end="\*/" contains=rustComment,rustTodo
65+
syn region rustComment start="//" skip="\\$" end="$" contains=rustTodo keepend
66+
67+
syn keyword rustTodo TODO FIXME XXX NB
68+
69+
hi def link rustHexNumber rustNumber
70+
hi def link rustOctNumber rustNumber
71+
hi def link rustBinNumber rustNumber
5572

5673
hi def link rustString String
5774
hi def link rustCharacter Character
5875
hi def link rustNumber Number
5976
hi def link rustBoolean Boolean
6077
hi def link rustFloat Float
6178
hi def link rustKeyword Keyword
79+
hi def link rustIdentifier Identifier
80+
hi def link rustFuncName Function
6281
hi def link rustComment Comment
6382
hi def link rustMacro Macro
6483
hi def link rustType Type
84+
hi def link rustTodo Todo
6585

6686
syn sync minlines=200
6787
syn sync maxlines=500

branches/try/src/fuzzer/fuzzer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ fn steal(crate: ast::crate, tm: test_mode) -> stolen_stuff {
154154
fn safe_to_replace_expr(e: ast::expr_, _tm: test_mode) -> bool {
155155
alt e {
156156
// https://github.com/mozilla/rust/issues/652
157-
ast::expr_if(*) { false }
157+
ast::expr_if(_, _, _) { false }
158158
ast::expr_block(_) { false }
159159

160160
// expr_call is also missing a constraint
161-
ast::expr_fn_block(*) { false }
161+
ast::expr_fn_block(_, _) { false }
162162

163163
_ { true }
164164
}

0 commit comments

Comments
 (0)