about summary refs log tree commit diff
path: root/src/libsyntax/ext/tt
AgeCommit message (Collapse)AuthorLines
2015-02-20Remove remaining uses of `[]`. This time I tried to use deref coercions ↵Niko Matsakis-1/+1
where possible.
2015-02-18Round 3 test fixes and conflictsAlex Crichton-7/+7
2015-02-18rollup merge of #22502: nikomatsakis/deprecate-bracket-bracketAlex Crichton-10/+10
Conflicts: src/libcollections/slice.rs src/libcollections/str.rs src/librustc/middle/lang_items.rs src/librustc_back/rpath.rs src/librustc_typeck/check/regionck.rs src/libstd/ffi/os_str.rs src/libsyntax/diagnostic.rs src/libsyntax/parse/parser.rs src/libsyntax/util/interner.rs src/test/run-pass/regions-refcell.rs
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-10/+10
2015-02-18rollup merge of #22497: nikomatsakis/suffixesAlex Crichton-1/+1
Conflicts: src/librustc_trans/trans/tvec.rs
2015-02-18Remove `i`, `is`, `u`, or `us` suffixes that are not necessary.Niko Matsakis-1/+1
2015-02-18Opt for .cloned() over .map(|x| x.clone()) etc.Kevin Butler-2/+2
2015-02-13Parse `pub` in the expansion of a method macroKeegan McAllister-2/+1
Fixes #17436.
2015-02-06Update to last version, remove "[]" as much as possibleGuillaumeGomez-2/+2
2015-02-06Libsyntax has been updatedGuillaumeGomez-3/+2
2015-02-06Replace the get method by the deref one on InternedStringGuillaumeGomez-3/+4
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-9/+9
2015-02-02rollup merge of #21830: japaric/for-cleanupAlex Crichton-5/+5
Conflicts: src/librustc/metadata/filesearch.rs src/librustc_back/target/mod.rs src/libstd/os.rs src/libstd/sys/windows/os.rs src/libsyntax/ext/tt/macro_parser.rs src/libsyntax/print/pprust.rs src/test/compile-fail/issue-2149.rs
2015-02-02`for x in xs.iter_mut()` -> `for x in &mut xs`Jorge Aparicio-1/+1
Also `for x in option.iter_mut()` -> `if let Some(ref mut x) = option`
2015-02-02`for x in xs.iter()` -> `for x in &xs`Jorge Aparicio-4/+4
2015-02-02Omit integer suffix when unnecessaryAlfie John-18/+18
See PR # 21378 for context
2015-01-29convert remaining `range(a, b)` to `a..b`Jorge Aparicio-1/+1
2015-01-29`for x in range(a, b)` -> `for x in a..b`Jorge Aparicio-3/+3
sed -i 's/in range(\([^,]*\), *\([^()]*\))/in \1\.\.\2/g' **/*.rs
2015-01-29`range(a, b).foo()` -> `(a..b).foo()`Jorge Aparicio-1/+1
sed -i 's/ range(\([^,]*\), *\([^()]*\))\./ (\1\.\.\2)\./g' **/*.rs
2015-01-23Rephrase error message on invalid fragment specifiers in macros.Alexander Korolkov-6/+10
Also, print help on valid fragment specifiers.
2015-01-21rollup merge of #21429: GuillaumeGomez/macro-fixAlex Crichton-53/+54
This is little clean code of this PR: #21366. I patched the same thing as aochagavia but too slowly obviously. This is a merge of our two codes, more "rust-like".
2015-01-21rollup merge of #21340: pshc/libsyntax-no-more-intsAlex Crichton-31/+31
Collaboration with @rylev! I didn't change `int` in the [quasi-quoter](https://github.com/pshc/rust/blob/99ae1a30f3ca28c0f7e431620560d30e44627124/src/libsyntax/ext/quote.rs#L328), because I'm not sure if there will be adverse effects. Addresses #21095.
2015-01-19Updates of the fixGuillaumeGomez-43/+43
2015-01-18libsyntax: 0u -> 0us, 0i -> 0isPaul Collier-18/+18
2015-01-18Fix #21356Adolfo Ochagavía-14/+15
2015-01-18syntax: allow bare sequences in lhs for follow checkingCorey Richardson-10/+13
Closes #21350
2015-01-17libsyntax: uint types to usizePaul Collier-13/+13
2015-01-07use slicing sugarJorge Aparicio-20/+20
2015-01-06Test fixes and rebase conflictsAlex Crichton-14/+19
2015-01-06rollup merge of #20563: cmr/macro-input-future-proofingAlex Crichton-8/+185
2015-01-06Minor fallout/update FOLLOW setsCorey Richardson-2/+2
2015-01-06rollup merge of #19430: pczarn/interp_tt-cleanupAlex Crichton-26/+44
Conflicts: src/libsyntax/parse/parser.rs
2015-01-06rollup merge of #20653: alexcrichton/entry-unstableAlex Crichton-1/+1
There's been some debate over the precise form that these APIs should take, and they've undergone some changes recently, so these APIs are going to be left unstable for now to be fleshed out during the next release cycle.
2015-01-07Cleanup and followup to PR #17830: parsing changesPiotr Czarnecki-26/+44
Prevents breaking down `$name` tokens into separate `$` and `name`. Reports unknown macro variables. Fixes #18775 Fixes #18839 Fixes #15640
2015-01-06rollup merge of #20481: seanmonstar/fmt-show-stringAlex Crichton-2/+2
Conflicts: src/compiletest/runtest.rs src/libcore/fmt/mod.rs src/libfmt_macros/lib.rs src/libregex/parse.rs src/librustc/middle/cfg/construct.rs src/librustc/middle/dataflow.rs src/librustc/middle/infer/higher_ranked/mod.rs src/librustc/middle/ty.rs src/librustc_back/archive.rs src/librustc_borrowck/borrowck/fragments.rs src/librustc_borrowck/borrowck/gather_loans/mod.rs src/librustc_resolve/lib.rs src/librustc_trans/back/link.rs src/librustc_trans/save/mod.rs src/librustc_trans/trans/base.rs src/librustc_trans/trans/callee.rs src/librustc_trans/trans/common.rs src/librustc_trans/trans/consts.rs src/librustc_trans/trans/controlflow.rs src/librustc_trans/trans/debuginfo.rs src/librustc_trans/trans/expr.rs src/librustc_trans/trans/monomorphize.rs src/librustc_typeck/astconv.rs src/librustc_typeck/check/method/mod.rs src/librustc_typeck/check/mod.rs src/librustc_typeck/check/regionck.rs src/librustc_typeck/collect.rs src/libsyntax/ext/format.rs src/libsyntax/ext/source_util.rs src/libsyntax/ext/tt/transcribe.rs src/libsyntax/parse/mod.rs src/libsyntax/parse/token.rs src/test/run-pass/issue-8898.rs
2015-01-07falloutNick Cameron-1/+1
2015-01-06Stricter rules surrounding adjacent nonterminals and sequencesCorey Richardson-29/+74
2015-01-06core: split into fmt::Show and fmt::StringSean McArthur-2/+2
fmt::Show is for debugging, and can and should be implemented for all public types. This trait is used with `{:?}` syntax. There still exists #[derive(Show)]. fmt::String is for types that faithfully be represented as a String. Because of this, there is no way to derive fmt::String, all implementations must be purposeful. It is used by the default format syntax, `{}`. This will break most instances of `{}`, since that now requires the type to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the correct fix. Types that were being printed specifically for users should receive a fmt::String implementation to fix this. Part of #20013 [breaking-change]
2015-01-07Replace full slice notation with index callsNick Cameron-21/+21
2015-01-06[breaking change] Revert Entry behaviour to take keys by value.Dylan Ede-1/+1
2015-01-06syntax: implement 'macro input future proofing'Corey Richardson-8/+140
See RFC 550 (https://github.com/rust-lang/rfcs/pull/550) for the motivation and details. If this breaks your code, add one of the listed tokens after the relevant non-terminal in your matcher. [breaking-change]
2015-01-05Modernize macro_rules! invocationsKeegan McAllister-2/+2
macro_rules! is like an item that defines a macro. Other items don't have a trailing semicolon, or use a paren-delimited body. If there's an argument for matching the invocation syntax, e.g. parentheses for an expr macro, then I think that applies more strongly to the *inner* delimiters on the LHS, wrapping the individual argument patterns.
2015-01-05Move #[macro_reexport] to extern crateKeegan McAllister-41/+0
2015-01-05Reformat metadata for exported macrosKeegan McAllister-19/+10
Instead of copy-pasting the whole macro_rules! item from the original .rs file, we serialize a separate name, attributes list, and body, the latter as pretty-printed TTs. The compilation of macro_rules! macros is decoupled somewhat from the expansion of macros in item position. This filters out comments, and facilitates selective imports.
2015-01-05Implement macro re-exportKeegan McAllister-0/+41
Fixes #17103.
2015-01-05Add a special macro nonterminal $crateKeegan McAllister-1/+36
2015-01-05Replace LetSyntaxTT with MacroRulesTTKeegan McAllister-16/+5
The implementation of LetSyntaxTT was specialized to macro_rules! in various ways. This gets rid of the false generality and simplifies the code.
2015-01-04[breaking change] Update entry API as part of RFC 509.Ben Foppa-2/+2
2015-01-03sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rsJorge Aparicio-6/+6
2015-01-03use assoc types in binop traitsJorge Aparicio-1/+3