about summary refs log tree commit diff
path: root/src/libsyntax/visit.rs
AgeCommit message (Collapse)AuthorLines
2018-05-30rustc: don't visit lifetime parameters through visit_lifetime.Eduard-Mihai Burtescu-2/+2
2018-05-24restore emplacement syntax (obsolete)Niko Matsakis-0/+4
2018-05-19rustc: introduce {ast,hir}::AnonConst to consolidate so-called "embedded ↵Eduard-Mihai Burtescu-5/+10
constants".
2018-05-16label-break-value: Parsing and AST/HIR changesest31-1/+4
2018-04-26rustc_target: move in syntax::abi and flip dependency.Irina Popa-1/+1
2018-04-12AST/HIR: Merge field access expressions for named and numeric fieldsVadim Petrochenkov-3/+0
2018-04-06Remove more duplicated spansVadim Petrochenkov-20/+20
2018-04-06Rename `ast::Variant_::name` into `ident` + Fix rebaseVadim Petrochenkov-2/+2
2018-04-06Get rid of `SpannedIdent`Vadim Petrochenkov-5/+5
2018-04-06Rename `PathSegment::identifier` to `ident`Vadim Petrochenkov-1/+1
2018-04-05Rollup merge of #49350 - abonander:macros-in-extern, r=petrochenkovAlex Crichton-0/+1
Expand macros in `extern {}` blocks This permits macro and proc-macro and attribute invocations (the latter only with the `proc_macro` feature of course) in `extern {}` blocks, gated behind a new `macros_in_extern` feature. A tracking issue is now open at #49476 closes #48747
2018-04-03expand macro invocations in `extern {}` blocksAustin Bonander-0/+1
2018-04-03Remove all unstable placement featuresAidan Hobson Sayers-4/+0
Closes #22181, #27779
2018-03-17AST: Make renames in imports closer to the sourceVadim Petrochenkov-3/+4
Fix `unused_import_braces` lint false positive on `use prefix::{self as rename}`
2018-03-17AST/HIR: Clarify what the optional name in extern crate items meanVadim Petrochenkov-3/+3
2018-03-01Support parentheses in patterns under feature gateVadim Petrochenkov-1/+2
Improve recovery for trailing comma after `..`
2018-02-24Implement multiple patterns with `|` in `if let` and `while let`Vadim Petrochenkov-4/+4
2018-02-18Change ast::Visibility to Spanned typeSeiichi Uchida-1/+1
2018-02-18Add a span field to Visibility::RestrictedSeiichi Uchida-1/+1
This span covers the whole visibility expression: e.g. `pub (in path)`.
2018-01-25Rollup merge of #47502 - petrochenkov:label, r=eddybAlex Crichton-33/+25
AST/HIR: Add a separate structure for labels
2018-01-23Adds support for immovable generators. Move checking of invalid borrows ↵John Kåre Alsaker-1/+1
across suspension points to borrowck. Fixes #44197, #45259 and #45093.
2018-01-22AST/HIR: Add a separate structure for labelsVadim Petrochenkov-33/+25
2018-01-13Remove `impl Foo for ..` in favor of `auto trait Foo`leonardo.yvens-3/+0
No longer parse it. Remove AutoTrait variant from AST and HIR. Remove backwards compatibility lint. Remove coherence checks, they make no sense for the new syntax. Remove from rustdoc.
2017-12-21Add GenericParam, refactor Generics in ast, hir, rustdocJonas Platte-20/+22
The Generics now contain one Vec of an enum for the generic parameters, rather than two separate Vec's for lifetime and type parameters. Additionally, places that previously used Vec<LifetimeDef> now use Vec<GenericParam> instead.
2017-12-14add trait aliases to ASTAlex Burka-0/+4
2017-11-30Implement RFC 2128 (use_nested_groups)Pietro Albini-23/+20
This commit adds support for nested groups inside `use` declarations, such as `use foo::{bar, sub::{baz::Foo, *}};`.
2017-11-03add `auto` keyword, parse `auto trait`, lower to HIRleonardo.yvens-1/+1
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-11-03[Syntax Breaking] Rename DefaultImpl to AutoImplleonardo.yvens-1/+1
DefaultImpl is a highly confusing name for what we now call auto impls, as in `impl Send for ..`. The name auto impl is not formally decided but for sanity anything is better than `DefaultImpl` which refers neither to `default impl` nor to `impl Default`.
2017-10-27Implement RFC 1861: Extern typesPaul Lietar-0/+1
2017-10-26Auto merge of #45464 - sinkuu:ice_44851, r=jseyfriedbors-1/+30
Visit attribute tokens in `DefCollector` and `BuildReducedGraphVisitor` Fixes #44851.
2017-10-26Add FIXMEsinkuu-0/+1
2017-10-23Fix #44851 by visiting tokens in `DefCollector` and `BuildReducedGraphVisitor`sinkuu-1/+29
2017-10-17Removed Generics from FnKind::ItemFn in libsyntaxSunjay Varma-4/+4
2017-10-17Lifting Generics from MethodSig to TraitItem and ImplItem since we want to ↵Sunjay Varma-3/+3
support generics in each variant of TraitItem and ImplItem
2017-10-14Implement `dyn Trait` syntaxVadim Petrochenkov-1/+1
2017-07-28Remove support for `gen arg`Alex Crichton-1/+0
2017-07-28Generator literal supportJohn Kåre Alsaker-0/+4
2017-07-10Store all generic arguments for method calls in ASTVadim Petrochenkov-3/+2
2017-05-25Hygienize lifetimes.Jeffrey Seyfried-1/+1
2017-05-25Refactor out `ast::MacroDef`.Jeffrey Seyfried-2/+1
2017-05-17Auto merge of #42049 - Mark-Simulacrum:rollup, r=Mark-Simulacrumbors-5/+3
Rollup of 5 pull requests - Successful merges: #41937, #41957, #42017, #42039, #42046 - Failed merges:
2017-05-16Rollup merge of #41957 - llogiq:clippy-libsyntax, r=petrochenkovMark Simulacrum-5/+3
Fix some clippy warnings in libsyntax This is mostly removing stray ampersands, needless returns and lifetimes. Basically a lot of small changes.
2017-05-16Auto merge of #41907 - est31:macro_unused, r=jseyfriedbors-1/+5
Add lint for unused macros Addresses parts of #34938, to add a lint for unused macros. We now output warnings by default when we encounter a macro that we didn't use for expansion. Issues to be resolved before this PR is ready for merge: - [x] fix the NodeId issue described above - [x] remove all unused macros from rustc and the libraries or set `#[allow(unused_macros)]` next to them if they should be kept for some reason. This is needed for successful boostrap and bors to accept the PR. -> #41934 - [x] ~~implement the full extent of #34938, that means the macro match arm checking as well.~~ *let's not do this for now*
2017-05-13Extend the libsyntax visitor to work over macro defsest31-1/+5
2017-05-12Fix some clippy warnings in libsyntaxAndre Bogus-5/+3
This is mostly removing stray ampersands, needless returns and lifetimes.
2017-05-12Pass crate attributes in visit.rsNick Cameron-3/+5
2017-04-24support `default impl` for specializationGianni Ciccarelli-1/+1
this commit implements the first step of the `default impl` feature: all items in a `default impl` are (implicitly) `default` and hence specializable. In order to test this feature I've copied all the tests provided for the `default` method implementation (in run-pass/specialization and compile-fail/specialization directories) and moved the `default` keyword from the item to the impl. See referenced issue for further info
2017-04-12First attempt at global_asm! macroA.J. Gardner-0/+6
2017-04-02Introduce `TyErr` independent from `TyInfer`Esteban Küber-1/+1
Add a `TyErr` type to represent unknown types in places where parse errors have happened, while still able to build the AST. Initially only used to represent incorrectly written fn arguments and avoid "expected X parameters, found Y" errors when called with the appropriate amount of parameters. We cannot use `TyInfer` for this as `_` is not allowed as a valid argument type. Example output: ```rust error: expected one of `:` or `@`, found `,` --> file.rs:12:9 | 12 | fn bar(x, y: usize) {} | ^ error[E0061]: this function takes 2 parameters but 3 parameters were supplied --> file.rs:19:9 | 12 | fn bar(x, y) {} | --------------- defined here ... 19 | bar(1, 2, 3); | ^^^^^^^ expected 2 parameters ```
2017-03-11Add catch expr to AST and disallow catch as a struct nameTaylor Cramer-0/+3