Skip to content

Commit df03adf

Browse files
committed
---
yaml --- r: 208685 b: refs/heads/snap-stage3 c: 83df71d h: refs/heads/master i: 208683: c0e8886 v: v3
1 parent f76b39b commit df03adf

File tree

24 files changed

+186
-403
lines changed

24 files changed

+186
-403
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: 38a97becdf3e6a6157f6f7ec2d98ade8d8edc193
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: f83fe6ec1e2feb7f7185b1dbcca18258bd422f7d
4+
refs/heads/snap-stage3: 83df71d6c5f7e2994d9f405ae857be72bc97a59e
55
refs/heads/try: 7b4ef47b7805a402d756fb8157101f64880a522f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/RELEASES.md

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Language
2323
* Digits of binary and octal literals are [lexed more eagerly][lex] to
2424
improve error messages and macro behavior. For example, `0b1234` is
2525
now lexed as `0b1234` instead of two tokens, `0b1` and `234`.
26-
* Trait bounds [are always invariant][inv], eliminating the need for
26+
* Trait bounds [are always invariant][inv], eleminating the need for
2727
the `PhantomFn` and `MarkerTrait` lang items, which have been
2828
removed.
2929
* ["-" is no longer a valid character in crate names][cr], the `extern crate
@@ -162,7 +162,7 @@ Misc
162162

163163

164164
Version 1.0.0-alpha.2 (February 2015)
165-
=====================================
165+
-------------------------------------
166166

167167
* ~1300 changes, numerous bugfixes
168168

@@ -260,9 +260,8 @@ Version 1.0.0-alpha.2 (February 2015)
260260
[ufcs-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0132-ufcs.md
261261
[un]: https://github.com/rust-lang/rust/pull/22256
262262

263-
264263
Version 1.0.0-alpha (January 2015)
265-
==================================
264+
----------------------------------
266265

267266
* ~2400 changes, numerous bugfixes
268267

@@ -447,9 +446,8 @@ Version 1.0.0-alpha (January 2015)
447446
[trpl]: http://doc.rust-lang.org/book/index.html
448447
[rbe]: http://rustbyexample.com/
449448

450-
451449
Version 0.12.0 (October 2014)
452-
=============================
450+
-----------------------------
453451

454452
* ~1900 changes, numerous bugfixes
455453

@@ -570,9 +568,8 @@ Version 0.12.0 (October 2014)
570568
* Official Rust binaries on Linux are more compatible with older
571569
kernels and distributions, built on CentOS 5.10.
572570

573-
574571
Version 0.11.0 (July 2014)
575-
==========================
572+
-------------------------
576573

577574
* ~1700 changes, numerous bugfixes
578575

@@ -703,9 +700,8 @@ Version 0.11.0 (July 2014)
703700
* Error message related to non-exhaustive match expressions have been
704701
greatly improved.
705702

706-
707703
Version 0.10 (April 2014)
708-
=========================
704+
-------------------------
709705

710706
* ~1500 changes, numerous bugfixes
711707

@@ -870,9 +866,8 @@ Version 0.10 (April 2014)
870866
* search works across crates that have been rendered to the same output
871867
directory.
872868

873-
874869
Version 0.9 (January 2014)
875-
==========================
870+
--------------------------
876871

877872
* ~1800 changes, numerous bugfixes
878873

@@ -1036,9 +1031,8 @@ Version 0.9 (January 2014)
10361031
* `rustc` adds a `--dep-info` flag for communicating dependencies to
10371032
build tools.
10381033

1039-
10401034
Version 0.8 (September 2013)
1041-
============================
1035+
--------------------------
10421036

10431037
* ~2200 changes, numerous bugfixes
10441038

@@ -1192,9 +1186,8 @@ Version 0.8 (September 2013)
11921186
* A new documentation backend, rustdoc_ng, is available for use. It is
11931187
still invoked through the normal `rustdoc` command.
11941188

1195-
11961189
Version 0.7 (July 2013)
1197-
=======================
1190+
-----------------------
11981191

11991192
* ~2000 changes, numerous bugfixes
12001193

@@ -1309,9 +1302,8 @@ Version 0.7 (July 2013)
13091302
* Various improvements to rustdoc.
13101303
* Improvements to rustpkg (see the detailed release notes).
13111304

1312-
13131305
Version 0.6 (April 2013)
1314-
========================
1306+
------------------------
13151307

13161308
* ~2100 changes, numerous bugfixes
13171309

@@ -1412,9 +1404,8 @@ Version 0.6 (April 2013)
14121404
* Rust code may be embedded in foreign code under limited circumstances
14131405
* Inline assembler supported by new asm!() syntax extension.
14141406

1415-
14161407
Version 0.5 (December 2012)
1417-
===========================
1408+
---------------------------
14181409

14191410
* ~900 changes, numerous bugfixes
14201411

@@ -1469,9 +1460,8 @@ Version 0.5 (December 2012)
14691460
* Added a preliminary REPL, `rusti`
14701461
* License changed from MIT to dual MIT/APL2
14711462

1472-
14731463
Version 0.4 (October 2012)
1474-
==========================
1464+
--------------------------
14751465

14761466
* ~2000 changes, numerous bugfixes
14771467

@@ -1525,9 +1515,8 @@ Version 0.4 (October 2012)
15251515
Rust-based (visitor) code
15261516
* All hash functions and tables converted to secure, randomized SipHash
15271517

1528-
15291518
Version 0.3 (July 2012)
1530-
========================
1519+
------------------------
15311520

15321521
* ~1900 changes, numerous bugfixes
15331522

@@ -1584,9 +1573,8 @@ Version 0.3 (July 2012)
15841573
* Tool improvements
15851574
* Cargo automatically resolves dependencies
15861575

1587-
15881576
Version 0.2 (March 2012)
1589-
=========================
1577+
-------------------------
15901578

15911579
* >1500 changes, numerous bugfixes
15921580
@@ -1625,9 +1613,8 @@ Version 0.2 (March 2012)
16251613
* Merged per-platform std::{os*, fs*} to core::{libc, os}
16261614
* Extensive cleanup, regularization in libstd, libcore
16271615

1628-
16291616
Version 0.1 (January 20, 2012)
1630-
===============================
1617+
-------------------------------
16311618

16321619
* Most language features work, including:
16331620
* Unique pointers, unique closures, move semantics

branches/snap-stage3/src/doc/trpl/borrow-and-asref.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ This is because the standard library has `impl Borrow<str> for String`.
4747

4848
For most types, when you want to take an owned or borrowed type, a `&T` is
4949
enough. But one area where `Borrow` is effective is when there’s more than one
50-
kind of borrowed value. This is especially true of references and slices: you
51-
can have both an `&T` or a `&mut T`. If we wanted to accept both of these types,
52-
`Borrow` is up for it:
50+
kind of borrowed value. Slices are an area where this is especially true: you
51+
can have both an `&[T]` or a `&mut [T]`. If we wanted to accept both of these
52+
types, `Borrow` is up for it:
5353

5454
```
5555
use std::borrow::Borrow;

branches/snap-stage3/src/doc/trpl/dining-philosophers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ called ‘the dining philosophers’. It was originally conceived by Dijkstra in
1818
> in his own chair, picked up his own fork on his left, and plunged it into the
1919
> spaghetti. But such is the tangled nature of spaghetti that a second fork is
2020
> required to carry it to the mouth. The philosopher therefore had also to pick
21-
> up the fork on his right. When we was finished he would put down both his
21+
> up the fork on his right. When he was finished he would put down both his
2222
> forks, get up from his chair, and continue thinking. Of course, a fork can be
2323
> used by only one philosopher at a time. If the other philosopher wants it, he
2424
> just has to wait until the fork is available again.

branches/snap-stage3/src/doc/trpl/traits.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,17 +183,17 @@ won’t have its methods:
183183

184184
```rust,ignore
185185
let mut f = std::fs::File::open("foo.txt").ok().expect("Couldn’t open foo.txt");
186-
let buf = b"whatever"; // byte string literal. buf: &[u8; 8]
187-
let result = f.write(buf);
186+
let result = f.write("whatever".as_bytes());
188187
# result.unwrap(); // ignore the error
189188
```
190189

191190
Here’s the error:
192191

193192
```text
194193
error: type `std::fs::File` does not implement any method in scope named `write`
195-
let result = f.write(buf);
196-
^~~~~~~~~~
194+
195+
let result = f.write(b"whatever");
196+
^~~~~~~~~~~~~~~~~~
197197
```
198198

199199
We need to `use` the `Write` trait first:
@@ -202,8 +202,7 @@ We need to `use` the `Write` trait first:
202202
use std::io::Write;
203203
204204
let mut f = std::fs::File::open("foo.txt").ok().expect("Couldn’t open foo.txt");
205-
let buf = b"whatever";
206-
let result = f.write(buf);
205+
let result = f.write("whatever".as_bytes());
207206
# result.unwrap(); // ignore the error
208207
```
209208

branches/snap-stage3/src/grammar/lexer.l

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ r/# {
311311
<str>\x22 { BEGIN(suffix); return LIT_STR; }
312312

313313
<str><<EOF>> { return -1; }
314-
<str>\\[n\nr\rt\\\x27\x220] { yymore(); }
314+
<str>\\[n\nrt\\\x27\x220] { yymore(); }
315315
<str>\\x[0-9a-fA-F]{2} { yymore(); }
316316
<str>\\u\{[0-9a-fA-F]?{6}\} { yymore(); }
317317
<str>\\[^n\nrt\\\x27\x220] { return -1; }

branches/snap-stage3/src/grammar/parser-lalr.y

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -289,16 +289,16 @@ item_const
289289
;
290290

291291
item_macro
292-
: path_expr '!' maybe_ident parens_delimited_token_trees ';' { $$ = mk_node("ItemMacro", 3, $1, $3, $4); }
293-
| path_expr '!' maybe_ident braces_delimited_token_trees { $$ = mk_node("ItemMacro", 3, $1, $3, $4); }
294-
| path_expr '!' maybe_ident brackets_delimited_token_trees ';'{ $$ = mk_node("ItemMacro", 3, $1, $3, $4); }
292+
: path_expr '!' maybe_ident parens_delimited_token_trees ';'
293+
| path_expr '!' maybe_ident braces_delimited_token_trees
294+
| path_expr '!' maybe_ident brackets_delimited_token_trees ';'
295295
;
296296

297297
view_item
298298
: use_item
299299
| extern_fn_item
300300
| EXTERN CRATE ident ';' { $$ = mk_node("ViewItemExternCrate", 1, $3); }
301-
| EXTERN CRATE ident AS ident ';' { $$ = mk_node("ViewItemExternCrate", 2, $3, $5); }
301+
| EXTERN CRATE str AS ident ';' { $$ = mk_node("ViewItemExternCrate", 2, $3, $5); }
302302
;
303303

304304
extern_fn_item
@@ -312,11 +312,8 @@ use_item
312312
view_path
313313
: path_no_types_allowed { $$ = mk_node("ViewPathSimple", 1, $1); }
314314
| path_no_types_allowed MOD_SEP '{' '}' { $$ = mk_node("ViewPathList", 2, $1, mk_atom("ViewPathListEmpty")); }
315-
| MOD_SEP '{' '}' { $$ = mk_node("ViewPathList", 1, mk_atom("ViewPathListEmpty")); }
316315
| path_no_types_allowed MOD_SEP '{' idents_or_self '}' { $$ = mk_node("ViewPathList", 2, $1, $4); }
317-
| MOD_SEP '{' idents_or_self '}' { $$ = mk_node("ViewPathList", 1, $3); }
318316
| path_no_types_allowed MOD_SEP '{' idents_or_self ',' '}' { $$ = mk_node("ViewPathList", 2, $1, $4); }
319-
| MOD_SEP '{' idents_or_self ',' '}' { $$ = mk_node("ViewPathList", 1, $3); }
320317
| path_no_types_allowed MOD_SEP '*' { $$ = mk_node("ViewPathGlob", 1, $1); }
321318
| '{' '}' { $$ = mk_atom("ViewPathListEmpty"); }
322319
| '{' idents_or_self '}' { $$ = mk_node("ViewPathList", 1, $2); }
@@ -336,7 +333,7 @@ block_item
336333
;
337334

338335
maybe_ty_ascription
339-
: ':' ty_sum { $$ = $2; }
336+
: ':' ty { $$ = $2; }
340337
| %empty { $$ = mk_none(); }
341338
;
342339

@@ -514,7 +511,7 @@ trait_item
514511
;
515512

516513
trait_const
517-
: maybe_outer_attrs CONST ident maybe_ty_ascription maybe_const_default ';' { $$ = mk_node("ConstTraitItem", 4, $1, $3, $4, $5); }
514+
: maybe_outer_attrs CONST ident maybe_const_default ';' { $$ = mk_node("ConstTraitItem", 3, $1, $3, $4); }
518515
;
519516

520517
maybe_const_default
@@ -593,11 +590,11 @@ item_impl
593590
{
594591
$$ = mk_node("ItemImpl", 6, $1, $3, 5, $6, $9, $10);
595592
}
596-
| maybe_unsafe IMPL generic_params trait_ref FOR ty_sum maybe_where_clause '{' maybe_inner_attrs maybe_impl_items '}'
593+
| maybe_unsafe IMPL generic_params trait_ref FOR ty maybe_where_clause '{' maybe_inner_attrs maybe_impl_items '}'
597594
{
598595
$$ = mk_node("ItemImpl", 6, $3, $4, $6, $7, $9, $10);
599596
}
600-
| maybe_unsafe IMPL generic_params '!' trait_ref FOR ty_sum maybe_where_clause '{' maybe_inner_attrs maybe_impl_items '}'
597+
| maybe_unsafe IMPL generic_params '!' trait_ref FOR ty maybe_where_clause '{' maybe_inner_attrs maybe_impl_items '}'
601598
{
602599
$$ = mk_node("ItemImplNeg", 7, $1, $3, $5, $7, $8, $10, $11);
603600
}
@@ -623,7 +620,7 @@ impl_items
623620

624621
impl_item
625622
: impl_method
626-
| attrs_and_vis item_macro { $$ = mk_node("ImplMacroItem", 2, $1, $2); }
623+
| item_macro
627624
| impl_const
628625
| impl_type
629626
;
@@ -701,7 +698,7 @@ params
701698
;
702699

703700
param
704-
: pat ':' ty_sum { $$ = mk_node("Arg", 2, $1, $3); }
701+
: pat ':' ty { $$ = mk_node("Arg", 2, $1, $3); }
705702
;
706703

707704
inferrable_params
@@ -912,11 +909,6 @@ pat
912909
| ident '@' pat { $$ = mk_node("PatIdent", 3, mk_node("BindByValue", 1, mk_atom("MutImmutable")), $1, $3); }
913910
| binding_mode ident '@' pat { $$ = mk_node("PatIdent", 3, $1, $2, $4); }
914911
| BOX pat { $$ = mk_node("PatUniq", 1, $2); }
915-
| '<' ty_sum maybe_as_trait_ref '>' MOD_SEP ident { $$ = mk_node("PatQualifiedPath", 3, $2, $3, $6); }
916-
| SHL ty_sum maybe_as_trait_ref '>' MOD_SEP ident maybe_as_trait_ref '>' MOD_SEP ident
917-
{
918-
$$ = mk_node("PatQualifiedPath", 3, mk_node("PatQualifiedPath", 3, $2, $3, $6), $7, $10);
919-
}
920912
;
921913

922914
pats_or
@@ -989,11 +981,11 @@ pat_vec_elts
989981
ty
990982
: ty_prim
991983
| ty_closure
992-
| '<' ty_sum maybe_as_trait_ref '>' MOD_SEP ident { $$ = mk_node("TyQualifiedPath", 3, $2, $3, $6); }
993-
| SHL ty_sum maybe_as_trait_ref '>' MOD_SEP ident maybe_as_trait_ref '>' MOD_SEP ident { $$ = mk_node("TyQualifiedPath", 3, mk_node("TyQualifiedPath", 3, $2, $3, $6), $7, $10); }
994-
| '(' ty_sums ')' { $$ = mk_node("TyTup", 1, $2); }
995-
| '(' ty_sums ',' ')' { $$ = mk_node("TyTup", 1, $2); }
996-
| '(' ')' { $$ = mk_atom("TyNil"); }
984+
| '<' ty_sum AS trait_ref '>' MOD_SEP ident { $$ = mk_node("TyQualifiedPath", 3, $2, $4, $7); }
985+
| SHL ty_sum AS trait_ref '>' MOD_SEP ident AS trait_ref '>' MOD_SEP ident { $$ = mk_node("TyQualifiedPath", 3, mk_node("TyQualifiedPath", 3, $2, $4, $7), $9, $12); }
986+
| '(' ty_sums ')' { $$ = mk_node("TyTup", 1, $2); }
987+
| '(' ty_sums ',' ')' { $$ = mk_node("TyTup", 1, $2); }
988+
| '(' ')' { $$ = mk_atom("TyNil"); }
997989
;
998990

999991
ty_prim
@@ -1559,7 +1551,11 @@ nonblock_prefix_expr
15591551
;
15601552

15611553
expr_qualified_path
1562-
: '<' ty_sum maybe_as_trait_ref '>' MOD_SEP ident maybe_qpath_params
1554+
: '<' ty_sum maybe_as_trait_ref '>' MOD_SEP ident
1555+
{
1556+
$$ = mk_node("ExprQualifiedPath", 3, $2, $3, $6);
1557+
}
1558+
| '<' ty_sum maybe_as_trait_ref '>' MOD_SEP ident generic_args
15631559
{
15641560
$$ = mk_node("ExprQualifiedPath", 4, $2, $3, $6, $7);
15651561
}
@@ -1580,11 +1576,6 @@ expr_qualified_path
15801576
$$ = mk_node("ExprQualifiedPath", 4, mk_node("ExprQualifiedPath", 4, $2, $3, $6, $7), $8, $11, $12);
15811577
}
15821578

1583-
maybe_qpath_params
1584-
: MOD_SEP generic_args { $$ = $2; }
1585-
| %empty { $$ = mk_none(); }
1586-
;
1587-
15881579
maybe_as_trait_ref
15891580
: AS trait_ref { $$ = $2; }
15901581
| %empty { $$ = mk_none(); }
@@ -1675,10 +1666,8 @@ block_expr
16751666

16761667
full_block_expr
16771668
: block_expr
1678-
| full_block_expr '.' path_generic_args_with_colons %prec IDENT { $$ = mk_node("ExprField", 2, $1, $3); }
1679-
| full_block_expr '.' path_generic_args_with_colons '[' maybe_expr ']' { $$ = mk_node("ExprIndex", 3, $1, $3, $5); }
1680-
| full_block_expr '.' path_generic_args_with_colons '(' maybe_exprs ')' { $$ = mk_node("ExprCall", 3, $1, $3, $5); }
1681-
| full_block_expr '.' LIT_INTEGER { $$ = mk_node("ExprTupleIndex", 1, $1); }
1669+
| full_block_expr '.' path_generic_args_with_colons { $$ = mk_node("ExprField", 2, $1, $3); }
1670+
| full_block_expr '.' LIT_INTEGER { $$ = mk_node("ExprTupleIndex", 1, $1); }
16821671
;
16831672

16841673
expr_match

0 commit comments

Comments
 (0)