summary refs log tree commit diff
path: root/src/libsyntax/feature_gate/check.rs
AgeCommit message (Collapse)AuthorLines
2019-12-14Revert "Stabilize the `never_type`, written `!`."Niko Matsakis-0/+18
This reverts commit 15c30ddd69d6cc3fffe6d304c6dc968a5ed046f1.
2019-11-30derive(Default) for FeaturesMazdak Farrokhzad-1/+1
2019-11-30move GateIssue to rustc_feature & simplify emit_feature_errMazdak Farrokhzad-43/+11
2019-11-30check.rs: inline a constantMazdak Farrokhzad-4/+4
2019-11-30move UnstableFeatures -> rustc_featureMazdak Farrokhzad-38/+2
2019-11-30inline two explanation constantsMazdak Farrokhzad-6/+0
2019-11-30builtin_attrs.rs -> rustc_featureMazdak Farrokhzad-1/+1
2019-11-30builtin_attrs: inline some stringsMazdak Farrokhzad-5/+0
2019-11-30move Stability to rustc_featureMazdak Farrokhzad-8/+0
2019-11-30introduce crate rustc_feature and move active, accepted, and removed to itMazdak Farrokhzad-3/+2
2019-11-26Rollup merge of #66754 - estebank:rustdoc-capitalization, r=Dylan-DPCTyler Mandry-3/+2
Various tweaks to diagnostic output
2019-11-25Tweak removed feature errorEsteban Küber-3/+2
2019-11-24Parse and feature gate raw address of expressionsMatthew Jasper-0/+1
2019-11-21Stabilize the `never_type`, written `!`.Mazdak Farrokhzad-18/+0
2019-11-16ast: Keep string literals in ABIs preciselyVadim Petrochenkov-3/+3
2019-11-16ast: Keep `extern` qualifiers in functions more preciselyVadim Petrochenkov-4/+12
2019-11-15Rollup merge of #66197 - Centril:transparent-ast, r=varkorTyler Mandry-20/+26
Push `ast::{ItemKind, ImplItemKind}::OpaqueTy` hack down into lowering We currently have a hack in the form of `ast::{ItemKind, ImplItemKind}::OpaqueTy` which is constructed literally when you write `type Alias = impl Trait;` but not e.g. `type Alias = Vec<impl Trait>;`. Per https://github.com/rust-lang/rfcs/pull/2515, this needs to change to allow `impl Trait` in nested positions. This PR achieves this change for the syntactic aspect but not the semantic one, which will require changes in lowering and def collection. In the interim, `TyKind::opaque_top_hack` is introduced to avoid knock-on changes in lowering, collection, and resolve. These hacks can then be removed and fixed one by one until the desired semantics are supported. r? @varkor
2019-11-14TAIT: feature gate recursive locationsMazdak Farrokhzad-20/+26
2019-11-14Update to use new librustc_error_codes libraryGuillaume Gomez-0/+3
2019-11-11support issue = "none" in unstable attributesRoss MacArthur-15/+16
- Use `Option<NonZeroU32>` to represent issue numbers.
2019-11-09move attr meta grammar to parse::validate_atr + ast_validationMazdak Farrokhzad-20/+3
2019-11-07syntax::parser::token -> syntax::tokenMazdak Farrokhzad-1/+1
2019-11-07Rollup merge of #65974 - Centril:matcher-friendly-gating, r=petrochenkovMazdak Farrokhzad-7/+5
A scheme for more macro-matcher friendly pre-expansion gating Pre-expansion gating will now avoid gating macro matchers that did not result in `Success(...)`. That is, the following is now OK despite `box 42` being a valid `expr` and that form being pre-expansion gated: ```rust macro_rules! m { ($e:expr) => { 0 }; // This fails on the input below due to `, foo`. (box $e:expr, foo) => { 1 }; // Successful matcher, we should get `2`. } fn main() { assert_eq!(1, m!(box 42, foo)); } ``` Closes https://github.com/rust-lang/rust/issues/65846. r? @petrochenkov cc @Mark-Simulacrum
2019-11-07parser: don't hardcode ABIs into grammarMazdak Farrokhzad-28/+35
2019-11-06Make doc comments cheaper with `AttrKind`.Nicholas Nethercote-1/+2
`AttrKind` is a new type with two variants, `Normal` and `DocComment`. It's a big performance win (over 10% in some cases) because `DocComment` lets doc comments (which are common) be represented very cheaply. `Attribute` gets some new helper methods to ease the transition: - `has_name()`: check if the attribute name matches a single `Symbol`; for `DocComment` variants it succeeds if the symbol is `sym::doc`. - `is_doc_comment()`: check if it has a `DocComment` kind. - `{get,unwrap}_normal_item()`: extract the item from a `Normal` variant; panic otherwise. Fixes #60935.
2019-11-06Remove unnecessary `Deref` impl for `Attribute`.Nicholas Nethercote-1/+1
This kind of thing just makes the code harder to read.
2019-11-06rollback gating for failing macro matchersMazdak Farrokhzad-1/+1
2019-11-06revamp pre-expansion gating infraMazdak Farrokhzad-6/+4
2019-11-06Rollup merge of #65776 - nnethercote:rename-LocalInternedString-and-more, ↵Mazdak Farrokhzad-1/+1
r=estebank Rename `LocalInternedString` and more This PR renames `LocalInternedString` as `SymbolStr`, removes an unnecessary `impl` from it, improves comments, and cleans up some `SymbolStr` uses. r? @estebank
2019-11-02Simplify various `Symbol` use points.Nicholas Nethercote-1/+1
Including removing a bunch of unnecessary `.as_str()` calls, and a bunch of unnecessary sigils.
2019-10-31syntax: disable the new early feature-gatings added in #65742.Eduard-Mihai Burtescu-0/+15
2019-10-31Revert "pre-expansion gate trait_alias."Eduard-Mihai Burtescu-0/+9
This reverts commit 2d182b82ce5ecfe8090ba3d4e78f1cd72c072ef1.
2019-10-31Revert "pre-expansion gate associated_type_bounds"Eduard-Mihai Burtescu-1/+14
This reverts commit c17a1fd7d0ef0f1f546445d0c8bdb11be55e4be7.
2019-10-31Revert "pre-expansion gate crate_visibility_modifier"Eduard-Mihai Burtescu-0/+8
This reverts commit 04c661ba021730bc13d33c6d55cb9aad05026f36.
2019-10-31Revert "pre-expansion gate const_generics"Eduard-Mihai Burtescu-1/+11
This reverts commit 49cbfa1a6f6469ddbc0e88161e52104cc87aea9b.
2019-10-31Revert "pre-expansion gate decl_macro"Eduard-Mihai Burtescu-0/+5
This reverts commit 1f470ceac2202ecffe8a15acc1139edb9ad4a03b.
2019-10-31Revert "pre-expansion gate box_patterns"Eduard-Mihai Burtescu-1/+14
This reverts commit 2aff6b36d7ed5c25700669a92b4a43200ee0fe6b.
2019-10-31Revert "pre-expansion gate exclusive_range_pattern"Eduard-Mihai Burtescu-1/+6
This reverts commit 665a876e307933c6480a6c55a3e38e88937aff2c.
2019-10-31Revert "pre-expansion gate try_blocks"Eduard-Mihai Burtescu-0/+3
This reverts commit 1935ba658c576f14397c2c7a26a6642cf08f26a6.
2019-10-31Revert "pre-expansion gate label_break_value"Eduard-Mihai Burtescu-0/+6
This reverts commit 137ded8ab1edf5112c45e0b6854272ae2e9d3a6d.
2019-10-31Revert "pre-expansion gate box_syntax"Eduard-Mihai Burtescu-0/+6
This reverts commit e4ed8865786a787a7b0c045f7674569b6be0e9bc.
2019-10-31Revert "pre-expansion gate type_ascription"Eduard-Mihai Burtescu-0/+15
This reverts commit 15a6c09b6e8a977f2c6f5a73de01a20d00b37930.
2019-10-29Rollup merge of #65809 - roblabla:eficall-abi, r=nagisaMazdak Farrokhzad-0/+4
Add new EFIAPI ABI Fixes #54527 Adds a new ABI, "efiapi", which reflects the calling convention as specified by [the current spec UEFI spec](https://uefi.org/sites/default/files/resources/UEFI%20Spec%202_7_A%20Sept%206.pdf#G6.999903). When compiling for x86_64, we should select the `win64` ABI, while on all other architectures (Itanium, x86, ARM and ARM64 and RISC-V), we should select the `C` ABI. Currently, this is done by just turning it into the C ABI everywhere except on x86_64, where it's turned into the win64 ABI. Should we prevent this ABI from being used on unsupported architectures, and if so, how would this be done?
2019-10-25Add new EFIAPI ABIroblabla-0/+4
Adds a new ABI for the EFIAPI calls. This ABI should reflect the latest version of the UEFI specification at the time of commit (UEFI spec 2.8, URL below). The specification says that for x86_64, we should follow the win64 ABI, while on all other supported platforms (ia32, itanium, arm, arm64 and risc-v), we should follow the C ABI. To simplify the implementation, we will simply follow the C ABI on all platforms except x86_64, even those technically unsupported by the UEFI specification. https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_final.pdf
2019-10-24pre-expansion gate type_ascriptionMazdak Farrokhzad-15/+6
2019-10-24pre-expansion gate box_syntaxMazdak Farrokhzad-6/+1
2019-10-24pre-expansion gate label_break_valueMazdak Farrokhzad-6/+1
2019-10-24dedup GAT gate checksMazdak Farrokhzad-16/+21
2019-10-24pre-expansion gate try_blocksMazdak Farrokhzad-3/+1
2019-10-24pre-expansion gate exclusive_range_patternMazdak Farrokhzad-6/+2