Commit Graph

41706 Commits

Author SHA1 Message Date
bors
bba18fec45 Auto merge of #24829 - jooert:fix22673, r=pnkfelix 2015-04-26 19:06:38 +00:00
bors
b29c2efd42 Auto merge of #24828 - jooert:fix23253, r=pnkfelix
r? @alexcrichton
2015-04-26 17:04:24 +00:00
bors
314b1f16b7 Auto merge of #24679 - tamird:enable-debug, r=pnkfelix
r? @alexcrichton
2015-04-26 15:04:33 +00:00
bors
d3724342a3 Auto merge of #24807 - luqmana:nullable-enum-opt-dst-raw-pointers, r=jakub-
Fixes #23433.
2015-04-26 13:03:31 +00:00
bors
6365080c5c Auto merge of #23085 - goffrie:interpolating-quote, r=huonw
This changes the `ToTokens` implementations for expressions, statements, etc. with almost-trivial ones that produce `Interpolated(*Nt(...))` pseudo-tokens. In this way, quasiquote now works the same way as macros do: already-parsed AST fragments are used as-is, not reparsed.

The `ToSource` trait is removed. Quasiquote no longer involves pretty-printing at all, which removes the need for the `encode_with_hygiene` hack. All associated machinery is removed.

New `Nonterminal`s are added: NtArm, NtImplItem, and NtTraitItem. These are just for quasiquote, not macros.

`ToTokens` is no longer implemented for `Arg` (although this could be added again) and `Generics` (which I don't think makes sense).

This breaks any compiler extensions that relied on the ability of `ToTokens` to turn AST fragments back into inspectable token trees. For this reason, this closes #16987.

As such, this is a [breaking-change].

Fixes #16472.
Fixes #15962.
Fixes #17397.
Fixes #16617.
2015-04-26 09:52:28 +00:00
bors
b0043db465 Auto merge of #24367 - ebfull:fix_ice_cat_expr, r=pnkfelix
An actual typeck error is the cause of many failed compilations but an
unrelated bug is being reported instead. It is triggered because a typeck
error is presumably not yet identified during compiler execution, which
would normally bypass an invariant in the presence of other errors. In
this particular situation, we delay the reporting of the bug until
abort_if_errors().

Closes #23827, closes #24356, closes #23041, closes #22897, closes #23966,
closes #24013, and closes #23729

**There is at least one situation where this bug may still be genuinely
triggered (#23437).**
2015-04-26 05:32:16 +00:00
Geoffry Song
24ef905273 Remove FakeExtCtxt from qquote tests.
Instead create an ExtCtxt structure.
2015-04-26 01:09:36 -04:00
bors
61a5e46726 Auto merge of #24825 - rkruppe:reference-audit, r=steveklabnik
Transplant the relevant changes (turns out to be all of them) to `grammar.md`, and remove all grammar talk from `reference.md`. Sorry for the chaos.

The second commit, further below, goes over the comments and whitespace sections.

r? @steveklabnik
2015-04-26 03:34:38 +00:00
Geoffry Song
ea892dc70b Remove remaining tests for hygiene-encoded identifiers.
Such things no longer exist.
2015-04-25 21:42:10 -04:00
Geoffry Song
2d9831dea5 Interpolate AST nodes in quasiquote.
This changes the `ToTokens` implementations for expressions, statements,
etc. with almost-trivial ones that produce `Interpolated(*Nt(...))`
pseudo-tokens. In this way, quasiquote now works the same way as macros
do: already-parsed AST fragments are used as-is, not reparsed.

The `ToSource` trait is removed. Quasiquote no longer involves
pretty-printing at all, which removes the need for the
`encode_with_hygiene` hack. All associated machinery is removed.

A new `Nonterminal` is added, NtArm, which the parser now interpolates.
This is just for quasiquote, not macros (although it could be in the
future).

`ToTokens` is no longer implemented for `Arg` (although this could be
added again) and `Generics` (which I don't think makes sense).

This breaks any compiler extensions that relied on the ability of
`ToTokens` to turn AST fragments back into inspectable token trees. For
this reason, this closes #16987.

As such, this is a [breaking-change].

Fixes #16472.
Fixes #15962.
Fixes #17397.
Fixes #16617.
2015-04-25 21:42:10 -04:00
bors
20adc9533d Auto merge of #24815 - heejongahn:master, r=steveklabnik
At https://doc.rust-lang.org/book/vectors.html, there should be a link to
Generics page but the link address is ommitted and thus link is not functioning
well. So I added a link definition to the vectors.md.

r? @steveklabnik
2015-04-26 01:37:58 +00:00
Robin Kruppe
0ea193def9 Reference audit: comments and whitespace sections 2015-04-26 02:02:13 +02:00
bors
da623844a9 Auto merge of #24718 - tamird:fix-quote-tests, r=alexcrichton
Sniped from @rprichard's work in #24537. r? @alexcrichton
2015-04-25 23:40:10 +00:00
Johannes Oertel
6f7b5b1910 Add regression test for #22673. 2015-04-26 01:31:45 +02:00
Johannes Oertel
d30a3aac04 Add regression test for #23253. 2015-04-26 00:52:19 +02:00
bors
00c48d3779 Auto merge of #24547 - bombless:comma, r=pnkfelix
Closes #20616 
It breaks code such as <c64feb6341/src/librustc_typeck/check/method/suggest.rs (L367)>, so this is a [breaking-change], you have to add missing comma after the last lifetime arguement now.
2015-04-25 21:44:50 +00:00
Tamir Duberstein
beb373b317 qquote-2.rs -> run-fail/qquote.rs
Re-enables the test.
2015-04-25 14:40:52 -07:00
Tamir Duberstein
00cb5c40a2 qquote-1.rs -> compile-fail-fulldeps/qquote.rs
Re-enables the test.
2015-04-25 14:40:51 -07:00
Tamir Duberstein
597efd6cec Re-enable test 2015-04-25 14:14:31 -07:00
Tamir Duberstein
8ab8619d20 Unrot and re-enable run-pass-fulldeps/qquote.rs 2015-04-25 14:14:31 -07:00
Robin Kruppe
85ee89ae70 Redo PR #24811 properly
Transplant the grammar-related changes to grammar.md,
and remove all grammar talk from reference.md
2015-04-25 22:56:00 +02:00
bors
0d8309ec0b Auto merge of #24813 - Manishearth:rollup, r=Manishearth
- Successful merges: #24649, #24806, #24809, #24811
- Manual merges: #24812
2015-04-25 17:06:48 +00:00
Heejong Ahn
9a2a06cf43 Added a link address to Vectors page of the book
At https://doc.rust-lang.org/book/vectors.html, there should be a link to
Generics page but the link address is ommitted and thus link is not functioning
well. So I added a link definition to the vectors.md.

r? @steveklabnik
2015-04-26 02:04:38 +09:00
Manish Goregaokar
3e67b6bb6c add import (fixup #24649) 2015-04-25 22:33:19 +05:30
Manish Goregaokar
9316b0382b Rollup merge of #24812 - jest:master, r=steveklabnik
Conflicts:
	src/doc/trpl/variable-bindings.md
2015-04-25 21:22:03 +05:30
Manish Goregaokar
007c81b83d Rollup merge of #24811 - rkruppe:reference-audit, r=steveklabnik
Mention `non_ascii_idents` feature gate and remove unused productions.

r? @steveklabnik
2015-04-25 21:18:47 +05:30
Manish Goregaokar
23782ad9a8 Rollup merge of #24809 - conradkleinespel:master, r=Manishearth
The reference has broken links. This should fix it.
2015-04-25 21:18:47 +05:30
Manish Goregaokar
cfe08b74bf Rollup merge of #24806 - FuGangqiang:doc, r=Manishearth 2015-04-25 21:18:47 +05:30
Manish Goregaokar
4f1bbc209f Rollup merge of #24649 - nham:path_new_examples, r=steveklabnik 2015-04-25 21:18:47 +05:30
Przemysław Wesołek
2c2abe9a75 A number of spell-checking corrections. 2015-04-25 16:48:44 +02:00
bors
83263b48c3 Auto merge of #24803 - SkylerLipthay:patch-2, r=huonw
The description of the syntax for single byte literals is missing the preceding `b` distinction.
2015-04-25 13:10:33 +00:00
Robin Kruppe
702f17566c Audit reference manual: 3.2 Special unicode productions
Mention non_ascii_idents feature gate and remove unused productions
2015-04-25 14:38:23 +02:00
Luqman Aden
34601afd57 librustc_trans: Don't ICE on unsized type behind raw pointer in nullable pointer opt. 2015-04-25 07:47:45 -04:00
Conrad Kleinespel
b66f858e8f fix compiler plugins path in doc/reference.md 2015-04-25 13:43:26 +02:00
bors
e3d00a4980 Auto merge of #24783 - jooert:unittestguidelines, r=alexcrichton
Changes the style guidelines regarding unit tests to recommend using a sub-module named "tests" instead of "test" for unit tests as "test" might clash with imports of libtest (see #23870, #24030 and http://users.rust-lang.org/t/guidelines-naming-of-unit-test-module/1078 for previous discussions).

r? @alexcrichton
2015-04-25 09:55:06 +00:00
FuGangqiang
46462c7b5f fix doc 2015-04-25 16:30:25 +08:00
Skyler
b6dd0197f3 Reference manual 3.5.2.3.1
The description of the syntax for single byte literals is missing the preceding `b` distinction.
2015-04-24 23:26:56 -07:00
bors
54d65092a4 Auto merge of #24724 - alexcrichton:symlink-stable, r=aturon
These functions were intended to be introduced as `#[stable]` as a stable API
was deprecated in favor of them, but they just erroneously forgot the stability
attributes.
2015-04-25 05:43:39 +00:00
bors
a40261ac91 Auto merge of #24798 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #24662, #24722, #24725, #24729, #24736, #24749, #24751, #24766, #24769, #24772, #24775, #24790
- Failed merges: #24760
2015-04-25 03:43:31 +00:00
York Xiang
0ad48e41c1 Fix #20616 2015-04-25 11:29:28 +08:00
Michael Rosenberg
23b1d172a8 More small syntax changes in reference.md 2015-04-24 22:56:32 -04:00
Steve Klabnik
4fae8fb61e Rollup merge of #24790 - jooert:fix24774, r=steveklabnik
Fixes #24774.

r? @steveklabnik
2015-04-24 22:54:27 -04:00
Steve Klabnik
c7279b4214 Rollup merge of #24775 - mbrubeck:reference, r=steveklabnik
Update 7.2.20 (`for` expressions):

* `for` loops now use `IntoIterator` instead of just `Iterator`
* Simplify the example by removing unnecessary `Vec::iter` call.

...and a fix for a minor formatting error.

r? @steveklabnik
2015-04-24 22:54:27 -04:00
Steve Klabnik
5e38691ba6 Rollup merge of #24772 - steveklabnik:gh24712, r=alexcrichton
FIxes #24712
2015-04-24 22:54:26 -04:00
Steve Klabnik
a7413ffe19 Rollup merge of #24769 - SkylerLipthay:patch-1, r=steveklabnik
`is` and `us` suffixes are deprecated in favor of `isize` and `usize`.
2015-04-24 22:54:26 -04:00
Steve Klabnik
120065e7f2 Rollup merge of #24766 - nwin:patch-1, r=steveklabnik
Changed in #22838.

audited (raw) byte string literals @ #16676
2015-04-24 22:54:26 -04:00
Steve Klabnik
142acce5b1 Rollup merge of #24751 - lstat:feature-gate-22820-dups, r=brson
As part of the audit for #22820 the following duplicate feature
gate tests were removed:

* `box_patterns`
* `simd_ffi`

These tests for `box_patterns` and `simd_ffi` were added in #23578,
however there were existing tests in #20723 and #21233 respectively.

r? @nrc
2015-04-24 22:54:25 -04:00
Steve Klabnik
13854722fa Rollup merge of #24749 - lstat:feature-gate-22820, r=nrc
As part of the audit for #22820 the following feature gate tests have been
added:

* `negate_unsigned`
* `on_unimplemented`
* `optin_builtin_traits`
* `plugin`
* `rustc_attrs`
* `rustc_diagnostic_macros`
* `slice_patterns`

In addition some feature gate error message typos fixed.
2015-04-24 22:54:25 -04:00
Steve Klabnik
c632bdc67a Rollup merge of #24736 - steveklabnik:doc_mutability, r=alexcrichton
Okay, last chapter other than ownership stuff. 🎊
2015-04-24 22:54:25 -04:00
Steve Klabnik
3c6c16e00f Rollup merge of #24729 - mdinger:reference_grammar, r=steveklabnik
From https://github.com/rust-lang/rust/issues/24723#issuecomment-95636827 :

> Yes, I've been meaning to just remove it in favor of GRAMMAR.md
> - steveklabnik
2015-04-24 22:54:25 -04:00