Skip to content

Commit 6111cd8

Browse files
committed
---
yaml --- r: 207263 b: refs/heads/tmp c: a591546 h: refs/heads/master i: 207261: 4a303e3 207259: a903ac9 207255: 90a22a2 207247: c1f7e7b 207231: e5f99ed v: v3
1 parent 6ab875a commit 6111cd8

File tree

23 files changed

+198
-389
lines changed

23 files changed

+198
-389
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3232
refs/heads/beta: cd7d89af9169885642d43597302af69f842bbd78
3333
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3434
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
35-
refs/heads/tmp: 5dc886b8adaf83eb6fc2f7ab5d5afb63bf930a6e
35+
refs/heads/tmp: a591546294b00ed6158d7eab5c2f41189cc56339
3636
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3737
refs/tags/homu-tmp: 704c2ee730d2e948d11a2edd77e3f35de8329a6e
3838
refs/heads/gate: 97c84447b65164731087ea82685580cc81424412

branches/tmp/RELEASES.md

Lines changed: 28 additions & 15 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,8 +260,9 @@ 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+
263264
Version 1.0.0-alpha (January 2015)
264-
----------------------------------
265+
==================================
265266

266267
* ~2400 changes, numerous bugfixes
267268

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

450+
449451
Version 0.12.0 (October 2014)
450-
-----------------------------
452+
=============================
451453

452454
* ~1900 changes, numerous bugfixes
453455

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

573+
571574
Version 0.11.0 (July 2014)
572-
-------------------------
575+
==========================
573576

574577
* ~1700 changes, numerous bugfixes
575578

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

706+
703707
Version 0.10 (April 2014)
704-
-------------------------
708+
=========================
705709

706710
* ~1500 changes, numerous bugfixes
707711

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

873+
869874
Version 0.9 (January 2014)
870-
--------------------------
875+
==========================
871876

872877
* ~1800 changes, numerous bugfixes
873878

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

1039+
10341040
Version 0.8 (September 2013)
1035-
--------------------------
1041+
============================
10361042

10371043
* ~2200 changes, numerous bugfixes
10381044

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

1195+
11891196
Version 0.7 (July 2013)
1190-
-----------------------
1197+
=======================
11911198

11921199
* ~2000 changes, numerous bugfixes
11931200

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

1312+
13051313
Version 0.6 (April 2013)
1306-
------------------------
1314+
========================
13071315

13081316
* ~2100 changes, numerous bugfixes
13091317

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

1415+
14071416
Version 0.5 (December 2012)
1408-
---------------------------
1417+
===========================
14091418

14101419
* ~900 changes, numerous bugfixes
14111420

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

1472+
14631473
Version 0.4 (October 2012)
1464-
--------------------------
1474+
==========================
14651475

14661476
* ~2000 changes, numerous bugfixes
14671477

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

1528+
15181529
Version 0.3 (July 2012)
1519-
------------------------
1530+
========================
15201531

15211532
* ~1900 changes, numerous bugfixes
15221533

@@ -1573,8 +1584,9 @@ Version 0.3 (July 2012)
15731584
* Tool improvements
15741585
* Cargo automatically resolves dependencies
15751586

1587+
15761588
Version 0.2 (March 2012)
1577-
-------------------------
1589+
=========================
15781590

15791591
* >1500 changes, numerous bugfixes
15801592
@@ -1613,8 +1625,9 @@ Version 0.2 (March 2012)
16131625
* Merged per-platform std::{os*, fs*} to core::{libc, os}
16141626
* Extensive cleanup, regularization in libstd, libcore
16151627

1628+
16161629
Version 0.1 (January 20, 2012)
1617-
-------------------------------
1630+
===============================
16181631

16191632
* Most language features work, including:
16201633
* Unique pointers, unique closures, move semantics

branches/tmp/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/tmp/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/tmp/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/tmp/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)