Mazdak Farrokhzad
be09427b11
Rollup merge of #61813 - matthewjasper:remove-unnecessary-symbol-ops, r=petrochenkov
...
Remove some unnecessary symbol interner ops
* Don't gensym symbols that don't need to worry about colliding with other symbols
* Use symbol constants instead of interning string literals in a few places.
* Don't generate a module in `__register_diagnostic`
r? @petrochenkov
2019-06-15 17:45:02 +02:00
Matthew Jasper
4e212c6ddc
Avoid some unnecessary symbol interner operations
2019-06-14 18:54:58 +01:00
Cedric
dd442a1fcf
use default binding mode in match clauses
2019-06-08 13:29:43 +02:00
Cedric
4123b5d796
fix bad style for structs
2019-06-08 12:18:13 +02:00
Cedric
5fb099dc78
use pattern matching for slices destructuring
2019-06-08 10:49:46 +02:00
Vadim Petrochenkov
ff40e37b98
Some code cleanup and tidy/test fixes
2019-06-06 14:04:02 +03:00
Vadim Petrochenkov
f745e5f9b6
syntax: Remove duplicate span from token::Ident
2019-06-06 14:04:02 +03:00
Vadim Petrochenkov
e0127dbf81
syntax: Use Token in TokenTree::Token
2019-06-06 14:03:15 +03:00
Vadim Petrochenkov
ca2a50fad7
syntax: Turn token::Lit into a struct
2019-05-23 12:46:24 +03:00
Vadim Petrochenkov
59a382122f
Simplify use of keyword symbols
2019-05-22 19:48:56 +03:00
Nicholas Nethercote
88d29992bd
Remove Symbol::gensym().
2019-05-20 14:46:55 +10:00
Taiki Endo
3216c7656a
Rename rustc_errors dependency in rust 2018 crates
2019-02-13 00:28:52 +09:00
Taiki Endo
7bb082d27f
libsyntax => 2018
2019-02-07 02:33:01 +09:00
Andy Russell
7c0d145ec1
improve non_snake_case diagnostics
...
Use a structured suggestion and tighten the span to just the identifier.
2019-01-08 13:24:38 -05:00
Mark Rousskov
2a663555dd
Remove licenses
2018-12-25 21:08:33 -07:00
Alex Crichton
cf47a19305
Bump to 1.33.0
...
* Update bootstrap compiler
* Update version to 1.33.0
* Remove some `#[cfg(stage0)]` annotations
Actually updating the version number is blocked on updating Cargo
2018-12-12 08:09:26 -08:00
ljedrz
130a32fa72
Remove OneVector
2018-09-26 10:43:37 +02:00
Igor Gutorov
4d81fe9243
Use optimized SmallVec implementation
2018-08-23 10:45:53 +03:00
Donato Sciarra
82607d2cf3
mv (mod) codemap source_map
2018-08-19 23:01:00 +02:00
ljedrz
e5e6375352
Move SmallVec and ThinVec out of libsyntax
2018-08-13 22:11:57 +02:00
ljedrz
e28e4877a8
Deny bare trait objects in in src/libsyntax
2018-07-10 21:06:26 +02:00
Vadim Petrochenkov
1e4269cb83
Add Ident::as_str helper
2018-05-26 15:20:23 +03:00
Eduard-Mihai Burtescu
26aad25487
rustc: introduce {ast,hir}::AnonConst to consolidate so-called "embedded constants".
2018-05-19 20:34:42 +03:00
Lymia Aluysia
ce84a41936
Allow raw identifiers in diagnostic macros.
2018-03-18 13:27:56 -05:00
Lymia Aluysia
fad1648e0f
Initial implementation of RFC 2151, Raw Identifiers
2018-03-18 10:07:19 -05:00
bors
5e3ecdce4e
Auto merge of #48917 - petrochenkov:import, r=oli-obk
...
syntax: Make imports in AST closer to the source and cleanup their parsing
This is a continuation of https://github.com/rust-lang/rust/pull/45846 in some sense.
2018-03-18 01:50:52 +00:00
Vadim Petrochenkov
f88162654d
Rename Span::empty to Span::shrink_to_lo, add Span::shrink_to_hi
2018-03-17 22:12:21 +03:00
Vadim Petrochenkov
5d06c890fe
syntax: Make _ an identifier
2018-03-17 22:08:07 +03:00
John Kåre Alsaker
728c16c88f
Move REGISTERED_DIAGNOSTICS to a ParseSess field
2018-03-08 05:30:43 +01:00
Seiichi Uchida
b5099a708d
Replace dummy spans with empty spans
2018-02-18 00:10:40 +09:00
Seiichi Uchida
d6bdf296a4
Change ast::Visibility to Spanned type
2018-02-18 00:10:40 +09:00
Zack M. Davis
1b6c9605e4
use field init shorthand EVERYWHERE
...
Like #43008 (f668999 ), but _much more aggressive_.
2017-08-15 15:29:17 -07:00
Alex Crichton
9b2f7624ec
syntax: Add tokens: Option<TokenStream> to Item
...
This commit adds a new field to the `Item` AST node in libsyntax to optionally
contain the original token stream that the item itself was parsed from. This is
currently `None` everywhere but is intended for use later with procedural
macros.
2017-07-28 07:58:20 -07:00
Jeffrey Seyfried
7fdc1fb2e4
Hygienize lifetimes.
2017-05-25 05:52:09 +00:00
Andre Bogus
958c67d9c8
adressed comments by @kennytm and @petrochenkov
2017-05-15 23:56:09 +02:00
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
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
Jonas Schievink
48e5199de3
libsyntax: clearer names for some AST parts
...
This applies the HIR changes from the previous commits to the AST, and
is thus a syntax-[breaking-change]
Renames `PatKind::Vec` to `PatKind::Slice`, since these are called slice
patterns, not vec patterns. Renames `TyKind::Vec`, which represents the
type `[T]`, to `TyKind::Slice`. Renames `TyKind::FixedLengthVec` to
`TyKind::Array`.
2016-09-28 22:31:18 +02:00
Jeffrey Seyfried
82a15a6a0a
Rollup merge of #34385 - cgswords:tstream, r=nrc
...
syntax-[breaking-change] cc #31645
(Only breaking because ast::TokenTree is now tokenstream::TokenTree.)
This pull request refactors TokenTrees into their own file as src/libsyntax/tokenstream.rs, moving them out of src/libsyntax/ast.rs, in order to prepare for an accompanying TokenStream implementation (per RFC 1566).
2016-06-26 02:11:59 +00:00
Jonathan Turner
bc1400600b
reexport errors from syntax. fix failing cfail test
2016-06-24 19:10:15 -04:00
Jonathan Turner
6ae3502134
Move errors from libsyntax to its own crate
2016-06-23 08:07:35 -04:00
cgswords
d59accfb06
Refactored tokentrees into their own files in preparation for tokenstreams. Modified tests to point to the new file now.
2016-06-21 11:12:36 -07:00
Vadim Petrochenkov
546c052d22
syntax: Get rid of token::IdentStyle
2016-04-24 20:59:44 +03:00
Oliver 'ker' Schneider
d844bfb196
[breaking-change] don't glob export ast::Visibility variants
2016-02-11 12:34:48 +01:00
Oliver 'ker' Schneider
73fa9b2da2
[breaking-change] don't glob export ast::Mutablity variants
2016-02-11 12:34:48 +01:00
Oliver 'ker' Schneider
019614f03d
[breaking-change] don't glob export ast::Item_ variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
05d4cefd63
[breaking-change] don't pub export ast::Ty_ variants
2016-02-11 12:34:48 +01:00
Ruud van Asseldonk
a7f1d12ae4
Avoid ICE if environment variable is not set
...
Rustdoc could trigger a code path that relied on the
$CFG_COMPILER_HOST_TRIPLE environment variable being
set, causing an ICE if it was not. This fixes that,
emitting an error instead of crashing.
2016-01-28 22:15:42 +01:00
Nick Cameron
95dc7efad0
use structured errors
2015-12-30 14:27:59 +13:00