parse-generics-poc 0.1.0

A proof-of-concept implementation of the proposed RFC #1583; provides macros for parsing generics and where clauses. Note: requires a compatible nightly compiler. For a stable alternative, see the parse-generics-shim crate.
Build #54342 2017-06-03 23:14:17

Build failed. If you want to re-trigger a documentation build, you can do it here. You can find more information on docs.rs builds documentation on the builds page.

# rustc version
rustc 1.19.0-dev (28a93c1f4 2017-05-31)# docs.rs version
cratesfyi 0.4.0-dev (bedcc0c 2017-06-01)# build log
Updating registry `https://github.com/rust-lang/crates.io-index`
Downloading parse-generics-poc v0.1.0
Documenting parse-generics-poc v0.1.0
Running `rustdoc --crate-name parse_generics_poc .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs -o /home/cratesfyi/cratesfyi/doc -L dependency=/home/cratesfyi/cratesfyi/debug/deps`
error[E0432]: unresolved import `syntax::ast::TokenTree`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:46:25
|
46 | use syntax::ast::{self, TokenTree};
|                         ^^^^^^^^^ no `TokenTree` in `ast`

error[E0432]: unresolved import `syntax::parse::token::str_to_ident`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:50:5
|
50 | use syntax::parse::token::str_to_ident;
|     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `str_to_ident` in `parse::token`

error[E0433]: failed to resolve. Could not find `special_idents` in `token`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:172:20
|
172 |             ident: token::special_idents::invalid,
|                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `special_idents` in `token`

error[E0433]: failed to resolve. Could not find `special_idents` in `token`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:185:20
|
185 |             ident: token::special_idents::invalid,
|                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `special_idents` in `token`

error[E0422]: cannot find struct, variant or union type `Delimited` in module `ast`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:66:51
|
66  |         TokenTree::Delimited(DUM_SP, Rc::new(ast::Delimited {
|                                                   ^^^^^^^^^ not found in `ast`
...
379 |                 ex_fields.push(delim_tt!([] <- constr.take().unwrap()));
|                                --------------------------------------- in this macro invocation
|
help: possible candidates are found in other modules, you can import them into scope
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::ext::tt::quoted::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::ext::tt::quoted::TokenTree::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::tokenstream::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::tokenstream::TokenTree::Delimited;

error[E0422]: cannot find struct, variant or union type `Delimited` in module `ast`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:66:51
|
66  |         TokenTree::Delimited(DUM_SP, Rc::new(ast::Delimited {
|                                                   ^^^^^^^^^ not found in `ast`
...
385 |                 ex_fields.push(delim_tt!([] <- params.take().unwrap()));
|                                --------------------------------------- in this macro invocation
|
help: possible candidates are found in other modules, you can import them into scope
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::ext::tt::quoted::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::ext::tt::quoted::TokenTree::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::tokenstream::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::tokenstream::TokenTree::Delimited;

error[E0422]: cannot find struct, variant or union type `Delimited` in module `ast`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:66:51
|
66  |         TokenTree::Delimited(DUM_SP, Rc::new(ast::Delimited {
|                                                   ^^^^^^^^^ not found in `ast`
...
391 |                 ex_fields.push(delim_tt!([] <- ltimes.take().unwrap()));
|                                --------------------------------------- in this macro invocation
|
help: possible candidates are found in other modules, you can import them into scope
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::ext::tt::quoted::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::ext::tt::quoted::TokenTree::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::tokenstream::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::tokenstream::TokenTree::Delimited;

error[E0422]: cannot find struct, variant or union type `Delimited` in module `ast`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:66:51
|
66  |         TokenTree::Delimited(DUM_SP, Rc::new(ast::Delimited {
|                                                   ^^^^^^^^^ not found in `ast`
...
397 |                 ex_fields.push(delim_tt!([] <- tnames.take().unwrap()));
|                                --------------------------------------- in this macro invocation
|
help: possible candidates are found in other modules, you can import them into scope
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::ext::tt::quoted::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::ext::tt::quoted::TokenTree::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::tokenstream::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::tokenstream::TokenTree::Delimited;

error[E0422]: cannot find struct, variant or union type `Delimited` in module `ast`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:75:51
|
75  |         TokenTree::Delimited(DUM_SP, Rc::new(ast::Delimited {
|                                                   ^^^^^^^^^ not found in `ast`
...
407 |     ex_tts.push(delim_tt!({} <- ex_fields));
|                 -------------------------- in this macro invocation
|
help: possible candidates are found in other modules, you can import them into scope
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::ext::tt::quoted::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::ext::tt::quoted::TokenTree::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::tokenstream::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'cx>> use syntax::tokenstream::TokenTree::Delimited;

error[E0425]: cannot find value `EMPTY_CTXT` in module `ast`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:428:24
|
428 |             ctxt: ast::EMPTY_CTXT,
|                        ^^^^^^^^^^ not found in `ast`

error[E0422]: cannot find struct, variant or union type `Delimited` in module `ast`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:66:51
|
66  |         TokenTree::Delimited(DUM_SP, Rc::new(ast::Delimited {
|                                                   ^^^^^^^^^ not found in `ast`
...
537 |                 ex_fields.push(delim_tt!([] <- clause.take().unwrap()));
|                                --------------------------------------- in this macro invocation
|
help: possible candidates are found in other modules, you can import them into scope
| ) -> Result<Box<MacResult + 'static>, Error<'a>> use syntax::ext::tt::quoted::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'a>> use syntax::ext::tt::quoted::TokenTree::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'a>> use syntax::tokenstream::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'a>> use syntax::tokenstream::TokenTree::Delimited;

error[E0422]: cannot find struct, variant or union type `Delimited` in module `ast`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:66:51
|
66  |         TokenTree::Delimited(DUM_SP, Rc::new(ast::Delimited {
|                                                   ^^^^^^^^^ not found in `ast`
...
543 |                 ex_fields.push(delim_tt!([] <- preds.take().unwrap()));
|                                -------------------------------------- in this macro invocation
|
help: possible candidates are found in other modules, you can import them into scope
| ) -> Result<Box<MacResult + 'static>, Error<'a>> use syntax::ext::tt::quoted::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'a>> use syntax::ext::tt::quoted::TokenTree::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'a>> use syntax::tokenstream::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'a>> use syntax::tokenstream::TokenTree::Delimited;

error[E0422]: cannot find struct, variant or union type `Delimited` in module `ast`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:75:51
|
75  |         TokenTree::Delimited(DUM_SP, Rc::new(ast::Delimited {
|                                                   ^^^^^^^^^ not found in `ast`
...
553 |     ex_tts.push(delim_tt!({} <- ex_fields));
|                 -------------------------- in this macro invocation
|
help: possible candidates are found in other modules, you can import them into scope
| ) -> Result<Box<MacResult + 'static>, Error<'a>> use syntax::ext::tt::quoted::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'a>> use syntax::ext::tt::quoted::TokenTree::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'a>> use syntax::tokenstream::Delimited;
| ) -> Result<Box<MacResult + 'static>, Error<'a>> use syntax::tokenstream::TokenTree::Delimited;

error[E0425]: cannot find value `EMPTY_CTXT` in module `ast`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:574:24
|
574 |             ctxt: ast::EMPTY_CTXT,
|                        ^^^^^^^^^^ not found in `ast`

error[E0412]: cannot find type `Delimited` in module `ast`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:590:18
|
590 | -> Result<(&ast::Delimited, &[TokenTree]), Error<'static>> {
|                  ^^^^^^^^^ not found in `ast`
|
help: possible candidates are found in other modules, you can import them into scope
| use syntax::ext::tt::quoted::Delimited;
| use syntax::tokenstream::Delimited;

error[E0412]: cannot find type `Delimited` in module `ast`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:600:18
|
600 | -> Result<(&ast::Delimited, &[TokenTree]), Error<'static>> {
|                  ^^^^^^^^^ not found in `ast`
|
help: possible candidates are found in other modules, you can import them into scope
| use syntax::ext::tt::quoted::Delimited;
| use syntax::tokenstream::Delimited;

error[E0433]: failed to resolve. Could not find `IdentStyle` in `token`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:659:29
|
659 |         Token::Ident(ident, token::IdentStyle::Plain)
|                             ^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `IdentStyle` in `token`

error[E0433]: failed to resolve. Could not find `IdentStyle` in `token`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:666:39
|
666 |         Token::Ident(str_to_ident(s), token::IdentStyle::Plain)
|                                       ^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `IdentStyle` in `token`

error[E0308]: mismatched types
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:165:20
|
165 |             attrs: None,
|                    ^^^^ expected struct `syntax::util::ThinVec`, found enum `std::option::Option`
|
= note: expected type `syntax::util::ThinVec<syntax::ast::Attribute>`
found type `std::option::Option<_>`
= help: here are some functions which might fulfill your needs:
- .unwrap()
- .unwrap_or_default()

error[E0061]: this function takes 1 parameter but 3 parameters were supplied
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:208:17
|
208 |                 P(self.mac),
|                 ^^^^^^^^^^^ expected 1 parameter

error[E0308]: mismatched types
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:205:31
|
205 |           Some(SmallVector::one(codemap::respan(
|  _______________________________^
206 | |             sp,
207 | |             ast::StmtKind::Mac(
208 | |                 P(self.mac),
...   |
211 | |             )
212 | |         )))
| |_________^ expected struct `syntax::ast::Stmt`, found struct `syntax::codemap::Spanned`
|
= note: expected type `syntax::ast::Stmt`
found type `syntax::codemap::Spanned<syntax::ast::StmtKind>`

error[E0599]: no method named `move_iter` found for type `std::vec::Vec<syntax::ast::TyParam>` in the current scope
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:348:32
|
348 |     for param in gen.ty_params.move_iter() {
|                                ^^^^^^^^^

error[E0560]: struct `syntax::ast::Path` has no field named `global`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:419:17
|
419 |                 global: false,
|                 ^^^^^^^ `syntax::ast::Path` does not have this field

error[E0599]: no associated item named `none` found for type `syntax::ast::PathParameters` in the current scope
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:423:37
|
423 |                         parameters: ast::PathParameters::none(),
|                                     ^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0063]: missing field `span` in initializer of `syntax::ast::PathSegment`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:421:21
|
421 |                     ast::PathSegment {
|                     ^^^^^^^^^^^^^^^^ missing `span`

error[E0560]: struct `syntax::ast::Mac_` has no field named `ctxt`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:428:13
|
428 |             ctxt: ast::EMPTY_CTXT,
|             ^^^^^ `syntax::ast::Mac_` does not have this field

error[E0560]: struct `syntax::ast::Path` has no field named `global`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:565:17
|
565 |                 global: false,
|                 ^^^^^^^ `syntax::ast::Path` does not have this field

error[E0599]: no associated item named `none` found for type `syntax::ast::PathParameters` in the current scope
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:569:37
|
569 |                         parameters: ast::PathParameters::none(),
|                                     ^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0063]: missing field `span` in initializer of `syntax::ast::PathSegment`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:567:21
|
567 |                     ast::PathSegment {
|                     ^^^^^^^^^^^^^^^^ missing `span`

error[E0560]: struct `syntax::ast::Mac_` has no field named `ctxt`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:574:13
|
574 |             ctxt: ast::EMPTY_CTXT,
|             ^^^^^ `syntax::ast::Mac_` does not have this field

error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:613:36
|
613 |         Some(&TokenTree::Token(sp, Token::Ident(ref ident, _))) => {
|                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 field, found 2

error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:626:13
|
626 | /             Token::Ident(ast::Ident {
627 | |                 ref name,
628 | |                 ctxt: _,
629 | |             }, _))) if name.as_str() == s
| |_________________^ expected 1 field, found 2

error[E0061]: this function takes 1 parameter but 2 parameters were supplied
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:659:22
|
659 |         Token::Ident(ident, token::IdentStyle::Plain)
|                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 parameter

error[E0061]: this function takes 1 parameter but 2 parameters were supplied
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:666:22
|
666 |         Token::Ident(str_to_ident(s), token::IdentStyle::Plain)
|                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 parameter

error: no field `name` on type `syntax::ast::Lifetime`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:673:59
|
673 |         Token::Lifetime(ast::Ident::with_empty_ctxt(ltime.name))
|                                                           ^^^^ did you mean `id`?

error: no field `global` on type `&syntax::ast::Path`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:747:13
|
747 |     if path.global {
|             ^^^^^^

error[E0308]: mismatched types
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:766:13
|
766 |             PP::AngleBracketed(ref data) if !seg.parameters.is_empty() => {
|             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::option::Option`, found enum `syntax::ast::PathParameters`
|
= note: expected type `std::option::Option<syntax::ptr::P<syntax::ast::PathParameters>>`
found type `syntax::ast::PathParameters`

error[E0308]: mismatched types
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:785:13
|
785 |             PP::AngleBracketed(_) => (),
|             ^^^^^^^^^^^^^^^^^^^^^ expected enum `std::option::Option`, found enum `syntax::ast::PathParameters`
|
= note: expected type `std::option::Option<syntax::ptr::P<syntax::ast::PathParameters>>`
found type `syntax::ast::PathParameters`

error[E0308]: mismatched types
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:786:13
|
786 |             PP::Parenthesized(ref data) => {
|             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::option::Option`, found enum `syntax::ast::PathParameters`
|
= note: expected type `std::option::Option<syntax::ptr::P<syntax::ast::PathParameters>>`
found type `syntax::ast::PathParameters`

error[E0599]: no method named `is_empty` found for type `std::option::Option<syntax::ptr::P<syntax::ast::PathParameters>>` in the current scope
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:766:61
|
766 |             PP::AngleBracketed(ref data) if !seg.parameters.is_empty() => {
|                                                             ^^^^^^^^

error[E0308]: mismatched types
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs:804:32
|
804 |     tok_tt(Token::Interpolated(token::Nonterminal::NtTy(ty)))
|                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::rc::Rc`, found enum `syntax::parse::token::Nonterminal`
|
= note: expected type `std::rc::Rc<syntax::parse::token::Nonterminal>`
found type `syntax::parse::token::Nonterminal`

error: Compilation failed, aborting rustdoc

thread 'main' panicked at 'ChainedError {
error: Could not document `parse-generics-poc`.,
cause: process didn't exit successfully: `rustdoc --crate-name parse_generics_poc .cargo/registry/src/github.com-1ecc6299db9ec823/parse-generics-poc-0.1.0/src/lib.rs -o /home/cratesfyi/cratesfyi/doc -L dependency=/home/cratesfyi/cratesfyi/debug/deps` (exit code: 101)
}', src/bin/cratesfyi.rs:136
note: Run with `RUST_BACKTRACE=1` for a backtrace.