Commit Graph

120 Commits

Author SHA1 Message Date
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
Aleksey Kladov 63080b3c25 remove lookup_char_pos_adj
It is now exactly equivalent to lookup_char_pos.
2019-04-05 23:16:09 +03:00
Mazdak Farrokhzad 0bc8f6f3f4 Rollup merge of #58273 - taiki-e:rename-dependency, r=matthewjasper
Rename rustc_errors dependency in rust 2018 crates

I think this is a better solution than `use rustc_errors as errors` in `lib.rs` and `use crate::errors` in modules.

Related: rust-lang/cargo#5653

cc #58099

r? @Centril
2019-02-13 04:37:04 +01:00
Taiki Endo 3216c7656a Rename rustc_errors dependency in rust 2018 crates 2019-02-13 00:28:52 +09:00
Alexander Regueiro c3e182cf43 rustc: doc comments 2019-02-10 23:42:32 +00: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 d3fe97f3d3 mv codemap() source_map() 2018-08-19 23:01:01 +02: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
Guillaume Gomez c8a110ed63 Add error code for unstable feature errors 2018-01-15 10:28:00 +01:00
Alex Crichton 8c9bf663d4 rustc: Don't use relative paths for extended errors
These no longer work now that Cargo changes the cwd of rustc while it's running.
Instead use an absolute path that's set by rustbuild.
2018-01-04 07:21:22 -08:00
Oliver Schneider d732da813b Use PathBuf instead of String where applicable 2017-12-14 11:22:08 +01:00
Oliver Schneider 6ae440e048 Make the difference between lint codes and error codes explicit 2017-11-02 10:19:41 +01:00
Vadim Petrochenkov 3da868dcb6 Make fields of Span private 2017-08-30 01:38:54 +03: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
Guillaume Gomez f4dd365bbb Add E0609 2017-06-11 19:48:53 +02:00
Guillaume Gomez a333be7cfe Add new error code 2017-05-30 19:19:34 +02: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