about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2018-12-01resolve: Support aliasing local crate root in extern preludeVadim Petrochenkov-1/+8
2018-11-30Use appropriate terminology based on heuristicEsteban Küber-13/+24
2018-11-30Removed feature gate.Alexander Regueiro-6/+5
2018-11-30Suggest an appropriate token when encountering `pub Ident<'a>`Esteban Küber-11/+28
2018-12-01Rollup merge of #56365 - alexreg:stabilise-self_struct_ctor, r=Centrilkennytm-4/+3
Stabilize self_struct_ctor feature. [**Tracking Issue**](https://github.com/rust-lang/rust/issues/51994)
2018-12-01Rollup merge of #56336 - nnethercote:clean-up-pp, r=nikomatsakiskennytm-201/+216
Clean up and streamline the pretty-printer Some minor improvements.
2018-12-01Rollup merge of #56268 - nnethercote:fold_opt_expr-recycle, r=petrochenkovkennytm-39/+73
Reuse the `P` in `InvocationCollector::fold_{,opt_}expr`. This requires adding a new method, `P::filter_map`. This commit reduces instruction counts for various benchmarks by up to 0.7%.
2018-11-30Removed feature gate.Alexander Regueiro-4/+3
2018-11-30Add precise_pointer_size_matching featurevarkor-0/+2
2018-11-30Stabilise exhaustive_integer_patternsvarkor-2/+2
2018-11-30proc_macro: introduce a "bridge" between clients (proc macros) and servers ↵Eduard-Mihai Burtescu-2/+2
(compiler front-ends).
2018-11-29Rollup merge of #56330 - estebank:cleanup-span, r=zackmdavisGuillaume Gomez-2/+2
Clean up span in non-trailing `..` suggestion
2018-11-29Rollup merge of #56257 - mark-i-m:rustc-guide-links, r=nikomatsakisGuillaume Gomez-2/+2
rustc-guide has moved to rust-lang/ r? @nikomatsakis
2018-11-29Rollup merge of #56255 - jasonl:update-old-documents, r=michaelwoeristerGuillaume Gomez-3/+2
Update outdated code comments in StringReader For the detection of newlines in the lexer, this is now done in `analyze_source_file.rs`.
2018-11-29Rollup merge of #56220 - estebank:suggest-lifetime-move, r=nikomatsakisGuillaume Gomez-8/+45
Suggest appropriate place for lifetime when declared after type arguments
2018-11-29Split up `pretty_print` and `print`.Nicholas Nethercote-150/+152
`pretty_print` takes a `Token` and `match`es on it. But the particular `Token` kind is known at each call site, so this commit splits it into five functions: `pretty_print_eof`, `pretty_print_begin`, etc. This commit also does likewise with `print`, though there is one callsite for `print` where the `Token` kind isn't known, so a generic `print` has to stay (but it now just calls out to the various `print_*` functions).
2018-11-29Use `Cow` in `Token::String`.Nicholas Nethercote-57/+63
`Printer::word` takes a `&str` and converts it into a `String`, which causes an allocation. But that allocation is rarely necessary, because `&str` is almost always a `&'static str` or a `String` that won't be used again. This commit changes `Token::String` so it holds a `Cow<'static, str>` instead of a `String`, which avoids a lot of allocations.
2018-11-29Remove `huge_word` and `zero_word`.Nicholas Nethercote-9/+16
They are unused. The commit also adds some blank lines between some methods.
2018-11-29Fix whitespace in `pp.rs`.Nicholas Nethercote-126/+126
This commit converts some 2-space indents to 4-space indents.
2018-11-28Clean up span in non-trailing `..` suggestionEsteban Küber-2/+2
2018-11-27remove uses of feature gateMark Mansi-1/+0
2018-11-27remove some unused varsMark Mansi-6/+6
2018-11-27remove feature gateMark Mansi-42/+7
2018-11-27move feature gate to acceptedMark Mansi-3/+2
2018-11-27Auto merge of #55402 - estebank:macro-eof-2, r=nikomatsakisbors-14/+54
Point at end of macro arm when encountering EOF Fix #52866.
2018-11-26Specify suggestion applicabilityEsteban Küber-1/+2
2018-11-27resolve: Implement edition hygiene for imports and absolute pathsVadim Petrochenkov-16/+13
Use per-span hygiene in a few other places in resolve Prefer `rust_2015`/`rust_2018` helpers to comparing editions
2018-11-26rustc-guide has movedMark Mansi-2/+2
2018-11-26Update outdated code comments in StringReaderJason Langenauer-3/+2
2018-11-26Emit one diagnostic for multiple misplaced lifetimesEsteban Küber-12/+19
2018-11-25Move lifetimes before the *first* type argumentEsteban Küber-1/+3
2018-11-25Suggest appropriate place for lifetime when declared after type argumentsEsteban Küber-8/+35
2018-11-25Rollup merge of #56072 - da-x:stabilize-literal-matcher, r=petrochenkovPietro Albini-24/+15
Stabilize macro_literal_matcher This followed FCP in #35625. Closes #35625
2018-11-23Reword EOF in macro arm messageEsteban Küber-1/+4
2018-11-23Keep label on moved spans and point at macro invocation on parse errorEsteban Küber-8/+12
2018-11-23Point at macro arm when it doesn't expand to an expressionEsteban Küber-3/+7
2018-11-23Reword incorrect macro invocation primary labelEsteban Küber-8/+20
2018-11-23Add label when replacing primary DUMMY_SP in macro expansionEsteban Küber-0/+1
2018-11-23Point at end of macro arm when encountering EOFEsteban Küber-2/+18
Fix #52866
2018-11-22Rollup merge of #56002 - Axary:master, r=estebankGuillaume Gomez-2/+13
fix #55972: Erroneous self arguments on bare functions emit subpar compilation error #55972 r? @estebank
2018-11-21macro_literal_matcher: fixes per petrochenkov's reviewDan Aloni-3/+3
2018-11-21Stabilize macro_literal_matcherDan Aloni-24/+15
2018-11-21Stabilize `extern_crate_item_prelude`Vadim Petrochenkov-3/+2
2018-11-20improve error noteAxary-1/+1
2018-11-20Reuse the `P` in `InvocationCollector::fold_{,opt_}expr`.Nicholas Nethercote-39/+73
This requires adding a new method, `P::filter_map`. This commit reduces instruction counts for various benchmarks by up to 0.7%.
2018-11-20Auto merge of #55983 - oli-obk:static_, r=Mark-Simulacrumbors-0/+1
Fix stability hole with `static _` The `underscore_const_names` only gated const items with `_` as the name. `static _: () = ();` works on beta without feature gates right now, this PR fixes that.
2018-11-19Auto merge of #55971 - SergioBenitez:skip-non-semantic, r=alexcrichtonbors-6/+29
Ignore non-semantic tokens for 'probably_eq' streams. Improves the situation in #43081 by skipping typically non-semantic tokens when checking for 'probably_eq'. r? @alexcrichton
2018-11-19Auto merge of #56051 - pietroalbini:rollup, r=pietroalbinibors-15/+1
Rollup of 25 pull requests Successful merges: - #55562 (Add powerpc- and powerpc64-unknown-linux-musl targets) - #55564 (test/linkage-visibility: Ignore on musl targets) - #55827 (A few tweaks to iterations/collecting) - #55834 (Forward the ABI of the non-zero sized fields of an union if they have the same ABI) - #55857 (remove unused dependency) - #55862 (in which the E0618 "expected function" diagnostic gets a makeover) - #55867 (do not panic just because cargo failed) - #55894 (miri enum discriminant handling: Fix treatment of pointers, better error when it is undef) - #55916 (Make miri value visitor useful for mutation) - #55919 (core/tests/num: Simplify `test_int_from_str_overflow()` test code) - #55923 (reword #[test] attribute error on fn items) - #55949 (ty: return impl Iterator from Predicate::walk_tys) - #55952 (Update to Clang 7 on CI.) - #55953 (#53488 Refactoring UpvarId) - #55962 (rustdoc: properly calculate spans for intra-doc link resolution errors) - #55963 (Stress test for MPSC) - #55968 (Clean up some non-mod-rs stuff.) - #55970 (Miri backtrace improvements) - #56007 (CTFE: dynamically make sure we do not call non-const-fn) - #56011 (Replace data.clone() by Arc::clone(&data) in mutex doc.) - #56012 (avoid shared ref in UnsafeCell::get) - #56016 (Add VecDeque::resize_with) - #56027 (docs: Add missing backtick in object_safety.rs docs) - #56043 (remove "approx env bounds" if we already know from trait) - #56059 (Increase `Duration` approximate equal threshold to 1us)
2018-11-19Rollup merge of #55968 - ehuss:non-mod-rs-tests, r=petrochenkovPietro Albini-15/+1
Clean up some non-mod-rs stuff. This includes the following: - Remove unused `non_modrs_mods` from `ParseSess` which as only used for feature gate diagnostics. - Remove the vestiges of the feature gate tests in `test/ui`, they were only partially removed during stabilization. - Fix the run-pass test, it was accidentally removed during stabilization. - Add a ui test to verify error behavior for missing inline-nested mods. - Add some tests for `#[path]` for inline-nested mods (both mod and non-mod-rs). - Enable the diagnostic tests on windows, they should be fixed by #49478. cc @cramertj
2018-11-18resolve: Check resolution consistency for import paths and multi-segment ↵Vadim Petrochenkov-0/+7
macro paths