| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Following RFC 1462 (amending 550). Closes #31135.
|
|
See RFC amendment 1384:
https://github.com/rust-lang/rfcs/pull/1384
|
|
See RFC amendment 1384 and tracking issue 30450:
https://github.com/rust-lang/rfcs/pull/1384
https://github.com/rust-lang/rust/issues/30450
Moved old check_matcher code into check_matcher_old
combined the two checks to enable a warning cycle (where we will
continue to error if the two checks agree to reject, accept if the new
check says accept, and warn if the old check accepts but the new check
rejects).
|
|
The motivation (other than removing boilerplate) is that this is a baby step towards a parser with error recovery.
[breaking-change] if you use any of the changed functions, you'll need to remove a try! or panictry!
|
|
|
|
[breaking-change] if you use any of the changed functions, you'll need to remove a try! or panictry!
|
|
|
|
Should make it possible to add JSON or HTML errors. Also tidies up a lot.
|
|
|
|
Also split out emitters into their own module.
|
|
|
|
|
|
Fixes #22425
Also fixes #30007, since it's just a change from `true` to `false`.
|
|
|
|
|
|
Fixes #22425
Also fixes #30007, since it's just a change from `true` to `false`.
|
|
|
|
Fix #27409.
|
|
|
|
|
|
|
|
Just `sed s/_nopanic//g`. Hopefully makes libsyntax a bit more
readable.
|
|
Just `sed s/_nopanic//g`. Hopefully makes libsyntax a bit more
readable.
|
|
|
|
[breaking change]
|
|
|
|
|
|
|
|
|
|
Make sure Name, SyntaxContext and Ident are passed by value
Make sure Idents don't serve as keys (or parts of keys) in maps, Ident comparison is not well defined
|
|
And some small indentation/code style fixes in the macro parser.
|
|
|
|
|
|
|
|
The ideas is to use the span of the complete macro invocation if the span of a
macro error is `DUMMY_SP`.
fixes #7970
|
|
Reapplied the changes from https://github.com/freebroccolo/rust/commit/7aafe24139abc2d1f302bbb166bcaa006f12cf4d
to a clean branch of master
|
|
|
|
|
|
This commit expands the follow set of the `ty` and `path` macro fragments to
include the semicolon token as well. A semicolon is already allowed after these
tokens, so it's currently a little too restrictive to not have a semicolon
allowed. For example:
extern {
fn foo() -> i32; // semicolon after type
}
fn main() {
struct Foo;
Foo; // semicolon after path
}
|
|
This commit expands the follow set of the `ty` and `path` macro fragments to
include the semicolon token as well. A semicolon is already allowed after these
tokens, so it's currently a little too restrictive to not have a semicolon
allowed. For example:
extern {
fn foo() -> i32; // semicolon after type
}
fn main() {
struct Foo;
Foo; // semicolon after path
}
|
|
|
|
Needed to support:
match X {
pattern if Y ...
}
for pattern in Y {}
|
|
sequences.
Fixes #25436.
|
|
|
|
|
|
`s/([^\(\s]+\.)len\(\) [(?:!=)>] 0/!$1is_empty()/g`
|
|
`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`
|
|
Statement macros are now treated somewhat like item macros, in that a statement macro can now expand into a series of statements, rather than just a single statement.
This allows statement macros to be nested inside other kinds of macros and expand properly, where previously the expansion would only work when no nesting was present.
See:
- `src/test/run-pass/macro-stmt_macro_in_expr_macro.rs`
- `src/test/run-pass/macro-nested_stmt_macro.rs`
This changes the interface of the MacResult trait. make_stmt has become make_stmts and now returns a vector, rather than a single item. Plugin writers who were implementing MacResult will have breakage, as well as anyone using MacEager::stmt.
See:
- `src/libsyntax/ext/base.rs`
This also causes a minor difference in behavior to the diagnostics produced by certain malformed macros.
See:
- `src/test/compile-fail/macro-incomplete-parse.rs`
|
|
Statement macros are now treated somewhat like item macros, in that a
statement macro can now expand into a series of statements, rather than
just a single statement.
This allows statement macros to be nested inside other kinds of macros and
expand properly, where previously the expansion would only work when no
nesting was present.
See: src/test/run-pass/macro-stmt_macro_in_expr_macro.rs
src/test/run-pass/macro-nested_stmt_macro.rs
This changes the interface of the MacResult trait. make_stmt has become
make_stmts and now returns a vector, rather than a single item. Plugin
writers who were implementing MacResult will have breakage, as well as
anyone using MacEager::stmt.
See: src/libsyntax/ext/base.rs
This also causes a minor difference in behavior to the diagnostics
produced by certain malformed macros.
See: src/test/compile-fail/macro-incomplete-parse.rs
|