about summary refs log tree commit diff
path: root/src/libsyntax/attr.rs
AgeCommit message (Collapse)AuthorLines
2018-04-29Add error when using repr(align=x) instead of repr(align(x))varkor-0/+24
2018-04-11Implementation of `#[repr(packed(n))]` RFC 1399.Cameron Hart-16/+30
2018-04-06Use `Ident` instead of `Name` in `MetaItem`Vadim Petrochenkov-63/+43
2018-04-06Remove more duplicated spansVadim Petrochenkov-3/+5
2018-04-06Get rid of `SpannedIdent`Vadim Petrochenkov-1/+1
2018-04-06Rename `PathSegment::identifier` to `ident`Vadim Petrochenkov-3/+3
2018-03-18Initial implementation of RFC 2151, Raw IdentifiersLymia Aluysia-6/+7
2018-03-14Remove syntax and syntax_pos thread localsJohn Kåre Alsaker-18/+17
2018-03-06Add `inline` to `TransFnAttrs`Wesley Wiser-45/+1
Part of #47320
2018-02-20make `#[unwind]` attribute specify expectations more clearlyNiko Matsakis-0/+45
You can now choose between the following: - `#[unwind(allowed)]` - `#[unwind(aborts)]` Per rust-lang/rust#48251, the default is `#[unwind(allowed)]`, though I think we should change this eventually.
2018-01-16Implement repr(transparent)Robin Kruppe-1/+4
2018-01-07Rename ReprExtern to ReprC, and similarily rename a few other fields and ↵Robin Kruppe-3/+2
locals that mentioned "extern repr"
2018-01-04rustc: use {U,I}size instead of {U,I}s shorthands.Eduard-Mihai Burtescu-2/+2
2017-12-21Make mk_attr_id thread safeJohn Kåre Alsaker-9/+7
2017-12-09Use Try syntax for Option in place of macros or matchMatt Brubeck-8/+3
2017-11-21make with_unsugared_doc preserve is_sugared_docQuietMisdreavus-4/+6
2017-09-20Fix ICEscalexm-0/+14
2017-09-17rustc: Move some attr methods to queriesAlex Crichton-24/+0
Otherwise we may emit double errors related to the `#[export_name]` attribute, for example, and using a query should ensure that it's only emitted at most once.
2017-09-13honor #[rustc_const_unstable] attributesAlex Burka-14/+65
2017-09-03implement improved on_unimplemented directivesAriel Ben-Yehuda-7/+18
2017-08-30Make fields of `Span` privateVadim Petrochenkov-7/+7
2017-08-28feature error span on attr. for fn_must_use, SIMD/align, macro reëxportZack M. Davis-0/+4
There were several feature-gated attributes for which the feature-not-available error spans would point to the item annotated with the gated attribute, when it would make more sense for the span to point to the attribute itself: if the attribute is removed, the function/struct/&c. likely still makes sense and the program will compile. (Note that we decline to make the analogous change for the `main`, `start`, and `plugin_registrar` features, for in those cases it makes sense for the span to implicate the entire function, of which there is little hope of using without the gated attribute.)
2017-08-17Include the closing paren to the span of ast::NestedMetaItemSeiichi Uchida-11/+6
2017-08-17Use respan()Seiichi Uchida-3/+3
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-11/+11
Like #43008 (f668999), but _much more aggressive_.
2017-08-11Fix some typosBastien Orivel-1/+1
2017-07-08Lower alignment limit down to 2^31 - 1 (from LLVM)Lee Bousfield-3/+3
2017-07-08Raised alignment limit from 2^15 to 2^31Lee Bousfield-5/+5
2017-06-26Add `LazyTokenStream`.Jeffrey Seyfried-2/+2
2017-05-18Add an option to the parser to avoid parsing out of line modulesNick Cameron-1/+1
This is useful if parsing from stdin or a String and don't want to try and read in a module from another file. Instead we just leave a stub in the AST.
2017-05-12Fix some clippy warnings in libsyntaxAndre Bogus-8/+9
This is mostly removing stray ampersands, needless returns and lifetimes.
2017-05-08Remove need for &format!(...) or &&"" dances in `span_label` callsOliver Schneider-2/+1
2017-04-21Added feature gate, updated error messages and tests.Cameron Hart-4/+9
2017-04-21Implementation of repr struct alignment RFC 1358.Cameron Hart-6/+44
The main changes around rustc::ty::Layout::struct and rustc_trans:adt: * Added primitive_align field which stores alignment before repr align * Always emit field padding when generating the LLVM struct fields * Added methods for adjusting field indexes from the layout index to the LLVM struct field index The main user of this information is rustc_trans::adt::struct_llfields which determines the LLVM fields to be used by LLVM, including padding fields.
2017-03-30Improve `Path` spans.Jeffrey Seyfried-3/+4
2017-03-29Refactor how spans are combined in the parser.Jeffrey Seyfried-8/+7
2017-03-14Liberalize attributes.Jeffrey Seyfried-2/+44
2017-03-14Refactor `Attribute` to use `Path` and `TokenStream` instead of `MetaItem`.Jeffrey Seyfried-37/+269
2017-02-25rustc_typeck: hook up collect and item/body check to on-demand.Eduard-Mihai Burtescu-23/+0
2017-02-03Switch logic to Span instead of HashMapGuillaume Gomez-6/+6
2017-01-11syntax: struct field attributes and cfgBenjamin Saunders-10/+22
2016-12-30Such large. Very 128. Much bits.Simonas Kazlauskas-1/+4
This commit introduces 128-bit integers. Stage 2 builds and produces a working compiler which understands and supports 128-bit integers throughout. The general strategy used is to have rustc_i128 module which provides aliases for iu128, equal to iu64 in stage9 and iu128 later. Since nowhere in rustc we rely on large numbers being supported, this strategy is good enough to get past the first bootstrap stages to end up with a fully working 128-bit capable compiler. In order for this strategy to work, number of locations had to be changed to use associated max_value/min_value instead of MAX/MIN constants as well as the min_value (or was it max_value?) had to be changed to use xor instead of shift so both 64-bit and 128-bit based consteval works (former not necessarily producing the right results in stage1). This commit includes manual merge conflict resolution changes from a rebase by @est31.
2016-12-18Remove some unused functions and fix formatting.Jeffrey Seyfried-30/+0
2016-11-21Use `Symbol` instead of `InternedString` in the AST, HIR, and various other ↵Jeffrey Seyfried-24/+22
places.
2016-11-20Move `syntax::util::interner` -> `syntax::symbol`, cleanup.Jeffrey Seyfried-5/+5
2016-11-20Refactor `P<ast::MetaItem>` -> `ast::MetaItem`.Jeffrey Seyfried-22/+21
2016-11-20Move `MetaItemKind`'s `Name` to a field of `MetaItem`.Jeffrey Seyfried-20/+21
2016-11-20Refactor `CrateConfig`.Jeffrey Seyfried-13/+1
2016-11-20Refactor `MetaItemKind` to use `Name`s instead of `InternedString`s.Jeffrey Seyfried-36/+31
2016-11-20Refactor away `ast::Attribute_`.Jeffrey Seyfried-35/+35