| Age | Commit message (Collapse) | Author | Lines |
|
Previous borrow() is enough to make borrow_mut() panic, no need to have borrow_mut() twice. [This](http://is.gd/woKKAW)
|
|
|
|
r? @alexcrichton
|
|
Fixes #23433.
|
|
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.
|
|
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).**
|
|
Instead create an ExtCtxt structure.
|
|
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
|
|
Such things no longer exist.
|
|
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.
|
|
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
|
|
|
|
Sniped from @rprichard's work in #24537. r? @alexcrichton
|
|
|
|
|
|
Closes #20616
It breaks code such as <https://github.com/rust-lang/rust/blob/c64feb63418fd05bd6e5adc6f9ad763aa6a594b1/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.
|
|
Re-enables the test.
|
|
Re-enables the test.
|
|
|
|
|
|
Transplant the grammar-related changes to grammar.md,
and remove all grammar talk from reference.md
|
|
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
|
|
|
|
Conflicts:
src/doc/trpl/variable-bindings.md
|
|
Mention `non_ascii_idents` feature gate and remove unused productions.
r? @steveklabnik
|
|
The reference has broken links. This should fix it.
|
|
|
|
|
|
|
|
The description of the syntax for single byte literals is missing the preceding `b` distinction.
|
|
Mention non_ascii_idents feature gate and remove unused productions
|
|
pointer opt.
|
|
|
|
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
|
|
|
|
The description of the syntax for single byte literals is missing the preceding `b` distinction.
|
|
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.
|
|
|
|
|
|
Fixes #24774.
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
|
|
FIxes #24712
|
|
Changed in #22838.
audited (raw) byte string literals @ #16676
|
|
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
|
|
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.
|
|
Okay, last chapter other than ownership stuff. :confetti_ball:
|
|
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
|
|
r=alexcrichton
I forgot these heavily use associated types, so move it after that
as well.
|
|
r? @alexcrichton
|
|
Fixes #24656
r? @pnkfelix
I just added the examples, but if the wording needs expanded too, let me know what you think should be added :)
|