summary refs log tree commit diff
path: root/src/libsyntax_pos/symbol.rs
AgeCommit message (Collapse)AuthorLines
2018-07-18Implement existential typesOliver Schneider-0/+1
2018-06-30Address commentsVadim Petrochenkov-5/+5
2018-06-30hygiene: Implement transparent marksVadim Petrochenkov-0/+9
2018-06-28Fix rebaseVadim Petrochenkov-0/+5
2018-06-28Use `Ident`s for lifetimes in HIRVadim Petrochenkov-0/+4
2018-06-09Implement RFC 2421, 'Keyword unreservations (pure, sizeof, alignof, offsetof)'Havvy-22/+18
2018-06-04Add doc keyword supportGuillaume Gomez-0/+11
2018-05-26Add `Ident::as_str` helperVadim Petrochenkov-3/+7
2018-05-17Remove the `proc` keyword againVadim Petrochenkov-13/+7
2018-05-17Turn some functions from `token.rs` into methods on `Ident`Vadim Petrochenkov-1/+56
2018-05-17Add two keywords specific to editions 2015 and 2018 respectivelyVadim Petrochenkov-7/+11
2018-05-13Fix impl PartialOrd for InternedStringJohn Kåre Alsaker-1/+1
2018-05-10Allocate Symbol strings from an arenaJohn Kåre Alsaker-8/+32
2018-04-27Rename InternedString to LocalInternedString and introduce a new thread-safe ↵John Kåre Alsaker-28/+164
InternedString
2018-04-25Auto merge of #49986 - zofrex:better-derived-argument-names, r=Manishearthbors-0/+4
Provide better names for builtin deriving-generated attributes First attempt at fixing #49967 Not in love with any choices here, don't be shy if you aren't happy with anything :) I've tested that this produces nicer names in documentation, and that it no longer has issues conflicting with constants with the same name. (I guess we _could_ make a test for that... unsure if that would be valuable) In all cases I took the names from the methods as declared in the relevant trait. In some cases I had to prepend the names with _ otherwise there were errors about un-used variables. I'm uneasy with the inconsistency... do they all need to be like that? Is there a way to generate an alternate impl or use a different name (`_`?) in the cases where the arguments are not used? Lastly the gensym addition to Ident I implemented largely as suggested, but I want to point out it's a little circuitous (at least, as far as I understand it). `cx.ident_of(name)` is just `Ident::from_str`, so we create an Ident then another Ident from it. `Ident::with_empty_ctxt(Symbol::gensym(string))` may or may not be equivalent, I don't know if it's important to intern it _then_ gensym it. It seems like either we could use that, or if we do want a new method to make this convenient, it could be on Ident instead (`from_str_gensymed`?)
2018-04-23Use FxHashMap in syntax_pos::symbol::Interner::intern.Nicholas Nethercote-2/+2
Because it's faster than HashMap. This change reduces the time taken for a few of the rustc-perf benchmarks, mostly the small ones, by up to 5%.
2018-04-17Rollup merge of #49699 - zesterer:master, r=joshtriplettGuillaume Gomez-14/+13
Removed 'proc' from the reserved keywords list Remove 'proc' from the reserved keywords list. 'proc' is a very useful identifier name for a lot of things. It's especially useful when dealing with processes, operating system internals, and kernel development.
2018-04-15Provide better names for builtin deriving-generated attributesJames Sanderson-0/+4
2018-04-11Reenumerated symbolsJoshua Barretto-13/+13
2018-04-06Use `Ident` instead of `Name` in `MetaItem`Vadim Petrochenkov-7/+1
2018-04-06Get rid of `SpannedIdent`Vadim Petrochenkov-1/+6
2018-04-06Use `Span` instead of `SyntaxContext` in `Ident`Vadim Petrochenkov-8/+27
2018-04-05Merge pull request #1 from rust-lang/masterJoshua Barretto-1/+5
Merge upstream changes
2018-04-05Removed 'proc' from the reserved keywords listJoshua Barretto-1/+0
2018-03-23Rollup merge of #49030 - Zoxc:misc, r=michaelwoeristerAlex Crichton-1/+5
Misc changes from my parallel rustc branch r? @michaelwoerister
2018-03-17Make Span and Symbol implement Send and SyncJohn Kåre Alsaker-1/+5
2018-03-17syntax: Make `_` an identifierVadim Petrochenkov-61/+65
2018-03-14Remove syntax and syntax_pos thread localsJohn Kåre Alsaker-9/+10
2017-12-07Auto merge of #46497 - AgustinCB:issue-46311, r=petrochenkovbors-0/+10
Modify message for keyword as identifier name This is a temporary solution to #46311. The message is generic enough to cover both cases and is probably a fine enough solution to the specific problem described in the task. However, the underlying reason for this to be wrong is that `next_token_inner` returns `Lifetime` even if the token is a label. That's not simple, as the syntax for both can be quite similar and it may need to take a look to the next token to make a decision. I'm not sure I have enough knowledge about the project to be able to solve that (yet!), so I thought I'll fix the immediate problem first.
2017-12-07don't print self symbol's internal index unless gensymedNiko Matsakis-1/+10
It's just not useful. It also makes it hard to have tests that probe internal state, since the interning number is very sensitive. Dumping the number in the case of gensym is not ideal but will do for now.
2017-12-07remove unused testAgustin Chiappe Berrini-20/+0
2017-12-07remove unnecessary functionAgustin Chiappe Berrini-5/+1
2017-12-07address commentsAgustin Chiappe Berrini-18/+0
2017-12-06and refactor to just move the checkingAgustin Chiappe Berrini-0/+52
2017-11-13Fix style in interner testJohn-John Tedro-1/+1
2017-11-03add `auto` keyword, parse `auto trait`, lower to HIRleonardo.yvens-5/+6
Adds an `IsAuto` field to `ItemTrait` which flags if the trait was declared as an `auto trait`. Auto traits cannot have generics nor super traits.
2017-10-14Implement `dyn Trait` syntaxVadim Petrochenkov-4/+5
2017-08-31Implement From<&str> for Symbol.Eduard-Mihai Burtescu-0/+6
2017-07-30resolve: Fix instability in import suggestionsVadim Petrochenkov-1/+1
2017-06-29Change some terminology around keywords and reserved identifierspetrochenkov-64/+63
2017-06-29Make `$crate` a keywordVadim Petrochenkov-51/+52
2017-06-05syntax_pos::Symbol should not implement SyncWesley Wiser-0/+1
Fixes #42407
2017-05-25Improve intercrate hygiene.Jeffrey Seyfried-2/+13
2017-05-25Improve efficiency.Jeffrey Seyfried-10/+32
2017-05-25Hygienize `librustc_resolve`.Jeffrey Seyfried-2/+2
2017-03-29Merge `ExpnId` and `SyntaxContext`.Jeffrey Seyfried-0/+389