Andre Bogus
a9c163ebe9
Fix some clippy warnings in libsyntax
...
This is mostly removing stray ampersands, needless returns and lifetimes.
2017-05-12 20:05:39 +02:00
Oliver Schneider
dd87eabd83
Remove need for &format!(...) or &&"" dances in span_label calls
2017-05-08 12:56:15 +02:00
Cameron Hart
7971a47eff
Added feature gate, updated error messages and tests.
2017-04-21 07:37:10 +10:00
Cameron Hart
4358e35fda
Implementation of repr struct alignment RFC 1358.
...
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-04-21 07:32:32 +10:00
Jeffrey Seyfried
8fde04b4a2
Improve Path spans.
2017-03-30 05:44:56 +00:00
Jeffrey Seyfried
f08d5ad4c5
Refactor how spans are combined in the parser.
2017-03-29 11:17:59 +00:00
Jeffrey Seyfried
839c2860cc
Liberalize attributes.
2017-03-14 04:39:21 +00:00
Jeffrey Seyfried
68c1cc68b4
Refactor Attribute to use Path and TokenStream instead of MetaItem.
2017-03-14 04:03:43 +00:00
Eduard-Mihai Burtescu
ba11640179
rustc_typeck: hook up collect and item/body check to on-demand.
2017-02-25 18:35:25 +02:00
Guillaume Gomez
62fb7fc54a
Switch logic to Span instead of HashMap
2017-02-03 11:08:20 +01:00
Benjamin Saunders
7972c1905b
syntax: struct field attributes and cfg
2017-01-11 21:33:17 -08:00
Simonas Kazlauskas
b0e55a83a8
Such large. Very 128. Much bits.
...
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-30 15:15:44 +01:00
Jeffrey Seyfried
83ab9f7fac
Remove some unused functions and fix formatting.
2016-12-18 23:25:30 +00:00
Jeffrey Seyfried
e85a0d70b8
Use Symbol instead of InternedString in the AST, HIR, and various other places.
2016-11-21 09:00:55 +00:00
Jeffrey Seyfried
d2f8fb0a0a
Move syntax::util::interner -> syntax::symbol, cleanup.
2016-11-20 23:40:20 +00:00
Jeffrey Seyfried
f177a00ac9
Refactor P<ast::MetaItem> -> ast::MetaItem.
2016-11-20 12:36:41 +00:00
Jeffrey Seyfried
e97686d048
Move MetaItemKind's Name to a field of MetaItem.
2016-11-20 12:36:30 +00:00
Jeffrey Seyfried
4b9b0d3474
Refactor CrateConfig.
2016-11-20 12:35:57 +00:00
Jeffrey Seyfried
a2626410d7
Refactor MetaItemKind to use Names instead of InternedStrings.
2016-11-20 11:46:06 +00:00
Jeffrey Seyfried
3ea2bc4e93
Refactor away ast::Attribute_.
2016-11-20 11:46:00 +00:00
Andy Russell
30f75e396a
do not use deprecated text for unstable docs
2016-11-13 19:00:56 -05:00
Josh Driver
d377cf5b3f
Rename KNOWN_ATTRS to BUILT_ATTRS, and create KNOWN_ATTRS
...
KNOWN_ATTRIBUTES should really be named BUILT_ATTRIBUTES,
while KNOWN_ATTRIBUTES should be used to mark attributes
as known, similar to USED_ATTRIBUTES.
2016-11-08 08:30:26 +10:30
Jeffrey Seyfried
cbd24757eb
Move CrateConfig from Crate to ParseSess.
2016-10-29 07:52:58 +00:00
Eduard Burtescu
fc363cb482
rustc_metadata: go only through rustc_serialize in astencode.
2016-09-20 20:07:54 +03:00
Abhishek Kumar
18434f9457
Update compiler error E0558 to use new error format
...
Fixes #36196 part of #35233
2016-09-03 02:17:45 +05:30
Chris Wong
42b75a5c18
Warn about multiple conflicting #[repr] hints
...
Closes #34622
2016-08-31 18:54:19 +12:00
Jeffrey Seyfried
bfb01bbb26
Refactor away AttrMetaMethods.
2016-08-25 20:41:40 +00:00
Jeffrey Seyfried
e264828b27
Refactor away AttributeMethods.
2016-08-25 20:41:39 +00:00
Jeffrey Seyfried
4eb08bb2ab
Refactor away AttrNestedMetaItemMethods.
2016-08-25 20:41:32 +00:00
Sergio Benitez
8250a26b5b
Implement RFC#1559: allow all literals in attributes.
2016-08-25 13:25:22 -07:00
cgswords
5553901146
Adressed PR comments.
2016-07-25 14:27:10 -07:00
cgswords
a5e5ea1646
General MetaItem encapsulation rewrites.
2016-07-25 14:27:10 -07:00
Guillaume Gomez
b777f145e6
Move E0533 to E0558 (because of external change)
2016-07-11 23:27:27 +02:00
Guillaume Gomez
38a0177917
Add E0534 error explanation
2016-07-11 23:24:49 +02:00
Manish Goregaokar
2c643bd4d0
Rollup merge of #34531 - GuillaumeGomez:libsyntax_err_codes, r=jonathandturner
...
Add error codes in libsyntax
r? @jonathandturner
Fixes #34526
2016-07-02 15:46:49 +05:30
ggomez
0e326d4780
Add error codes in libsyntax
2016-06-29 13:28:49 +02:00
Jeffrey Seyfried
b968ee3656
cleanup: don't count attributes on an item in a statement position as on the statement
2016-06-28 05:28:20 +00:00
Jeffrey Seyfried
8eddf02800
Rollup merge of #34339 - jseyfried:thin_vec, r=petrochenkov,Manishearth
...
Generalize and abstract `ThinAttributes` to `ThinVec<Attribute>`.
2016-06-26 02:18:43 +00:00
Jeffrey Seyfried
8748cd92d0
Rollup merge of #34316 - jseyfried:refactor_ast_stmt, r=eddyb
...
Refactor away `ast::Decl`, refactor `ast::Stmt`, and rename `ast::ExprKind::Again` to `ast::ExprKind::Continue`.
2016-06-26 02:17:27 +00:00
Jeffrey Seyfried
33ea1e330c
Rollup merge of #33943 - jseyfried:libsyntax_cleanup, r=nrc
...
Miscellaneous low priority cleanup in `libsyntax`.
2016-06-26 02:15:04 +00:00
Jonathan Turner
6ae3502134
Move errors from libsyntax to its own crate
2016-06-23 08:07:35 -04:00
Jeffrey Seyfried
5033eca65f
Generalize and abstract ThinAttributes
2016-06-19 00:01:55 +00:00
Jeffrey Seyfried
962d5c16b5
Fix fallout
2016-06-17 05:21:23 +00:00
Jeffrey Seyfried
2cd6ccf0b1
Simplify gated cfg checking
2016-06-16 19:24:44 +00:00
Jeffrey Seyfried
683e480ffe
Refactor away WithAttrs trait
2016-06-14 07:40:30 +00:00
Jeffrey Seyfried
29c105964b
Add and use HasAttrs trait
2016-05-26 23:23:01 +00:00
Oliver Schneider
6343f261f4
allow InternedString to be compared to &str directly
2016-04-26 16:27:10 +02:00
Jonas Schievink
c877d61b15
Use more autoderef in libsyntax
2016-02-12 19:28:42 +01:00
arcnmx
0ff055ad66
Pass through diagnostic handler instead
2016-02-11 12:45:52 -05:00
arcnmx
a141c52816
Use find_export_name_attr instead of string literal
2016-02-11 12:45:52 -05:00