about summary refs log tree commit diff
path: root/src/librustc_attr/builtin.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-1041/+0
2020-08-17rust_ast::ast => rustc_astUjjwal Sharma-1/+1
2020-08-14Rework `rustc_serialize`Matthew Jasper-8/+9
- Move the type parameter from `encode` and `decode` methods to the trait. - Remove `UseSpecialized(En|De)codable` traits. - Remove blanket impls for references. - Add `RefDecodable` trait to allow deserializing to arena-allocated references safely. - Remove ability to (de)serialize HIR. - Create proc-macros `(Ty)?(En|De)codable` to help implement these new traits.
2020-08-11Introduce `rustc_lexer::is_ident` and use it in couple of placesVadim Petrochenkov-0/+12
2020-08-08Eliminate the `SessionGlobals` from `librustc_ast`.Nicholas Nethercote-67/+70
By moving `{known,used}_attrs` from `SessionGlobals` to `Session`. This means they are accessed via the `Session`, rather than via TLS. A few `Attr` methods and `librustc_ast` functions are now methods of `Session`. All of this required passing a `Session` to lots of functions that didn't already have one. Some of these functions also had arguments removed, because those arguments could be accessed directly via the `Session` argument. `contains_feature_attr()` was dead, and is removed. Some functions were moved from `librustc_ast` elsewhere because they now need to access `Session`, which isn't available in that crate. - `entry_point_type()` --> `librustc_builtin_macros` - `global_allocator_spans()` --> `librustc_metadata` - `is_proc_macro_attr()` --> `Session`
2020-08-08Remove some unnecessary uses of `Option`.Nicholas Nethercote-14/+17
These arguments are never `None`.
2020-08-04rustc_ast: `(Nested)MetaItem::check_name` -> `has_name`Vadim Petrochenkov-5/+5
For consistency with `Attribute::has_name` which doesn't mark the attribute as used either. Replace all uses of `check_name` with `has_name` outside of rustc
2020-07-20Migrate rustc_depr uses to use deprecation attributeMark Rousskov-52/+2
This should not be a change in behavior.
2020-07-20rustc_depr no longer needs to be connected to stabilityMark Rousskov-16/+0
We can deprecate non-stable/unstable items.
2020-07-20Parse rustc_deprecated as deprecated attributeMark Rousskov-43/+53
2020-07-15Add and use more static symbols.Nicholas Nethercote-4/+4
Note that the output of `unpretty-debug.stdout` has changed. In that test the hash values are normalized from a symbol numbers to small numbers like "0#0" and "0#1". The increase in the number of static symbols must have caused the original numbers to contain more digits, resulting in different pretty-printing prior to normalization.
2020-05-11Fix clippy warningsMatthias Krüger-1/+1
Fixes clippy::{cone_on_copy, filter_next, redundant_closure, single_char_pattern, len_zero,redundant_field_names, useless_format, identity_conversion, map_clone, into_iter_on_ref, needless_return, option_as_ref_deref, unused_unit, unnecessary_mut_passed}
2020-05-08Adjust cfg(version) to lang team decisionmibac138-2/+5
2020-05-03Add more tests for cfg(version)mibac138-2/+1
2020-05-03Change cfg(version) error message wordingmibac138-3/+3
2020-05-03Implement RFC 2523, `#[cfg(version(..))]`mibac138-13/+51
2020-05-01make Stability docs a bit more readable, and fix some rustdoc warningsTshepang Lekhonkhobe-2/+6
2020-04-24Avoid unused Option::map resultsJosh Stone-2/+2
These are changes that would be needed if we add `#[must_use]` to `Option::map`, per #71484.
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-1/+1
2020-03-23Split long derive lists into two derive attributes.Ana-Maria Mihalache-46/+8
2020-03-16Other `legacy` -> `macro_rules`Vadim Petrochenkov-2/+2
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-1/+1
2020-02-29use .to_string() instead of format!() macro to create stringsMatthias Krüger-1/+1
2020-02-11Auto merge of #68491 - pnkfelix:hide-niches-under-unsafe-cell, r=olibors-0/+2
Hide niches under UnsafeCell Hide any niche of T from type-construction context of `UnsafeCell<T>`. Fix #68303 Fix #68206
2020-02-11Run RustFmtjumbatm-1/+3
2020-02-11Invert control in struct_lint_level.jumbatm-2/+2
Caller now passes in a `decorate` function, which is only run if the lint is allowed.
2020-02-10Add `#[repr(no_niche)]`.Felix S. Klock II-0/+2
This repr-hint makes a struct/enum hide any niche within from its surrounding type-construction context. It is meant (at least initially) as an implementation detail for resolving issue 68303. We will not stabilize the repr-hint unless someone finds motivation for doing so. (So, declaration of `no_niche` feature lives in section of file where other internal implementation details are grouped, and deliberately leaves out the tracking issue number.) incorporated review feedback, and fixed post-rebase.
2020-02-06Forbid using `0` as issue numberYuki Okushi-17/+22
2020-02-01syntax::print -> new crate rustc_ast_prettyMazdak Farrokhzad-1/+1
2020-02-011. move allow_internal_unstable to rustc_attrMazdak Farrokhzad-1/+19
2. as a result, drop rustc_errors dep from syntax
2020-02-01Move builtin attribute logic to new rustc_attr crate.Mazdak Farrokhzad-0/+1045
For now, this is all the crate contains, but more attribute logic & types will be moved there over time.