about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2018-09-07stabilize `#[panic_handler]`Jorge Aparicio-5/+2
2018-09-06Validate syntax of `cfg` attributesVadim Petrochenkov-13/+47
2018-09-05Change wording of unclosed delimiter labelEsteban Küber-1/+4
2018-09-05Provide more context for unenclosed delimitersEsteban Küber-13/+64
* When encountering EOF, point at the last opening brace that does not have the same indentation level as its close delimiter. * When encountering the wrong type of close delimiter, point at the likely correct open delimiter to give a better idea of what went wrong.
2018-09-05Reword un-closed delimiter labelEsteban Küber-2/+2
2018-09-04Move #[test_case] to a syntax extensionJohn Renner-65/+17
2018-09-04Fix #[test] shadowing in macro_preludeJohn Renner-2/+3
2018-09-04Introduce Custom Test FrameworksJohn Renner-519/+131
2018-09-04Breaking change upgradesMark Rousskov-2/+2
2018-09-02Replace check() + bump() with eat()Seiichi Uchida-20/+10
2018-09-01Auto merge of #53815 - F001:if-let-guard, r=petrochenkovbors-9/+32
refactor match guard This is the first step to implement RFC 2294: if-let-guard. Tracking issue: https://github.com/rust-lang/rust/issues/51114 The second step should be introducing another variant `IfLet` in the Guard enum. I separated them into 2 PRs for the convenience of reviewers. r? @petrochenkov
2018-09-01Auto merge of #53884 - kennytm:rollup, r=kennytmbors-0/+1
Rollup of 9 pull requests Successful merges: - #53076 (set cfg(rustdoc) when rustdoc is running on a crate) - #53622 (cleanup: Add main functions to some UI tests) - #53769 (Also link Clippy repo in the CONTRIBUTING.md file) - #53774 (Add rust-gdbgui script.) - #53781 (bench: libcore: fix build failure of any.rs benchmark (use "dyn Any")) - #53782 (Make Arc cloning mechanics clearer in module docs) - #53790 (Add regression test for issue #52060) - #53801 (Prevent duplicated impl on foreign types) - #53850 (Nuke the `const_to_allocation` query)
2018-09-01Rollup merge of #53076 - QuietMisdreavus:cfg-rustdoc, r=GuillaumeGomezkennytm-0/+1
set cfg(rustdoc) when rustdoc is running on a crate When using `#[doc(cfg)]` to document platform-specific items, it's a little cumbersome to get all the platforms' items to appear all at once. For example, the standard library adds `--cfg dox` to rustdoc's command line whenever it builds docs, and the documentation for `#![feature(doc_cfg)]` suggests using a Cargo feature to approximate the same thing. This is a little awkward, because you always need to remember to set `--features dox` whenever you build documentation. This PR proposes making rustdoc set `#[cfg(rustdoc)]` whenever it runs on a crate, to provide an officially-sanctioned version of this that is set automatically. This way, there's a standardized way to declare that a certain version of an item is specifically when building docs. To try to prevent the spread of this feature from happening too quickly, this PR also restricts the use of this flag to whenever `#![feature(doc_cfg)]` is active. I'm sure there are other uses for this, but right now i'm tying it to this feature. (If it makes more sense to give this its own feature, i can easily do that.)
2018-08-31feature(doc_cfg): set cfg(rustdoc) when rustdoc is runningQuietMisdreavus-0/+1
2018-08-31Implement the `min_const_fn` feature gateOliver Schneider-23/+34
2018-08-30Rollup merge of #53702 - jkozlowski:correct_version_for_macro_vis_matcher, ↵Pietro Albini-1/+1
r=cramertj Fix stabilisation version for macro_vis_matcher. r? @cramertj
2018-08-30Rollup merge of #53655 - jcpst:with_applicability, r=estebankPietro Albini-2/+12
set applicability Update a few more calls as described in #50723 r? @estebank
2018-08-30Rollup merge of #53472 - eddyb:fx-pls, r=pnkfelixPietro Albini-33/+33
Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc. Most of the compiler uses the `Fx` hasher but some places ended up with the default one.
2018-08-30Made std::intrinsics::transmute() const fn.thedarkula-0/+3
2018-08-30introduce Guard enumF001-9/+32
2018-08-28Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.Eduard-Mihai Burtescu-33/+33
2018-08-27Remove Node* prefix from AnnNodevarkor-23/+21
2018-08-27Auto merge of #53441 - toidiu:ak-fix53419, r=nikomatsakisbors-0/+1
fix for late-bound regions Fix for https://github.com/rust-lang/rust/issues/53419 r? @nikomatsakis
2018-08-25call span_suggestion with applicabilityJoseph Post-2/+12
2018-08-26Auto merge of #53619 - japaric:panic-handler, r=SimonSapinbors-5/+15
add #[panic_handler]; deprecate #[panic_implementation] r? @SimonSapin cc #44489
2018-08-25Auto merge of #53612 - mark-i-m:anon_param_disallowed_2018, r=petrochenkovbors-1/+7
Remove anonymous trait params from 2018 and beyond cc @Centril @nikomatsakis cc #41686 rust-lang/rfcs#2522 #53272 This PR removes support for anonymous trait parameters syntactically in rust 2018 and onward. TODO: - [x] Add tests
2018-08-25Fix stabilisation version for macro_vis_matcher.Jakub Kozlowski-1/+1
2018-08-24Auto merge of #53225 - nikomatsakis:nll-type-annot, r=pnkfelixbors-0/+6
MIR: support user-given type annotations on fns, structs, and enums This branch adds tooling to track user-given type annotations on functions, structs, and enum variant expressions. The user-given types are passed onto NLL which then enforces them. cc #47184 — not a complete fix, as there are more cases to cover r? @eddyb cc @rust-lang/wg-compiler-nll
2018-08-24check that adding infer-outlives requirement to all crates worksNiko Matsakis-0/+1
2018-08-24fix compile errorMark Mansi-1/+1
2018-08-24Remove anon trait params from 2018 and beyondMark Mansi-1/+7
2018-08-24address pnkfelix nitsNiko Matsakis-1/+1
2018-08-24add a `user_substs` table and store the annotations in thereNiko Matsakis-0/+6
2018-08-24Auto merge of #53662 - kennytm:rollup, r=kennytmbors-10/+10
Rollup of 16 pull requests Successful merges: - #53311 (Window Mutex: Document that we properly initialize the SRWLock) - #53503 (Discourage overuse of mem::forget) - #53545 (Fix #50865: ICE on impl-trait returning functions reaching private items) - #53559 (add macro check for lint) - #53562 (Lament the invincibility of the Turbofish) - #53563 (use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into()) - #53592 (docs: minor stylistic changes to str/string docs) - #53594 (Update RELEASES.md to include clippy-preview) - #53600 (Fix a grammatical mistake in "expected generic arguments" errors) - #53614 (update nomicon and book) - #53617 (tidy: Stop requiring a license header) - #53618 (Add missing fmt examples) - #53636 (Prefer `.nth(n)` over `.skip(n).next()`.) - #53644 (Use SmallVec for SmallCStr) - #53664 (Remove unnecessary closure in rustc_mir/build/mod.rs) - #53666 (Added rustc_codegen_llvm to compiler documentation.)
2018-08-24Rollup merge of #53563 - matthiaskrgr:String, r=varkorkennytm-10/+10
use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into()
2018-08-23Stabilize 'attr_literals' feature.Sergio Benitez-46/+11
2018-08-23fix tidyJorge Aparicio-4/+6
2018-08-23add #[panic_handler]; deprecate #[panic_implementation]Jorge Aparicio-5/+13
2018-08-23Auto merge of #53384 - gootorov:use-servo-smallvec, r=michaelwoeristerbors-34/+40
Use optimized SmallVec implementation This PR replaces current SmallVec implementation with the one from the Servo project. Closes https://github.com/rust-lang/rust/issues/51640 r? @Mark-Simulacrum
2018-08-23Auto merge of #52602 - scottmcm:tryblock-expr, r=nikomatsakisbors-25/+45
Implement try block expressions I noticed that `try` wasn't a keyword yet in Rust 2018, so... ~~Fix​es https://github.com/rust-lang/rust/issues/52604~~ That was fixed by PR https://github.com/rust-lang/rust/pull/53135 cc https://github.com/rust-lang/rust/issues/31436 https://github.com/rust-lang/rust/issues/50412
2018-08-23Auto merge of #53459 - petrochenkov:stabmore, r=nrcbors-15/+9
Stabilize a few secondary macro features - `tool_attributes` - closes https://github.com/rust-lang/rust/issues/44690 - `proc_macro_path_invoc` - this feature was created due to issues with tool attributes (https://github.com/rust-lang/rust/issues/51277), those issues are now fixed (https://github.com/rust-lang/rust/pull/52841) - partially `proc_macro_gen` - this feature was created due to issue https://github.com/rust-lang/rust/issues/50504, the issue is now fixed (https://github.com/rust-lang/rust/pull/51952), so proc macros can generate modules. They still can't generate `macro_rules` items though due to unclear hygiene interactions.
2018-08-23use String::new() instead of String::from(""), "".to_string(), "".to_owned() ↵Matthias Krüger-10/+10
or "".into()
2018-08-23Use optimized SmallVec implementationIgor Gutorov-34/+40
2018-08-23Auto merge of #53235 - varkor:gat_impl_where, r=estebankbors-4/+9
Feature gate where clauses on associated type impls Fixes #52913. This doesn't address the core problem, which is tracked by https://github.com/rust-lang/rust/issues/47206. However, it fixes the stable-to-stable regression: you now have to enable `#![feature(generic_associated_types)]` to trigger the weird behaviour.
2018-08-23Stabilize a few secondary macro featuresVadim Petrochenkov-15/+9
`tool_attributes`, `proc_macro_path_invoc`, partially `proc_macro_gen`
2018-08-22Auto merge of #52011 - ↵bors-0/+3
oli-obk:dont_you_hate_it_too_when_everything_panics_constantly, r=eddyb Allow panicking with string literal messages inside constants r? @eddyb cc https://github.com/rust-lang/rust/issues/51999 we can't implement things like `panic!("foo: {}", x)` right now because we can't call trait methods (most notably `Display::fmt`) inside constants. Also most of these impls probably have loops and conditions, so it's messy anyway. But hey `panic!("foo")` works at least. cc @japaric got any test ideas for `#![no_std]`?
2018-08-22Reexpose stability hole in the presence of feature gatesOliver Schneider-1/+1
2018-08-22Allow panicking with string literal messages inside constantsOliver Schneider-0/+3
2018-08-22Rollup merge of #53585 - dtolnay:comment, r=Mark-SimulacrumGuillaume Gomez-2/+0
Remove super old comment on function that parses items This comment was added more than 5 years ago in ab03c1e4221. As far as anyone reading this comment today needs to know, the function has never parsed items from inside an extern crate.
2018-08-22Rollup merge of #53544 - estebank:issue-53534, r=varkorGuillaume Gomez-7/+8
Point at the trait argument when using unboxed closure Fix #53534. r? @varkor