about summary refs log tree commit diff
path: root/src/libsyntax_pos
AgeCommit message (Collapse)AuthorLines
2018-07-19Auto merge of #52024 - oli-obk:existential_parse, r=nikomatsakisbors-0/+1
Implement existential types (not for associated types yet) r? @nikomatsakis cc @Centril @varkor @alexreg
2018-07-18Do not use desugared ident when suggesting adding a typeEsteban Küber-0/+2
2018-07-18Implement existential typesOliver Schneider-0/+1
2018-07-14Remove most of `PartialEq` impls from AST and HIR structuresVadim Petrochenkov-1/+1
2018-07-12Deny bare trait objects in the rest of rustljedrz-0/+2
2018-07-08Remove fallback to parent modules from lexical resolutionVadim Petrochenkov-24/+22
2018-07-08hygiene: Decouple transparencies from expansion IDsVadim Petrochenkov-32/+44
2018-07-08libsyntax_pos: Tweak some visibilitiesVadim Petrochenkov-11/+19
2018-06-30Address commentsVadim Petrochenkov-6/+5
2018-06-30Fortify dummy span checkingVadim Petrochenkov-1/+8
2018-06-30hygiene: Implement transparent marksVadim Petrochenkov-22/+90
2018-06-28Auto merge of #50997 - michaelwoerister:pre-analyze-filemaps, r=Mark-Simulacrumbors-81/+489
Make FileMap::{lines, multibyte_chars, non_narrow_chars} non-mutable. This PR removes most of the interior mutability from `FileMap`, which should be beneficial, especially in a multithreaded setting. This is achieved by initializing the state in question when the filemap is constructed instead of during lexing. Hopefully this doesn't degrade performance. cc @wesleywiser
2018-06-28Fix FileMap::line_begin_pos().Michael Woerister-5/+3
The method relied on the FileMap still being under construction in order for it to do what the name promises. It's now independent of the current state.
2018-06-28Fix rebaseVadim Petrochenkov-0/+5
2018-06-28Use `Ident`s for associated item definitions in HIRVadim Petrochenkov-22/+1
Remove emulation of hygiene with gensyms
2018-06-28Use `Ident`s for lifetimes in HIRVadim Petrochenkov-0/+4
2018-06-27syntax_pos: Store multibyte char size as u8 instead of u32.Michael Woerister-2/+2
2018-06-27Add comments to analzye_filemap().Michael Woerister-0/+2
2018-06-27Add SSE2 accelerated version of FileMap analysis.Michael Woerister-68/+444
2018-06-27Use u32 instead of usize of encoding byte count of multi-byte chars.Michael Woerister-3/+17
2018-06-27Make FileMap::{lines, multibyte_chars, non_narrow_chars} non-mutable.Michael Woerister-70/+88
2018-06-27Implement `#[macro_export(local_inner_macros)]`Vadim Petrochenkov-0/+3
2018-06-26migrate codebase to `..=` inclusive range patternsZack M. Davis-2/+2
These were stabilized in March 2018's #47813, and are the Preferred Way to Do It going forward (q.v. #51043).
2018-06-25Fix typoBerkus Karchebnyy-1/+1
2018-06-23hygiene: Merge `NameAndSpan` into `ExpnInfo`Vadim Petrochenkov-52/+41
2018-06-23hygiene: Make sure transparency of `Mark::root()` is an implementation ↵Vadim Petrochenkov-0/+2
detail and cannot be inspected outside of `hygiene.rs`
2018-06-23hygiene: Rename `MarkKind` to `Transparency`Vadim Petrochenkov-19/+51
Move `is_builtin` for `Mark` to a separate flag
2018-06-23hygiene: Make sure expansion info is set at most once for a given `Mark`Vadim Petrochenkov-1/+8
2018-06-23hygiene: Give `Debug` impls to hygiene structuresVadim Petrochenkov-2/+4
2018-06-21async await desugaring and testsTaylor Cramer-0/+2
2018-06-18Auto merge of #51414 - oli-obk:impl_trait_type_def, r=pnkfelixbors-0/+5
Add existential type definitions Note: this does not allow creating named existential types, it just desugars `impl Trait` to a less (but still very) hacky version of actual `existential type` items. r? @nikomatsakis
2018-06-14Fix comment on editionsManish Goregaokar-1/+1
2018-06-09Implement RFC 2421, 'Keyword unreservations (pure, sizeof, alignof, offsetof)'Havvy-22/+18
2018-06-07Add existential type definitonsOliver Schneider-0/+5
2018-06-04Add doc keyword supportGuillaume Gomez-0/+11
2018-05-26Add `Ident::as_str` helperVadim Petrochenkov-3/+7
2018-05-18Auto merge of #50307 - petrochenkov:keyhyg2, r=nikomatsakisbors-8/+164
Implement edition hygiene for keywords Determine "keywordness" of an identifier in its hygienic context. cc https://github.com/rust-lang/rust/pull/49611 I've resurrected `proc` as an Edition-2015-only keyword for testing purposes, but it should probably be buried again. EDIT: `proc` is removed again.
2018-05-18Auto merge of #50847 - Mark-Simulacrum:rollup, r=Mark-Simulacrumbors-0/+7
Rollup of 10 pull requests Successful merges: - #50387 (Remove leftover tab in libtest outputs) - #50553 (Add Option::xor method) - #50610 (Improve format string errors) - #50649 (Tweak `nearest_common_ancestor()`.) - #50790 (Fix grammar documentation wrt Unicode identifiers) - #50791 (Fix null exclusions in grammar docs) - #50806 (Add `bless` x.py subcommand for easy ui test replacement) - #50818 (Speed up `opt_normalize_projection_type`) - #50837 (Revert #49767) - #50839 (Make sure people know the book is free oline) Failed merges:
2018-05-18Auto merge of #50566 - nnethercote:bump, r=petrochenkovbors-0/+10
Streamline `StringReader::bump` These patches make `bump` smaller and nicer. They speed up most runs for coercions and tuple-stress by 1--3%.
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/+62
2018-05-17Add two keywords specific to editions 2015 and 2018 respectivelyVadim Petrochenkov-7/+11
2018-05-17Add edition to expansion infoVadim Petrochenkov-1/+14
2018-05-17Move definition of `Edition` from libsyntax to libsyntax_posVadim Petrochenkov-0/+84
2018-05-17Rollup merge of #50610 - estebank:fmt-str, r=KimundiMark Simulacrum-0/+7
Improve format string errors Point at format string position inside the formatting string: ``` error: invalid format string: unmatched `}` found --> $DIR/format-string-error.rs:21:22 | LL | let _ = format!("}"); | ^ unmatched `}` in format string ``` Explain that argument names can't start with an underscore: ``` error: invalid format string: invalid argument name `_foo` --> $DIR/format-string-error.rs:15:23 | LL | let _ = format!("{_foo}", _foo = 6usize); | ^^^^ invalid argument name in format string | = note: argument names cannot start with an underscore ``` Fix #23476. The more accurate spans will only be seen when using `format!` directly, when using `println!` the diagnostics machinery makes the span be the entire statement.
2018-05-14Hyperlink DOI against preferred resolverKatrin Leinweber-1/+1
https://www.doi.org/doi_handbook/3_Resolution.html#3.8
2018-05-14Remove `StringReader::col`.Nicholas Nethercote-0/+9
It only has a single use, within code handling indented block comments. We can replace that with the new `FileMap::col_pos()`, which computes the col position (BytePos instead of CharPos) based on the record of the last newline char (which we already record). This is actually an improvement, because `trim_whitespace_prefix_and_push_line()` was using `col`, which is a `CharPos`, as a slice index, which is a byte/char confusion.
2018-05-13Inline `char_at()` and `record_width`.Nicholas Nethercote-0/+1
Because `bump()` is hot.
2018-05-13Fix impl PartialOrd for InternedStringJohn Kåre Alsaker-1/+1
2018-05-12Rollup merge of #50607 - Zoxc:symbol-arena, r=michaelwoeristerMark Simulacrum-8/+34
Allocate Symbol strings from an arena This is an alternative to https://github.com/rust-lang/rust/pull/50549 cc @nnethercote r? @michaelwoerister