about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2018-06-20Rename ast::GenericParam and ast::GenericArgvarkor-60/+59
It's so confusing to have everything having the same name, at least while refactoring.
2018-06-20Make method and variable names more consistentvarkor-39/+45
2018-06-20Rename "parameter" to "arg"varkor-82/+82
2018-06-20Rename PathParameter(s) to GenericArg(s)varkor-59/+55
2018-06-20Rename *Parameter to *Paramvarkor-24/+24
2018-06-20Consolidate PathParameters and AngleBracketedParameterDatavarkor-56/+86
2018-06-19Update error code numbersEsteban Küber-4/+4
2018-06-19Fix tidy and remove unused methodEsteban Küber-2/+2
2018-06-19Point to previous line for single expected tokenEsteban Küber-1/+20
2018-06-19Add message to `rustc_on_unimplemented` attributes in coreEsteban Küber-8/+0
2018-06-19Add code to incorrect `pub` restriction errorEsteban Küber-3/+5
2018-06-19Add code to `invalid ABI` errorEsteban Küber-5/+9
2018-06-19Do not consume semicolon twice while parsing local statementSeiichi Uchida-1/+1
2018-06-19Auto merge of #51278 - EPashkin:fix_mod_with_multilevel_paths_on_windows, ↵bors-1/+13
r=nikomatsakis Fix processing mod with multi-level path on Windows Fix error in [rustfmt](https://github.com/rust-lang-nursery/rustfmt/issues/1754) because libsyntax can not handle `mod` with multilevel path on Windows. Alternative is do almost same in https://github.com/rust-lang/rust/blob/master/src/libstd/sys/windows/fs.rs#L717 to allow work on paths with different separators, Ex. "\\\\?\\c:\\windows/temp"
2018-06-17Auto merge of #51549 - PSeitz:patch-1, r=kennytmbors-2/+2
Follow up to #51508, make parse_block public instead parse_block_expr This is an follow up to #51508 I mistakenly made parse_block_expr public instead of parse_block. This fixes this.
2018-06-17Auto merge of #51425 - QuietMisdreavus:thats-def-a-namespace-there, ↵bors-13/+18
r=petrochenkov refactor: create multiple HIR items for imports When lowering `use` statements into HIR, they get a `Def` of the thing they're pointing at. This is great for things that need to know what was just pulled into scope. However, this is a bit misleading, because a `use` statement can pull things from multiple namespaces if their names collide. This is a problem for rustdoc, because if there are a module and a function with the same name (for example) then it will only document the module import, because that's that the lowered `use` statement points to. The current version of this PR does the following: * Whenever the resolver comes across a `use` statement, it loads the definitions into a new `import_map` instead of the existing `def_map`. This keeps the resolutions per-namespace so that all the target definitions are available. * When lowering `use` statements, it looks up the resolutions in the `import_map` and creates multiple `Item`s if there is more than one resolution. * To ensure the `NodeId`s are properly tracked in the lowered module, they need to be created in the AST, and pulled out as needed if multiple resolutions are available. Fixes https://github.com/rust-lang/rust/issues/34843
2018-06-16Auto merge of #51562 - SimonSapin:transparent, r=cramertjbors-8/+2
Stabilize #[repr(transparent)] Tracking issue FCP: https://github.com/rust-lang/rust/issues/43036#issuecomment-394094318 Reference PR: https://github.com/rust-lang-nursery/reference/pull/353
2018-06-16Follow up on https://github.com/rust-lang/rust/pull/51508, make parse_block ↵PSeitz-2/+2
public instead parse_block_expr This is an follow up to #51508 I mistakenly made parse_block_expr public instead of parse_block. This fixes this.
2018-06-15Auto merge of #50296 - cmdd:master, r=nikomatsakisbors-0/+14
Add error message for using >= 65535 hashes for raw string literal escapes Fixes #50111.
2018-06-14create multiple HIR items for a use statementQuietMisdreavus-13/+18
2018-06-12update wording, do not change parserNiko Matsakis-1/+1
2018-06-12Auto merge of #51521 - Mark-Simulacrum:rollup, r=Mark-Simulacrumbors-3/+32
Rollup of 3 pull requests Successful merges: - #51261 (Updated RELEASES.md for 1.27.0) - #51502 (Make parse_seq_to_end and parse_path public) - #51510 (Long diagnostic for E0538) Failed merges:
2018-06-12Rollup merge of #51510 - Havvy:diagnostic-list, r=GuillaumeGomezMark Rousskov-1/+30
Long diagnostic for E0538 r? @GuillaumeGomez
2018-06-12Rollup merge of #51502 - jebrosen:pub_parse_methods, r=Mark-SimulacrumMark Rousskov-2/+2
Make parse_seq_to_end and parse_path public (see SergioBenitez/Rocket#660, rust-lang/rust#51265) Rocket currently uses `parse_seq_to_end` and `parse_path` in its codegen macros. Assuming I tested correctly, this is the minimal set of methods that are currently necessary to build Rocket again. I would be happy to add documentation of this and Rocket's other usages, if desired.
2018-06-12Auto merge of #51519 - ExpHP:issue-51331-b, r=petrochenkovbors-25/+24
Fix for $crate var normalization in proc macro for externally defined macros Fixes #51331, a bug that has existed in at least *some* form for a year and a half. The PR includes the addition of a `fold_qpath` method to `syntax::fold::Folder`. Overriding this method is useful for folds that modify paths in a way that invalidates indices (insertion or removal of a component), as it provides the opportunity to update `qself.position` in `<A as B>::C` paths. I added it because the bugfix is messy without it. (unfortunately, grepping around the codebase, I did not see anything else that could use it.)
2018-06-12add fold::Folder::fold_qpathMichael Lamparski-25/+24
2018-06-12Auto merge of #51508 - PSeitz:master, r=Mark-Simulacrumbors-2/+2
Make span_fatal and parse_block public span_fatal and parse_block were made private in #51265. These methods are used in stainless. Related #51498 #51504
2018-06-12Stabilize #[repr(transparent)]Simon Sapin-8/+2
Tracking issue FCP: https://github.com/rust-lang/rust/issues/43036#issuecomment-394094318 Reference PR: https://github.com/rust-lang-nursery/reference/pull/353
2018-06-12Auto merge of #51498 - topecongiro:pub-parse_ident, r=petrochenkovbors-1/+1
Make parse_ident public `parse_ident` was made private in #51265. In rustfmt the method is used to create a custom parser for macro call.
2018-06-11Slightly better summary for E0538Havvy-1/+1
2018-06-11Long diagnostic for E0538Havvy-1/+30
2018-06-11Stabilize the #[global_allocator] attributeSimon Sapin-7/+3
Fixes https://github.com/rust-lang/rust/issues/27389
2018-06-11Make span_fatal and parse_block publicPSeitz-2/+2
span_fatal and parse_block were made private in #51265. These methods are used in stainless. Related #51498 #51504
2018-06-11Make parse_seq_to_end and parse_path publicjeb-2/+2
2018-06-11Auto merge of #51490 - Havvy:diagnostic-list, r=GuillaumeGomezbors-1/+32
Long diagnostic for E0541 r? @GuillaumeGomez
2018-06-11Make parse_ident publicSeiichi Uchida-1/+1
2018-06-11More E0541 long diagnostic wording tweaksHavvy-3/+3
2018-06-11Auto merge of #51480 - dtolnay:lifetime, r=kennytmbors-0/+8
Enable fall through past $:lifetime matcher ```rust macro_rules! is_lifetime { ($lifetime:lifetime) => { true }; ($other:tt) => { false }; } fn main() { println!("{}", is_lifetime!('lifetime)); println!("{}", is_lifetime!(@)); } ``` Before this fix, the `is_lifetime!` invocation would fail to compile with: ``` error: expected a lifetime, found `@` --> src/main.rs:8:33 | 8 | println!("{}", is_lifetime!(@)); | ^ ``` Fixes #50903. Fixes #51477. r? @kennytm
2018-06-11Make tidy happyHavvy-7/+8
2018-06-11Fix typos in previous commitHavvy-1/+3
2018-06-11Long diagnostic for E0541Havvy-1/+29
2018-06-10Enable fall through past $:lifetime matcherDavid Tolnay-0/+8
2018-06-10Auto merge of #50205 - topecongiro:include-parens-to-type-parameter, ↵bors-8/+9
r=petrochenkov Include parens to type parameter The motivation of this PR is to fix a bug in rustfmt (cc https://github.com/rust-lang-nursery/rustfmt/issues/2630).
2018-06-10Simplify an error handling in the parserSeiichi Uchida-6/+2
2018-06-10Include parens to type parameterSeiichi Uchida-2/+7
2018-06-09Crate-ify and delete unused code in syntax::parseMark Simulacrum-365/+191
2018-06-09Auto merge of #51068 - Crazycolorz5:pluseqsplitting, r=petrochenkovbors-10/+51
parser: Split `+=` into `+` and `=` where `+` is explicitly requested (such as generics) Added functions in tokens to check whether a token leads with `+`. Used them when parsing to allow for token splitting of `+=` into `+` and `=`. Fixes https://github.com/rust-lang/rust/issues/47856
2018-06-08Rollup merge of #51298 - Dylan-DPC:stabilise/termination-test, r=nikomatsakisMark Rousskov-37/+11
Stabilize unit tests with non-`()` return type References #48854
2018-06-08Rollup merge of #51099 - Crazycolorz5:expectedcloseparen, r=estebankMark Rousskov-2/+7
Fix Issue 38777 When looking through for a closing bracket in the loop condition, adds them to expecteds. https://github.com/rust-lang/rust/issues/38777
2018-06-08provide error message when using more than 65535 hash symbols for raw stringsDavid Cao-0/+14