about summary refs log tree commit diff
path: root/src/libsyntax/feature_gate/check.rs
AgeCommit message (Collapse)AuthorLines
2020-01-11{syntax -> rustc_ast_passes}::feature_gateMazdak Farrokhzad-730/+0
2020-01-11get_features -> rustc_parse::configMazdak Farrokhzad-171/+4
2020-01-11gating diagnostics -> rustc_session::parseMazdak Farrokhzad-69/+4
2020-01-11Rollup merge of #68050 - Centril:canon-error, r=Mark-SimulacrumYuki Okushi-1/+1
Canonicalize rustc_error imports r? @Mark-Simulacrum
2020-01-10nix syntax::errors & prefer rustc_errors over errorsMazdak Farrokhzad-1/+1
2020-01-10Introduce `#![feature(half_open_range_patterns)]`.Mazdak Farrokhzad-0/+1
This feature adds `X..`, `..X`, and `..=X` patterns.
2020-01-09Add `const_trait_bound_opt_out` feature gateDylan MacKenzie-0/+1
2020-01-09Add `const_trait_impl` feature gateDylan MacKenzie-0/+1
2020-01-08- remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}Mazdak Farrokhzad-17/+11
- remove syntax::{help!, span_help!, span_note!} - remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!} - lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints - inline syntax::{struct_span_warn!, diagnostic_used!} - stringify_error_code! -> error_code! & use it more. - find_plugin_registrar: de-fatalize an error - de-fatalize metadata errors - move type_error_struct! to rustc_typeck - struct_span_err! -> rustc_errors
2020-01-05Add backticks to various diagnosticsvarkor-2/+2
2020-01-02Normalize `syntax::edition` imports.Mazdak Farrokhzad-1/+1
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-1/+1
2020-01-02Normalize `syntax::source_map` imports.Mazdak Farrokhzad-10/+9
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-1/+1
2019-12-22Format the worldMark Rousskov-178/+269
2019-12-20Rollup merge of #67131 - Centril:item-merge, r=petrochenkovMazdak Farrokhzad-22/+20
Merge `TraitItem` & `ImplItem into `AssocItem` In this PR we: - Merge `{Trait,Impl}Item{Kind?}` into `AssocItem{Kind?}` as discussed in https://github.com/rust-lang/rust/issues/65041#issuecomment-538105286. - This is done by using the cover grammar of both forms. - In particular, it requires that we syntactically allow (under `#[cfg(FALSE)]`): - `default`ness on `trait` items, - `impl` items without a body / definition (`const`, `type`, and `fn`), - and associated `type`s in `impl`s with bounds, e.g., `type Foo: Ord;`. - The syntactic restrictions are replaced by semantic ones in `ast_validation`. - Move syntactic restrictions around C-variadic parameters from the parser into `ast_validation`: - `fn`s in all contexts now syntactically allow `...`, - `...` can occur anywhere in the list syntactically (`fn foo(..., x: usize) {}`), - and `...` can be the sole parameter (`fn foo(...) {}`. r? @petrochenkov
2019-12-14Revert "Stabilize the `never_type`, written `!`."Niko Matsakis-0/+18
This reverts commit 15c30ddd69d6cc3fffe6d304c6dc968a5ed046f1.
2019-12-12`AssocImplKind::{Method -> Fn}`.Mazdak Farrokhzad-2/+2
2019-12-12Remove `ast::{Impl,Trait}{Item,ItemKind}`.Mazdak Farrokhzad-3/+3
2019-12-12Unify assoc item visitors more.Mazdak Farrokhzad-18/+14
2019-12-12Unify associated item visitor.Mazdak Farrokhzad-2/+2
2019-12-12Unify `{Trait,Impl}ItemKind::TyAlias` structures.Mazdak Farrokhzad-2/+4
2019-12-12`TraitItemKind::Type` -> `TraitItemKind::TyAlias`.Mazdak Farrokhzad-1/+1
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