about summary refs log tree commit diff
path: root/src/libsyntax/feature_gate.rs
AgeCommit message (Collapse)AuthorLines
2019-08-23syntax: move `feature_gate.rs`.Mazdak Farrokhzad-31/+0
2019-08-23syntax: extract `check.rs`.Mazdak Farrokhzad-951/+7
2019-08-23syntax: extract `builin_attrs.rs`.Mazdak Farrokhzad-714/+8
2019-08-23syntax: extract `active.rs` feature gates.Mazdak Farrokhzad-517/+3
2019-08-23syntax: extract `removed.rs` feature gates.Mazdak Farrokhzad-77/+2
2019-08-23syntax: extract `accepted.rs` feature gates.Mazdak Farrokhzad-231/+3
2019-08-21Rollup merge of #63762 - rust-lang:fix-async-date, r=Mark-SimulacrumMazdak Farrokhzad-1/+1
`async_await` was stabilized in 1.39.0, not 1.38.0. r? @Mark-Simulacrum
2019-08-21Rollup merge of #63755 - Centril:simplify-prexp-gating, r=petrochenkovMazdak Farrokhzad-6/+9
Use dedicated type for spans in pre-expansion gating. - Simplify the overall pre-expansion gating "experience".
2019-08-21async_await was stabilized in 1.39.0, not 1.38.0.Mazdak Farrokhzad-1/+1
2019-08-20Use dedicated type for spans in pre-expansion gating.Mazdak Farrokhzad-6/+9
2019-08-20Stabilize 'async_await'.Mazdak Farrokhzad-17/+2
2019-08-17initial implementation of or-pattern parsingDan Robertson-0/+5
Initial implementation of parsing or-patterns e.g., `Some(Foo | Bar)`. This is a partial implementation of RFC 2535.
2019-08-16Simplify pre-expansion gating in general.Mazdak Farrokhzad-32/+10
2019-08-16Feature gate 'yield ?' pre-expansion.Mazdak Farrokhzad-5/+7
2019-08-14Merge Variant and Variant_Caio-1/+1
2019-08-05Auto merge of #63248 - petrochenkov:nomarker, r=matthewjasperbors-5/+0
Move special treatment of `derive(Copy, PartialEq, Eq)` from expansion infrastructure to elsewhere As described in https://github.com/rust-lang/rust/pull/62086#issuecomment-515195477. Reminder: - `derive(PartialEq, Eq)` makes the type it applied to a "structural match" type, so constants of this type can be used in patterns (and const generics in the future). - `derive(Copy)` notifies other derives that the type it applied to implements `Copy`, so `derive(Clone)` can generate optimized code and other derives can generate code working with `packed` types and types with `rustc_layout_scalar_valid_range` attributes. First, the special behavior is now enabled after properly resolving the derives, rather than after textually comparing them with `"Copy"`, `"PartialEq"` and `"Eq"` in `fn add_derived_markers`. The markers are no longer kept as attributes in AST since derives cannot modify items and previously did it through hacks in the expansion infra. Instead, the markers are now kept in a "global context" available from all the necessary places, namely - resolver. For `derive(PartialEq, Eq)` the markers are created by the derive macros themselves and then consumed during HIR lowering to add the `#[structural_match]` attribute in HIR. This is still a hack, but now it's a hack local to two specific macros rather than affecting the whole expansion infra. Ideally we should find the way to put `#[structural_match]` on the impls rather than on the original item, and then consume it in `rustc_mir`, then no hacks in expansion and lowering will be required. (I'll make an issue about this for someone else to solve, after this PR lands.) The marker for `derive(Copy)` cannot be emitted by the `Copy` macro itself because we need to know it *before* the `Copy` macro is expanded for expanding other macros. So we have to do it in resolve and block expansion of any derives in a `derive(...)` container until we know for sure whether this container has `Copy` in it or not. Nasty stuff. r? @eddyb or @matthewjasper
2019-08-04Rename `ItemImplKind::Type` to `ItemImplKind::TyAlias`varkor-1/+1
2019-08-03Move special treatment of `derive(Copy, PartialEq, Eq)` from expansion ↵Vadim Petrochenkov-5/+0
infrastructure to elsewhere
2019-08-02Replace "existential" by "opaque"varkor-4/+4
2019-08-02Switch existential_type to type_alias_impl_traitvarkor-5/+8
2019-07-30Rollup merge of #63095 - Centril:incomplete-features-lint, r=varkorMazdak Farrokhzad-13/+4
Turn `INCOMPLETE_FEATURES` into lint We do this because it is annoying to see the warning when building rustc and because this is better from a "separation of concerns" POV. The drawback to this change is that this will respect `--cap-lints`. Also note that this is not a buffered lint so if there are fatal parser errors then the lint will not trigger. r? @varkor
2019-07-30Pacify tidy, the merciless.Mazdak Farrokhzad-1/+1
2019-07-30Unsupport the await!(..) macro.Mazdak Farrokhzad-17/+4
2019-07-30Turn INCOMPLETE_FEATURES into a lint.Mazdak Farrokhzad-13/+4
2019-07-29Rollup merge of #63092 - Centril:update-impl-trait-gates, r=varkorMazdak Farrokhzad-2/+2
Update `impl Trait` gate issues cc https://github.com/rust-lang/rust/issues/63065 cc https://github.com/rust-lang/rust/issues/63063 r? @varkor cc @alexreg
2019-07-29Rollup merge of #63077 - petrochenkov:nolangfeat, r=petrochenkovMazdak Farrokhzad-18/+0
cleanup: Remove some language features related to built-in macros They are now library features. Cleanup after https://github.com/rust-lang/rust/pull/62086. The unstable book files are moved because tidy complained.
2019-07-29Update existential_type + impl_trait_in_bindings issue numbers.Mazdak Farrokhzad-2/+2
2019-07-28cleanup: Remove some language features related to built-in macrosVadim Petrochenkov-18/+0
They are now library features.
2019-07-28Adjust feature gating of subslice patterns accordingly.Mazdak Farrokhzad-5/+17
2019-07-24syntax_ext: Reuse built-in attribute template checking for macro attributesVadim Petrochenkov-88/+2
2019-07-24syntax_ext: Turn `#[global_allocator]` into a regular attribute macroVadim Petrochenkov-1/+0
2019-07-22add rustc_private as a proper language feature gateAleksey Kladov-0/+3
At the moment, `rustc_private` as a (library) feature exists by accident: `char::is_xid_start`, `char::is_xid_continue` methods in libcore define it.
2019-07-18Auto merge of #61749 - davidtwco:rfc-2203-const-array-repeat-exprs, r=eddybbors-2/+5
rustc/rustc_mir: Implement RFC 2203. This PR implements RFC 2203, allowing constants in array repeat expressions. Part of #49147. r? @eddyb
2019-07-13Tweak wording in feature gate errorsEsteban Küber-3/+3
2019-07-11Remove feature gate `dropck_parametricity` completelyLzu Tao-12/+2
Therefore we also remove `#[unsafe_destructor_blind_to_params]` attribute completly.
2019-07-09normalize use of backticks in compiler messages for libsyntax/feature_gateSamy Kacimi-13/+13
https://github.com/rust-lang/rust/issues/60532
2019-07-07syntax: Add feature gate.David Wood-2/+5
This commit adds a `const_in_array_repeat_expressions` feature gate and only create `Candidate::Repeat` if it is enabled.
2019-07-07Rollup merge of #62213 - QuietMisdreavus:cfg-doctest, r=GuillaumeGomezMazdak Farrokhzad-0/+4
rustdoc: set cfg(doctest) when collecting doctests Note: This PR builds on top of https://github.com/rust-lang/rust/pull/61199; only the last commit is specific to this PR. As discussed in https://github.com/rust-lang/rust/pull/61199, we want the ability to isolate items to only when rustdoc is collecting doctests, but we can't use `cfg(test)` because of libcore's `#![cfg(not(test))]`. This PR proposes a new cfg flag, `cfg(doctest)`, specific to this situation, rather than reusing an existing flag. I've isolated it behind a feature gate so that we can contain the effects to nightly only. (A stable workaround that can be used in lieu of `#[cfg(doctest)]` is `#[cfg(rustdoc)] #[doc(hidden)]`, at least once https://github.com/rust-lang/rust/pull/61351 lands.) Tracking issue: https://github.com/rust-lang/rust/issues/62210
2019-07-07syntax: Migrate built-in macros to the regular stability checkingVadim Petrochenkov-21/+1
2019-07-06rustdoc: set cfg(doctest) when collecting doctestsQuietMisdreavus-0/+4
2019-07-06Fix tidy issuesVadim Petrochenkov-1/+1
2019-07-06`#[rustc_transparent_macro]` -> `#[rustc_macro_transparency = ...]`Vadim Petrochenkov-1/+3
2019-07-06`#[rustc_doc_only_macro]` -> `#[rustc_builtin_macro]`Vadim Petrochenkov-1/+1
2019-07-05Rollup merge of #62133 - petrochenkov:norustc, r=eddybMazdak Farrokhzad-13/+47
Feature gate `rustc` attributes harder Fixes https://github.com/rust-lang/rust/issues/62116
2019-07-03Add separate 'async_closure' feature gate.Mazdak Farrokhzad-24/+28
2019-07-03Rollup merge of #62255 - Centril:slice-patterns-change-issue, r=varkorMark Rousskov-2/+2
Switch tracking issue for `#![feature(slice_patterns)]` Switches the tracking issue for `#![feature(slice_patterns)]` to a fresh one in https://github.com/rust-lang/rust/issues/62254 due to new RFCs. Closes https://github.com/rust-lang/rust/issues/23121. r? @varkor
2019-07-02more nits + typosNiko Matsakis-1/+1
2019-07-02feature-gate member constraints outside of async-awaitNiko Matsakis-0/+3
Minimizes risk.
2019-07-01Auto merge of #61682 - Centril:stabilize-type_alias_enum_variants, ↵bors-3/+2
r=petrochenkov Stabilize `type_alias_enum_variants` in Rust 1.37.0 Stabilize `#![feature(type_alias_enum_variants)]` which allows type-relative resolution with highest priority to `enum` variants in both expression and pattern contexts. For example, you may now write: ```rust enum Option<T> { None, Some(T), } type OptAlias<T> = Option<T>; fn work_on_alias(x: Option<u8>) -> u8 { match x { OptAlias::Some(y) => y + 1, OptAlias::None => 0, } } ``` Closes https://github.com/rust-lang/rfcs/issues/2218 Closes https://github.com/rust-lang/rust/issues/52118 r? @petrochenkov
2019-06-30Switch tracking issue for 'slice_patterns'.Mazdak Farrokhzad-2/+2