about summary refs log tree commit diff
path: root/src/libsyntax/attr/builtin.rs
AgeCommit message (Collapse)AuthorLines
2020-02-01Move builtin attribute logic to new rustc_attr crate.Mazdak Farrokhzad-1045/+0
For now, this is all the crate contains, but more attribute logic & types will be moved there over time.
2020-01-30clarify "incorrect issue" errorAndy Russell-21/+34
2020-01-18remove rustc_error_codes deps except in rustc_driverMazdak Farrokhzad-2/+0
2020-01-11gating diagnostics -> rustc_session::parseMazdak Farrokhzad-2/+1
2020-01-10nix syntax::errors & prefer rustc_errors over errorsMazdak Farrokhzad-1/+1
2020-01-08- remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}Mazdak Farrokhzad-24/+49
- 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-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-2/+2
2019-12-28doc comments: Less attribute mimickingVadim Petrochenkov-1/+1
2019-12-22Format the worldMark Rousskov-197/+258
2019-12-21Require issue = "none" over issue = "0" in unstable attributesRoss MacArthur-3/+3
2019-12-13Require stable/unstable annotations for the constness of all stable ↵Oliver Scherer-62/+63
functions with a `const` modifier
2019-11-30move GateIssue to rustc_feature & simplify emit_feature_errMazdak Farrokhzad-2/+2
2019-11-30builtin_attrs.rs -> rustc_featureMazdak Farrokhzad-6/+3
2019-11-30move is_builtin_attr to syntax::attrMazdak Farrokhzad-0/+6
2019-11-30simplify gated cfgs logicMazdak Farrokhzad-7/+17
2019-11-30move AttributeTemplate to builtin_attrsMazdak Farrokhzad-25/+0
2019-11-30introduce crate rustc_feature and move active, accepted, and removed to itMazdak Farrokhzad-1/+2
2019-11-17Remove extern crate.Camille GILLOT-0/+1
2019-11-17Further HashStable_Generic derives.Camille GILLOT-4/+7
2019-11-17Use proc_macro for HashStable derive in libsyntax.Camille GILLOT-1/+1
2019-11-17Rollup merge of #66381 - Centril:66340, r=petrochenkovYuki Okushi-1/+4
find_deprecation: deprecation attr may be ill-formed meta. Fixes #66340. r? @petrochenkov cc @pnkfelix
2019-11-15find_deprecation: deprecation attr may be ill-formed meta.Mazdak Farrokhzad-1/+4
2019-11-14Update to use new librustc_error_codes libraryGuillaume Gomez-0/+2
2019-11-11support issue = "none" in unstable attributesRoss MacArthur-10/+21
- Use `Option<NonZeroU32>` to represent issue numbers.
2019-11-10move syntax::parse -> librustc_parseMazdak Farrokhzad-3/+3
also move MACRO_ARGUMENTS -> librustc_parse
2019-11-09move attr meta grammar to parse::validate_atr + ast_validationMazdak Farrokhzad-68/+1
2019-11-06Make doc comments cheaper with `AttrKind`.Nicholas Nethercote-4/+4
`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-4/+4
This kind of thing just makes the code harder to read.
2019-10-21Remove many unnecessary trait derivations.Nicholas Nethercote-5/+4
2019-10-16attr: remove dep on ExtCtxtMazdak Farrokhzad-9/+5
2019-10-15syntax::parse::sess -> syntax::sessMazdak Farrokhzad-1/+1
2019-10-13ast: remove implicit pprust dependency via Display.Mazdak Farrokhzad-9/+25
Instead just use `pprust::path_to_string(..)` where needed. This has two benefits: a) The AST definition is now independent of printing it. (Therefore we get closer to extracting a data-crate.) b) Debugging should be easier as program flow is clearer.
2019-09-26Rename `MetaItem.node` to `MetaItem.kind`varkor-7/+7
2019-09-26Rename `Lit.node` to `Lit.kind`varkor-7/+7
2019-09-07Support "soft" feature-gating using a lintVadim Petrochenkov-16/+12
Use it for feature-gating `#[bench]`
2019-07-31Replace AstBuilder with inherent methodsMark Rousskov-1/+0
2019-07-31Remove Span argument from ExtCtxt::attributeMark Rousskov-1/+1
MetaItem.span was always equivalent
2019-07-24Demote template check error to a lint for `#[test]` and `#[bench]`Vadim Petrochenkov-1/+2
2019-07-24syntax_ext: Reuse built-in attribute template checking for macro attributesVadim Petrochenkov-0/+96
2019-07-07syntax: Migrate built-in macros to the regular stability checkingVadim Petrochenkov-0/+13
2019-07-07syntax: Keep full `Stability` in `SyntaxExtension`Vadim Petrochenkov-1/+2
2019-07-06privacy: Only opaque macros leak private thingsVadim Petrochenkov-0/+33
2019-05-31Remove GlobalArenas and use Arena insteadJohn Kåre Alsaker-3/+3
2019-05-25Reword malformed attribute input diagnosticsEsteban Küber-1/+9
- Handle empty `cfg_attr` attribute - Reword empty `derive` attribute error - Use consistend error message: "malformed `attrname` attribute input" - Provide suggestions when possible - Move note/help to label/suggestion - Use consistent wording "ill-formed" -> "malformed" - Move diagnostic logic out of parser
2019-05-13Return a `Symbol` from `name_or_empty` functions.Nicholas Nethercote-42/+39
2019-05-13Remove the equality operation between `Symbol` and strings.Nicholas Nethercote-11/+11
And also the equality between `Path` and strings, because `Path` is made up of `Symbol`s.
2019-05-13Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.Nicholas Nethercote-9/+9
2019-04-23Add rustc_allow_const_fn_ptrTaylor Cramer-4/+14
2019-03-17Make meta-item API compatible with `LocalInternedString::get` soundness fixVadim Petrochenkov-23/+23
2019-03-16Refactor away `NestedMetaItemKind`Vadim Petrochenkov-28/+28
Remove methods `Attribute::span` and `MetaItem::span` duplicating public fields