about summary refs log tree commit diff
path: root/src/libsyntax_ext
AgeCommit message (Collapse)AuthorLines
2018-11-30proc_macro: move the rustc server to syntax_ext.Eduard-Mihai Burtescu-3/+758
2018-11-30proc_macro: remove the __internal module.Eduard-Mihai Burtescu-19/+9
2018-11-30proc_macro: introduce a "bridge" between clients (proc macros) and servers ↵Eduard-Mihai Burtescu-129/+124
(compiler front-ends).
2018-11-18Rollup merge of #55923 - Zeegomo:master, r=estebankPietro Albini-1/+1
reword #[test] attribute error on fn items fix of [#55787](https://github.com/rust-lang/rust/issues/55787) Reworded error message from "#[test] attribute is only allowed on fn items" to "#[test] attribute is only allowed on non associated functions"
2018-11-18Rollup merge of #55827 - ljedrz:various_stashed, r=alexcrichtonPietro Albini-10/+8
A few tweaks to iterations/collecting - simplify and speed up `dot::GraphWalk::nodes` for `cfg::CFG` - `reserve` the capacity for `edges` in `DepGraph::query` - collect directly to a `HirVec` in `LoweringContext::lower_attrs` - fix overallocation in `OnDiskCache::serialize` - preallocate the `new_partitioning` vector in `merge_codegen_units` - simplify `impl FromHex for str` - improve the creation of `self_arg_names` in `impl MethodDef`
2018-11-13fix various typos in doc commentsAndy Russell-1/+1
2018-11-13A few tweaks to iterations/collectingljedrz-10/+8
2018-11-11reword #[test] attribute error on fn itemsgiacomo-1/+1
2018-10-31syntax: improve a few allocationsljedrz-1/+1
2018-10-26Auto merge of #54929 - csmoe:cfg_lint, r=petrochenkovbors-5/+5
Suggest to remove prefix `b` in cfg attribute lint string Closes #54926 r? @estebank
2018-10-26Remove redundant cloneShotaro Yamada-2/+2
2018-10-20handle errors based on parse_sesscsmoe-5/+5
2018-10-05expansion: Remove restriction on use of macro attributes with test/benchVadim Petrochenkov-7/+1
The restrictions were introduced in https://github.com/rust-lang/rust/pull/54277 and no longer necessary now because legacy plugins are now expanded in usual left-to-right order
2018-09-27Bump to 1.31.0 and bootstrap from 1.30 betaJosh Stone-1/+1
2018-09-20Auto merge of #54241 - vi:suggest_with_applicability, r=estebankbors-1/+2
Remove usages of span_suggestion without Applicability Use `Applicability::Unspecified` for all of them instead. Shall deprecations for the non-`_with_applicability` functions be added? Shall clippy be addressed somehow? r? @estebank
2018-09-17Whitespace fix again.Vitaly _Vi Shukela-3/+3
2018-09-17Fill in suggestions Applicability according to @estebankVitaly _Vi Shukela-3/+3
Also fix some formatting along the way.
2018-09-16Attach Applicability to multipart_suggestion and span_suggestionsVitaly _Vi Shukela-1/+2
2018-09-16Temporarily prohibit proc macro attributes placed after derivesVadim Petrochenkov-1/+7
... and also proc macro attributes used together with test/bench.
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis
2018-09-10resolve: Remove `unshadowable_attrs`Vadim Petrochenkov-12/+2
2018-09-04Move #[test_case] to a syntax extensionJohn Renner-2/+85
2018-09-04Fix #[test] shadowing in macro_preludeJohn Renner-2/+12
2018-09-04Introduce Custom Test FrameworksJohn Renner-2/+337
2018-08-28Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.Eduard-Mihai Burtescu-8/+8
2018-08-24check that adding infer-outlives requirement to all crates worksNiko Matsakis-0/+1
2018-08-23Use optimized SmallVec implementationIgor Gutorov-5/+6
2018-08-22Rollup merge of #53504 - ekse:suggestions-applicability-2, r=estebankGuillaume Gomez-1/+3
Set applicability for more suggestions. Converts a couple more calls to `span_suggestion_with_applicability` (#50723). To be on the safe side, I marked suggestions that depend on the intent of the user or that are potentially lossy conversions as MaybeIncorrect. r? @estebank
2018-08-21Rollup merge of #53496 - matthiaskrgr:codespell_08_2018, r=varkorkennytm-1/+1
Fix typos found by codespell.
2018-08-20Set applicability for more suggestions.Sébastien Duquette-1/+3
2018-08-19mv codemap() source_map()Donato Sciarra-1/+1
2018-08-19mv (mod) codemap source_mapDonato Sciarra-8/+8
2018-08-19Fix typos found by codespell.Matthias Krüger-1/+1
2018-08-16syntax_ext: remove leftover span_err_if_not_stage0 macro.Eduard-Mihai Burtescu-13/+2
2018-08-13Move SmallVec and ThinVec out of libsyntaxljedrz-7/+14
2018-08-12Rollup merge of #53230 - memoryruins:nll_bootstrap_4, r=nikomatsakisGuillaume Gomez-1/+2
[nll] enable feature(nll) on various crates for bootstrap: part 4 #53172 r? @nikomatsakis
2018-08-09[nll] libsyntax_ext: remove unnecessary mut annotation on variablememoryruins-1/+1
Pointed out by nll. It is correct that the mut annotation is not needed.
2018-08-09[nll] libsyntax_ext: enable feature(nll) for bootstrapmemoryruins-0/+1
2018-08-10Rollup merge of #53215 - ljedrz:refactor_format, r=estebankkennytm-61/+70
Slightly refactor syntax_ext/format expand_preparsed_format_args: - move a potential error `return` earlier in the processing - pre-allocate some of the required space for `cx.pieces` and `cx.str_pieces` - create `cx`-independent objects before `cx` - build `pieces` and `errs` using `collect` instead of a `push` loop describe_num_args: - return `Cow<str>` instead of `String`
2018-08-09Rollup merge of #52773 - ljedrz:unncecessary_patterns, r=nikomatsakiskennytm-1/+1
Avoid unnecessary pattern matching against Option and Result
2018-08-09Use Cow<str> in describe_num_argsljedrz-6/+8
2018-08-09Refactor expand_preparsed_format_argsljedrz-55/+62
2018-08-07Avoid unnecessary pattern matching against Option and Resultljedrz-1/+1
2018-08-06Point at correct span when missing comma in `println`Esteban Küber-1/+1
2018-08-01Rollup merge of #52888 - estebank:shell-sugg, r=oli-obkPietro Albini-34/+46
Use suggestions for shell format arguments Follow up to #52649.
2018-07-31Use suggestions for shell format argumentsEsteban Küber-34/+46
2018-07-29Auto merge of #52738 - ljedrz:push_to_extend, r=eddybbors-22/+19
Replace push loops with extend() where possible Or set the vector capacity where I couldn't do it. According to my [simple benchmark](https://gist.github.com/ljedrz/568e97621b749849684c1da71c27dceb) `extend`ing a vector can be over **10 times** faster than `push`ing to it in a loop: 10 elements (6.1 times faster): ``` test bench_extension ... bench: 75 ns/iter (+/- 23) test bench_push_loop ... bench: 458 ns/iter (+/- 142) ``` 100 elements (11.12 times faster): ``` test bench_extension ... bench: 87 ns/iter (+/- 26) test bench_push_loop ... bench: 968 ns/iter (+/- 3,528) ``` 1000 elements (11.04 times faster): ``` test bench_extension ... bench: 311 ns/iter (+/- 9) test bench_push_loop ... bench: 3,436 ns/iter (+/- 233) ``` Seems like a good idea to use `extend` as much as possible.
2018-07-29Replace push loops with collect() and extend() where possibleljedrz-22/+19
2018-07-29Auto merge of #52767 - ljedrz:avoid_format, r=petrochenkovbors-2/+2
Prefer to_string() to format!() Simple benchmarks suggest in some cases it can be faster by even 37%: ``` test converting_f64_long ... bench: 339 ns/iter (+/- 199) test converting_f64_short ... bench: 136 ns/iter (+/- 34) test converting_i32_long ... bench: 87 ns/iter (+/- 16) test converting_i32_short ... bench: 87 ns/iter (+/- 49) test converting_str ... bench: 54 ns/iter (+/- 15) test formatting_f64_long ... bench: 349 ns/iter (+/- 176) test formatting_f64_short ... bench: 145 ns/iter (+/- 14) test formatting_i32_long ... bench: 98 ns/iter (+/- 14) test formatting_i32_short ... bench: 93 ns/iter (+/- 15) test formatting_str ... bench: 86 ns/iter (+/- 23) ```
2018-07-27Auto merge of #52336 - ishitatsuyuki:dyn-rollup, r=Mark-Simulacrumbors-2/+0
Rollup of bare_trait_objects PRs All deny attributes were moved into bootstrap so they can be disabled with a line of config. Warnings for external tools are allowed and it's up to the tool's maintainer to keep it warnings free. r? @Mark-Simulacrum cc @ljedrz @kennytm