Code Monkey home page Code Monkey logo

aster's People

Contributors

dtolnay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

aster's Issues

Nightly broke aster

rustc 1.5.0-nightly (5ca60d943 2015-09-24) fails with

aster-0.4.7/src/expr.rs:158:26: 158:37 error: unresolved name `ast::UnUniq`

Build error on nightly

   Compiling aster v0.19.0
/Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.19.0/src/mac.rs:110:18: 110:61 error: this function takes 5 parameters but 4 parameters were supplied [E0061]
/Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.19.0/src/mac.rs:110     let mut cx = ExtCtxt::new(sess, cfg, ecfg, macro_loader);
                                                                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.19.0/src/mac.rs:110:18: 110:61 help: run `rustc --explain E0061` to see a detailed explanation
error: aborting due to previous error
error: Could not compile `aster`.

Build Fail on 1.14.0 2016-10-02

I'm getting a build error on the latesr nightly for aster:

error[E0063]: missing field `attrs` in initializer of `syntax::ast::LifetimeDef`
  --> /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.27.0/src/lifetime.rs:43:9
   |
43 |         ast::LifetimeDef {
   |         ^^^^^^^^^^^^^^^^ missing `attrs`
error[E0063]: missing field `attrs` in initializer of `syntax::ast::LifetimeDef`
   --> /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.27.0/src/lifetime.rs:111:30
    |
111 |         self.callback.invoke(ast::LifetimeDef {
    |                              ^^^^^^^^^^^^^^^^ missing `attrs`
error: no associated item named `Vec` found for type `syntax::ast::TyKind` in the current scope
   --> /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.27.0/src/ty.rs:142:28
    |
142 |         self.build_ty_kind(ast::TyKind::Vec(ty))
    |                            ^^^^^^^^^^^^^^^^
error[E0063]: missing field `attrs` in initializer of `syntax::ast::TyParam`
   --> /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.27.0/src/ty_param.rs:103:30
    |
103 |         self.callback.invoke(ast::TyParam {
    |                              ^^^^^^^^^^^^ missing `attrs`
error: aborting due to 4 previous errors

Doesn't compile on rustc 1.13.0-nightly (3c5a0fa45 2016-08-22)

error: no associated item named `None` found for type `syntax::ast::FunctionRetTy` in the current scope
  --> /home/eilie/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.22.1/src/fn_decl.rs:98:22
      |
98 |         let ret_ty = ast::FunctionRetTy::None(self.span);
      |  

aster 0.7.0 fails to compile

On rustc 1.6.0-nightly (9303055f3 2015-11-19), the following build failure happens when compiling aster 0.7.0:

% cargo build
   Compiling aster v0.7.0
/Users/zr40/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.7.0/src/item.rs:950:35: 950:49 error: use of undeclared type name `ast::ImplItem_` [E0412]
/Users/zr40/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.7.0/src/item.rs:950     pub fn build_item(self, node: ast::ImplItem_) -> F::Result {
                                                                                                                                                       ^~~~~~~~~~~~~~
/Users/zr40/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.7.0/src/item.rs:950:35: 950:49 help: run `rustc --explain E0412` to see a detailed explanation
/Users/zr40/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.7.0/src/item.rs:979:20: 979:38 error: unresolved name `ast::ConstImplItem` [E0425]
/Users/zr40/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.7.0/src/item.rs:979         let node = ast::ConstImplItem(const_.ty, const_.expr.expect("an expr is required for a const impl item"));
                                                                                                                                        ^~~~~~~~~~~~~~~~~~
/Users/zr40/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.7.0/src/item.rs:979:20: 979:38 help: run `rustc --explain E0425` to see a detailed explanation
/Users/zr40/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.7.0/src/item.rs:990:20: 990:39 error: unresolved name `ast::MethodImplItem` [E0425]
/Users/zr40/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.7.0/src/item.rs:990         let node = ast::MethodImplItem(method.sig, method.block.expect("a block is required for a method impl item"));
                                                                                                                                        ^~~~~~~~~~~~~~~~~~~
/Users/zr40/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.7.0/src/item.rs:990:20: 990:39 help: run `rustc --explain E0425` to see a detailed explanation
/Users/zr40/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.7.0/src/item.rs:1001:20: 1001:37 error: unresolved name `ast::TypeImplItem` [E0425]
/Users/zr40/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.7.0/src/item.rs:1001         let node = ast::TypeImplItem(ty);
                                                                                                                                         ^~~~~~~~~~~~~~~~~
/Users/zr40/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.7.0/src/item.rs:1001:20: 1001:37 help: run `rustc --explain E0425` to see a detailed explanation
/Users/zr40/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.7.0/src/item.rs:1012:20: 1012:36 error: unresolved name `ast::MacImplItem` [E0425]
/Users/zr40/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.7.0/src/item.rs:1012         let node = ast::MacImplItem(mac);
                                                                                                                                         ^~~~~~~~~~~~~~~~
/Users/zr40/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.7.0/src/item.rs:1012:20: 1012:36 help: run `rustc --explain E0425` to see a detailed explanation
error: aborting due to 5 previous errors
Could not compile `aster`.

To learn more, run the command again with --verbose.

0.16 Broken on nightly

/Users/elliott/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.17.0/src/mac.rs:112:18: 112:67 error: this function takes 5 parameters but 4 parameters were supplied [E0061] /Users/elliott/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.17.0/src/mac.rs:112 let mut cx = ExtCtxt::new(sess, cfg, ecfg, feature_gated_cfgs); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/elliott/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.17.0/src/mac.rs:112:18: 112:67 help: runrustc --explain E0061to see a detailed explanation

`active toolchain

nightly-x86_64-apple-darwin (default)
rustc 1.11.0-nightly (51d2d3da8 2016-06-12)`

Does not compile on rustc 1.18.0-nightly (50c186419 2017-04-06)

   Compiling aster v0.41.0 (file:///home/anthony/git/aster)
error[E0560]: struct `syntax::ast::Attribute` has no field named `value`
  --> src/attr.rs:59:13
   |
59 |             value: item,
   |             ^^^^^^ field does not exist - did you mean `path`?

error[E0308]: mismatched types
   --> src/mac.rs:110:18
    |
110 |             tts: self.tokens,
    |                  ^^^^^^^^^^^ expected struct `syntax::tokenstream::ThinTokenStream`, found struct `std::vec::Vec`
    |
    = note: expected type `syntax::tokenstream::ThinTokenStream`
               found type `std::vec::Vec<syntax::tokenstream::TokenTree>`
    = help: here are some functions which might fulfill your needs:
            - .remove(...)
            - .swap_remove(...)

error: no method named `bt_push` found for type `syntax::ext::base::ExtCtxt<'_>` in the current scope
   --> src/mac.rs:141:8
    |
141 |     cx.bt_push(info);
    |        ^^^^^^^

error[E0063]: missing field `span` in initializer of `syntax::ast::PathSegment`
   --> src/path.rs:303:30
    |
303 |         self.callback.invoke(ast::PathSegment {
    |                              ^^^^^^^^^^^^^^^^ missing `span`

error[E0063]: missing field `span` in initializer of `syntax::ast::PathSegment`
   --> src/path.rs:324:30
    |
324 |         self.callback.invoke(ast::PathSegment {
    |                              ^^^^^^^^^^^^^^^^ missing `span`

error: aborting due to 5 previous errors

error: Could not compile `aster`.

To learn more, run the command again with --verbose.

Breakage

Hello, aster is breaking on rustc 1.9.0 with this error:

/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:82:13: 82:15 error: structure `syntax::codemap::Spanned<syntax::ast::StructField_>` has no field named `id`
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:82             id: ast::DUMMY_NODE_ID,
                                                                                                   ^~
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:84:13: 84:18 error: structure `syntax::codemap::Spanned<syntax::ast::StructField_>` has no field named `ident`
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:84             ident: self.ident,
                                                                                                   ^~~~~
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:84:13: 84:18 help: did you mean `node`?
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:84             ident: self.ident,
                                                                                                   ^~~~~
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:85:13: 85:16 error: structure `syntax::codemap::Spanned<syntax::ast::StructField_>` has no field named `vis`
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:85             vis: self.vis,
                                                                                                   ^~~
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:86:13: 86:15 error: structure `syntax::codemap::Spanned<syntax::ast::StructField_>` has no field named `ty`
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:86             ty: ty,
                                                                                                   ^~
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:87:13: 87:18 error: structure `syntax::codemap::Spanned<syntax::ast::StructField_>` has no field named `attrs`
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:87             attrs: self.attrs,
                                                                                                   ^~~~~
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:87:13: 87:18 help: did you mean `node`?
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:87             attrs: self.attrs,/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:82:13: 82:15 error: structure `syntax::codemap::Spanned<syntax::ast::StructField_>` has no field named `id`
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:82             id: ast::DUMMY_NODE_ID,
                                                                                                   ^~
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:84:13: 84:18 error: structure `syntax::codemap::Spanned<syntax::ast::StructField_>` has no field named `ident`
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:84             ident: self.ident,
                                                                                                   ^~~~~
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:84:13: 84:18 help: did you mean `node`?
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:84             ident: self.ident,
                                                                                                   ^~~~~
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:85:13: 85:16 error: structure `syntax::codemap::Spanned<syntax::ast::StructField_>` has no field named `vis`
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:85             vis: self.vis,
                                                                                                   ^~~
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:86:13: 86:15 error: structure `syntax::codemap::Spanned<syntax::ast::StructField_>` has no field named `ty`
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:86             ty: ty,
                                                                                                   ^~
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:87:13: 87:18 error: structure `syntax::codemap::Spanned<syntax::ast::StructField_>` has no field named `attrs`
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:87             attrs: self.attrs,
                                                                                                   ^~~~~
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:87:13: 87:18 help: did you mean `node`?
/home/aistis/.cargo/git/checkouts/aster-4c75eb7d7c934181/master/src/struct_field.rs:87             attrs: self.attrs,

Breakage with recent nightly

alexbool@alexbool-osx ~/D/I/aster> rustup show
nightly-2016-04-25-x86_64-apple-darwin (default toolchain)
alexbool@alexbool-osx ~/D/I/aster> cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling aster v0.15.0 (file:///Users/alexbool/Documents/IdeaProjects/aster)
src/item.rs:114:30: 114:60 error: failed to resolve. Could not find `special_idents` in `syntax::parse::token` [E0433]
src/item.rs:114         self.build_item_kind(token::special_idents::invalid, item)
                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/item.rs:114:30: 114:60 help: run `rustc --explain E0433` to see a detailed explanation
src/item.rs:1183:38: 1183:68 error: failed to resolve. Could not find `special_idents` in `syntax::parse::token` [E0433]
src/item.rs:1183         self.builder.build_item_kind(token::special_idents::invalid, ty_)
                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/item.rs:1183:38: 1183:68 help: run `rustc --explain E0433` to see a detailed explanation
src/generics.rs:60:48: 60:57 error: no method named `move_iter` found for type `syntax::ptr::P<[syntax::ast::TyParam]>` in the current scope
src/generics.rs:60             .with_ty_params(generics.ty_params.move_iter())
                                                                  ^~~~~~~~~
src/generics.rs:203:31: 203:39 error: no associated item named `empty` found for type `syntax::ptr::P<_>` in the current scope
src/generics.rs:203             ty_param.bounds = P::empty();
                                                  ^~~~~~~~
error: aborting due to 2 previous errors
error: Could not compile `aster`.

To learn more, run the command again with --verbose.

ArrayTyBuilder?

When rewriting bindgen I got shocked this didn't exist.

I implemented a basic version over here, but a more complete solution would be appreciated.

I can try to take time to make a PR soon-ish, but I can't promise anything :)

Update for specialization

ast::TraitImpl has a new field, defaultness.

    pub defaultness: Defaultness 

There's a new enum ast::Defaultness.

pub enum Defaultness {
    Default,
    Final,
}

Broken on 1.11.0-nightly (5522e678b 2016-06-20)

Due to the removal of GatedCfgAttr in rust-lang/rust#34272.

   Compiling aster v0.18.0
error: unresolved import `syntax::feature_gate::GatedCfgAttr`. There is no `GatedCfgAttr` in `syntax::feature_gate`. Did you mean to use `GatedCfg`? [--explain E0432]
 --> src/mac.rs:6:5
  |>
6 |> use syntax::feature_gate::GatedCfgAttr;
  |>     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: this function takes 4 parameters but 5 parameters were supplied [--explain E0061]
   --> src/mac.rs:113:18
    |>
113 |>     let mut cx = ExtCtxt::new(sess, cfg, ecfg, feature_gated_cfgs, macro_loader);
    |>                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: the following parameter types were expected: &syntax::parse::ParseSess, std::vec::Vec<syntax::ptr::P<syntax::codemap::Spanned<syntax::ast::MetaItemKind>>>, syntax::ext::expand::ExpansionConfig<'_>, &mut syntax::ext::base::MacroLoader

error: aborting due to previous error
error: Could not compile `aster`.

For some reason the nightli.es build 11 hours ago ran with rustc 1.11.0-nightly (bb4a79b08 2016-06-15)... possibly related to serde-deprecated/syntex#76 (comment).

Breakage with recent nightly

[ aster]$ rustup show
active toolchain
----------------
nightly-x86_64-unknown-linux-gnu (default)
rustc 1.10.0-nightly (7bddce693 2016-05-27)

[ aster]$ cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling aster v0.16.0 (file:///home/svmnotn/data/dev/rand/aster)
src/expr.rs:1387:65: 1387:75 error: mismatched types [E0308]
src/expr.rs:1387         self.builder.build_expr_kind(ast::ExprKind::Loop(block, self.label))
                                                                                 ^~~~~~~~~~
src/expr.rs:1387:65: 1387:75 help: run `rustc --explain E0308` to see a detailed explanation
src/expr.rs:1387:65: 1387:75 note: expected type `std::option::Option<syntax::codemap::Spanned<syntax::ast::Ident>>`
src/expr.rs:1387:65: 1387:75 note:    found type `std::option::Option<syntax::ast::Ident>`
src/method.rs:43:45: 43:66 error: no associated item named `Static` found for type `syntax::ast::SelfKind` in the current scope
src/method.rs:43             explicit_self: respan(DUMMY_SP, ast::SelfKind::Static),
                                                             ^~~~~~~~~~~~~~~~~~~~~
src/method.rs:90:13: 90:34 error: no associated item named `Static` found for type `syntax::ast::SelfKind` in the current scope
src/method.rs:90             ast::SelfKind::Static => { }
                             ^~~~~~~~~~~~~~~~~~~~~
src/method.rs:92:15: 92:46 error: this pattern has 3 fields, but the corresponding variant has 2 fields [E0023]
src/method.rs:92             | ast::SelfKind::Region(_, _, id)
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/method.rs:92:15: 92:46 help: run `rustc --explain E0023` to see a detailed explanation
src/method.rs:95:31: 95:49 error: no associated item named `new_self` found for type `syntax::ast::Arg` in the current scope
src/method.rs:95                     let arg = ast::Arg::new_self(self.span, self.self_mutable, id);
                                               ^~~~~~~~~~~~~~~~~~
src/method.rs:108:13: 108:26 error: structure `syntax::ast::MethodSig` has no field named `explicit_self`
src/method.rs:108             explicit_self: self.explicit_self,
                              ^~~~~~~~~~~~~
src/method.rs:192:30: 192:51 error: no associated item named `Static` found for type `syntax::ast::SelfKind` in the current scope
src/method.rs:192         self.build_self_kind(ast::SelfKind::Static)
                                               ^~~~~~~~~~~~~~~~~~~~~
src/method.rs:196:30: 196:51 error: no associated item named `Static` found for type `syntax::ast::SelfKind` in the current scope
src/method.rs:196         self.build_self_kind(ast::SelfKind::Static)
                                               ^~~~~~~~~~~~~~~~~~~~~
src/method.rs:200:51: 200:68 error: mismatched types [E0308]
src/method.rs:200         self.build_self_kind(ast::SelfKind::Value("self".to_ident()))
                                                                    ^~~~~~~~~~~~~~~~~
src/method.rs:200:51: 200:68 help: run `rustc --explain E0308` to see a detailed explanation
src/method.rs:200:51: 200:68 note: expected type `syntax::ast::Mutability`
src/method.rs:200:51: 200:68 note:    found type `syntax::ast::Ident`
src/method.rs:204:30: 208:10 error: this function takes 2 parameters but 3 parameters were supplied [E0061]
src/method.rs:204         self.build_self_kind(ast::SelfKind::Region(
                                               ^
src/method.rs:204:30: 208:10 help: run `rustc --explain E0061` to see a detailed explanation
src/method.rs:214:30: 218:10 error: this function takes 2 parameters but 3 parameters were supplied [E0061]
src/method.rs:214         self.build_self_kind(ast::SelfKind::Region(
                                               ^
src/method.rs:214:30: 218:10 help: run `rustc --explain E0061` to see a detailed explanation
src/method.rs:222:30: 226:10 error: this function takes 2 parameters but 3 parameters were supplied [E0061]
src/method.rs:222         self.build_self_kind(ast::SelfKind::Region(
                                               ^
src/method.rs:222:30: 226:10 help: run `rustc --explain E0061` to see a detailed explanation
src/method.rs:232:30: 236:10 error: this function takes 2 parameters but 3 parameters were supplied [E0061]
src/method.rs:232         self.build_self_kind(ast::SelfKind::Region(
                                               ^
src/method.rs:232:30: 236:10 help: run `rustc --explain E0061` to see a detailed explanation
src/method.rs:250:58: 250:75 error: mismatched types [E0308]
src/method.rs:250         self.build_self_kind(ast::SelfKind::Explicit(ty, "self".to_ident()))
                                                                           ^~~~~~~~~~~~~~~~~
src/method.rs:250:58: 250:75 help: run `rustc --explain E0308` to see a detailed explanation
src/method.rs:250:58: 250:75 note: expected type `syntax::ast::Mutability`
src/method.rs:250:58: 250:75 note:    found type `syntax::ast::Ident`
src/pat.rs:248:37: 248:90 error: this function takes 3 parameters but 2 parameters were supplied [E0061]
src/pat.rs:248         self.builder.build_pat_kind(ast::PatKind::TupleStruct(self.path, Some(self.pats)))
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pat.rs:248:37: 248:90 help: run `rustc --explain E0061` to see a detailed explanation
src/pat.rs:423:37: 423:54 error: no associated item named `Tup` found for type `syntax::ast::PatKind` in the current scope
src/pat.rs:423         self.builder.build_pat_kind(ast::PatKind::Tup(self.pats))

Make clippy a dev-dependency

I'm assuming clippy is marked as a dependency because it's used by developers. For downstream consumers of the library like quasi_codegen, it causes unnecessary breakage due to unstable APIs.

Can't compile 0.18.0 on nightly

 "aster 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ...
 "serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
 "serde_json 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "serde_macros 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
 "syntex 0.35.0 (registry+https://github.com/rust-lang/crates.io-index)",
/Users/giovanni/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.18.0/src/mac.rs:3:25: 3:41 error: unresolved import `syntax::ext::base::DummyMacroLoader`. There is no `DummyMacroLoader` in `syntax::ext::base` [E0432]
/Users/giovanni/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.18.0/src/mac.rs:3 use syntax::ext::base::{DummyMacroLoader, ExtCtxt};
                                                                                                                  ^~~~~~~~~~~~~~~~
/Users/giovanni/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.18.0/src/mac.rs:3:25: 3:41 help: run `rustc --explain E0432` to see a detailed explanation
/Users/giovanni/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.18.0/src/mac.rs:113:18: 113:81 error: this function takes 4 parameters but 5 parameters were supplied [E0061]
/Users/giovanni/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.18.0/src/mac.rs:113     let mut cx = ExtCtxt::new(sess, cfg, ecfg, feature_gated_cfgs, macro_loader);
                                                                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/giovanni/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.18.0/src/mac.rs:113:18: 113:81 help: run `rustc --explain E0061` to see a detailed explanation
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
error: Could not compile `aster`.

Does not compile for 1.13.0-nightly (5531c314a 2016-09-12)

0.29.0 currently does not compile with 1.13.0-nightly (5531c314a 2016-09-12).

error[E0432]: unresolved import `syntax::ext::base::DummyResolver`
 --> /home/my_user/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.29.0/src/mac.rs:3:25
  |
3 | use syntax::ext::base::{DummyResolver, ExtCtxt};
  |                         ^^^^^^^^^^^^^ no `DummyResolver` in `syntax::ext::base`. Did you mean to use `DummyResult`?

error: aborting due to previous error

error: Could not compile `aster`.

with

rustc 1.13.0-nightly (5531c314a 2016-09-12)
binary: rustc
commit-hash: 5531c314a2855aec368e811da6fcd9e98365af51
commit-date: 2016-09-12
host: x86_64-unknown-linux-gnu
release: 1.13.0-nightly

Does not build on nightly due to mismatched versions for 'log'

coreyf@frewbook-pro ~/D/r/aster (master)> cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
failed to select a version for `log` (required by `syntex_syntax`):
all possible versions conflict with previously selected versions of `log`
  version 0.3.2 in use by log v0.3.2
  possible versions to select: 0.3.4, 0.3.3
coreyf@frewbook-pro ~/D/r/aster (master) [101]> rustc -Vv
rustc 1.6.0-nightly (d49e36552 2015-12-05)
binary: rustc
commit-hash: d49e365528e026df6f56fe5eb001e81e2383fbf5
commit-date: 2015-12-05
host: x86_64-apple-darwin
release: 1.6.0-nightly

seems like nighly broke aster again

This is on latest nightly, aster 0.4.6.

rustc 1.5.0-nightly (f93ab64d4 2015-09-21)

mac.rs:56:19: 56:40 error: no associated item named `MacInvocTT` found for type `syntax::ast::Mac_` in the current scope

Build errors with current libsyntax nightly

A recent pull request in rust nightly introduced some changes to libsyntax causing build errors in aster. The ast::Ident constructor now takes two arguments instead of one. I'm not trying to fix this and create a PR because of my inexperience with libsyntax.

rustc 1.5.0-dev (90c04d036 2015-09-27)

Does not build on nightly

coreyf@frewbook-pro ~/D/r/aster (master) [101]> rustc -Vv
rustc 1.5.0-nightly (eafe106ef 2015-10-15)
binary: rustc
commit-hash: eafe106ef3dcf35b05edc2fb7c835ea83431fd34
commit-date: 2015-10-15
host: x86_64-apple-darwin
release: 1.5.0-nightly
coreyf@frewbook-pro ~/D/r/aster (master)> cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling aster v0.4.10 (file:///Users/coreyf/Development/rust/aster)
src/item.rs:462:18: 462:32 error: use of undeclared type name `ast::StructDef` [E0412]
src/item.rs:462 impl<F> Invoke<P<ast::StructDef>> for ItemStructBuilder<F>
                                 ^~~~~~~~~~~~~~
src/item.rs:462:18: 462:32 help: run `rustc --explain E0412` to see a detailed explanation
src/item.rs:467:35: 467:49 error: use of undeclared type name `ast::StructDef` [E0412]
src/item.rs:467     fn invoke(self, struct_def: P<ast::StructDef>) -> F::Result {
                                                  ^~~~~~~~~~~~~~
src/item.rs:467:35: 467:49 help: run `rustc --explain E0412` to see a detailed explanation
src/item.rs:508:26: 508:40 error: `ast::StructDef` does not name a structure [E0422]
src/item.rs:508         let struct_def = ast::StructDef {
                                         ^~~~~~~~~~~~~~
src/item.rs:508:26: 508:40 help: run `rustc --explain E0422` to see a detailed explanation
src/struct_def.rs:25:23: 25:37 error: use of undeclared type name `ast::StructDef` [E0412]
src/struct_def.rs:25     where F: Invoke<P<ast::StructDef>>
                                           ^~~~~~~~~~~~~~
src/struct_def.rs:25:23: 25:37 help: run `rustc --explain E0412` to see a detailed explanation
src/struct_def.rs:60:32: 60:46 error: `ast::StructDef` does not name a structure [E0422]
src/struct_def.rs:60         self.callback.invoke(P(ast::StructDef {
                                                    ^~~~~~~~~~~~~~
src/struct_def.rs:60:32: 60:46 help: run `rustc --explain E0422` to see a detailed explanation
src/struct_def.rs:68:23: 68:37 error: use of undeclared type name `ast::StructDef` [E0412]
src/struct_def.rs:68     where F: Invoke<P<ast::StructDef>>,
                                           ^~~~~~~~~~~~~~
src/struct_def.rs:68:23: 68:37 help: run `rustc --explain E0412` to see a detailed explanation
src/variant.rs:67:43: 67:59 error: use of undeclared type name `ast::VariantKind` [E0412]
src/variant.rs:67     pub fn build_variant_kind(self, kind: ast::VariantKind) -> F::Result {
                                                            ^~~~~~~~~~~~~~~~
src/variant.rs:67:43: 67:59 help: run `rustc --explain E0412` to see a detailed explanation
src/variant.rs:104:15: 104:30 error: use of undeclared type name `ast::VariantArg` [E0412]
src/variant.rs:104     args: Vec<ast::VariantArg>,
                                 ^~~~~~~~~~~~~~~
src/variant.rs:104:15: 104:30 help: run `rustc --explain E0412` to see a detailed explanation
src/variant.rs:120:24: 120:39 error: `ast::VariantArg` does not name a structure [E0422]
src/variant.rs:120         self.args.push(ast::VariantArg {
                                          ^~~~~~~~~~~~~~~
src/variant.rs:120:24: 120:39 help: run `rustc --explain E0422` to see a detailed explanation
src/variant.rs:132:20: 132:41 error: unresolved name `ast::TupleVariantKind` [E0425]
src/variant.rs:132         let kind = ast::TupleVariantKind(self.args);
                                      ^~~~~~~~~~~~~~~~~~~~~
src/variant.rs:132:20: 132:41 help: run `rustc --explain E0425` to see a detailed explanation
src/variant.rs:173:18: 173:32 error: use of undeclared type name `ast::StructDef` [E0412]
src/variant.rs:173 impl<F> Invoke<P<ast::StructDef>> for VariantStructBuilder<F>
                                    ^~~~~~~~~~~~~~
src/variant.rs:173:18: 173:32 help: run `rustc --explain E0412` to see a detailed explanation
src/variant.rs:178:35: 178:49 error: use of undeclared type name `ast::StructDef` [E0412]
src/variant.rs:178     fn invoke(self, struct_def: P<ast::StructDef>) -> F::Result {
                                                     ^~~~~~~~~~~~~~
src/variant.rs:178:35: 178:49 help: run `rustc --explain E0412` to see a detailed explanation
src/variant.rs:179:20: 179:42 error: unresolved name `ast::StructVariantKind` [E0425]
src/variant.rs:179         let kind = ast::StructVariantKind(struct_def);
                                      ^~~~~~~~~~~~~~~~~~~~~~
src/variant.rs:179:20: 179:42 help: run `rustc --explain E0425` to see a detailed explanation
error: aborting due to 13 previous errors
Could not compile `aster`.

To learn more, run the command again with --verbose.

Aster no longer builds on nightly rust

cargo build output:

   Compiling aster v0.18.0 (file:///tmp/aster)
src/mac.rs:3:25: 3:41 error: unresolved import `syntax::ext::base::DummyMacroLoader`. There is no `DummyMacroLoader` in `syntax::ext::base` [E0432]
src/mac.rs:3 use syntax::ext::base::{DummyMacroLoader, ExtCtxt};
                                     ^~~~~~~~~~~~~~~~
src/mac.rs:3:25: 3:41 help: run `rustc --explain E0432` to see a detailed explanation
src/mac.rs:113:18: 113:81 error: this function takes 4 parameters but 5 parameters were supplied [E0061]
src/mac.rs:113     let mut cx = ExtCtxt::new(sess, cfg, ecfg, feature_gated_cfgs, macro_loader);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/mac.rs:113:18: 113:81 help: run `rustc --explain E0061` to see a detailed explanation
error: aborting due to previous error
error: Could not compile `aster`.

To learn more, run the command again with --verbose.

build is broken

Just a FYI - aster stopped compiling for me today. I'm not sure why exactly because I didn't use multirust to update my rust environment.

I'm unable to work in Rust atm until I find a workaround.
I should probably be using Cargo.lock better...

I just upgraded to the latest rust nightly-2015-10-27 and I still get errors like:

src/item.rs:473:39: 473:43 error: mismatched types:
expected syntax::ast::VariantData,
found syntax::ptr::P<syntax::ast::VariantData>
(expected enum syntax::ast::VariantData,
found struct syntax::ptr::P) [E0308]
src/item.rs:473 let struct_ = ast::ItemStruct(data, self.generics);

etc...

Fails to build on nightly

$ cargo build
   Compiling aster v0.4.0
src/item.rs:387:44: 389:10 error: missing field: `rename` [E0063]
src/item.rs:387         self.idents.push(respan(self.span, ast::PathListMod {
src/item.rs:388             id: ast::DUMMY_NODE_ID,
src/item.rs:389         }));
src/item.rs:387:44: 389:10 help: run `rustc --explain E0063` to see a detailed explanation
src/item.rs:396:44: 399:10 error: missing field: `rename` [E0063]
src/item.rs:396         self.idents.push(respan(self.span, ast::PathListIdent {
src/item.rs:397             name: id.to_ident(),
src/item.rs:398             id: ast::DUMMY_NODE_ID,
src/item.rs:399         }));
src/item.rs:396:44: 399:10 help: run `rustc --explain E0063` to see a detailed explanation
error: aborting due to 2 previous errors
Could not compile `aster`.

To learn more, run the command again with --verbose
$ cargo version
cargo 0.4.0-nightly (c033770 2015-08-09) (built 2015-08-09)
$ rustc --version
rustc 1.4.0-nightly (5aca49c69 2015-08-10)

It worked the day before yesterday (8/9), so its a recent break.

0.4.1 does no longer compile on latest nightly

This is on Mac OS X.

$ cargo build                                                                                      
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling aster v0.4.1 (file:///private/tmp/rust-aster)
src/mac.rs:106:18: 106:48 error: this function takes 4 parameters but 3 parameters were supplied [E0061]
src/mac.rs:106     let mut cx = ExtCtxt::new(&sess, cfg, ecfg);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/mac.rs:106:18: 106:48 help: run `rustc --explain E0061` to see a detailed explanation
error: aborting due to previous error
Could not compile `aster`.
$ rustc --version                                                                                                            
rustc 1.4.0-nightly (e35fd7481 2015-08-17)

Fails to build on stable with syntex 0.7.0

Since syntex and syntex_syntax have been upgraded to 0.7.0 today, aster fails to build on stable. It gives the following error:

src/item.rs:245:43: 251:10 error: this function takes 6 parameters but 5 parameters were supplied [E0061]
src/item.rs:245         self.builder.build_item_(self.id, ast::Item_::ItemFn(
src/item.rs:246             self.fn_decl,
src/item.rs:247             self.unsafety,
src/item.rs:248             self.abi,
src/item.rs:249             self.generics,
src/item.rs:250             block,
                                                                                                                  ...
src/method.rs:161:26: 167:10 error: missing field: `constness` [E0063]
src/method.rs:161         let method_sig = ast::MethodSig {
src/method.rs:162             unsafety: self.builder.unsafety,
src/method.rs:163             abi: self.builder.abi,
src/method.rs:164             decl: self.fn_decl,
src/method.rs:165             generics: self.builder.generics,
src/method.rs:166             explicit_self: self.explicit_self,
                                                                                                                    ...
error: aborting due to 2 previous errors

The current version of aster depends of syntex_syntax >= 0.6.0 but it obviously shouldn't...
I tried to manually require syntex and syntex_syntax 0.6.0 in my Cargo.toml but it doesn't help. Both quasi and aster continue to pull 0.7.0.

compile issue with nightly

...\aster-0.13.1\src\item.rs:1350:20: 1357:10 error: missing field defaultness in initializer of syntax::ast::ImplItem [E0063]
...\aster-0.13.1\src\item.rs:1350 let item = ast::ImplItem {
...\aster-0.13.1\src\item.rs:1351 id: ast::DUMMY_NODE_ID,
...\aster-0.13.1\src\item.rs:1352 ident: self.id,
...\aster-0.13.1\src\item.rs:1353 vis: self.vis,
...\aster-0.13.1\src\item.rs:1354 attrs: self.attrs,
...\aster-0.13.1\src\item.rs:1355 node: node,
... ...
...\aster-0.13.1\src\item.rs:1350:20: 1357:10 help: run rustc --explain E0063 to see a detailed explanation

Does not compile with rustc 1.13.0-nightly (1265cbf4e 2016-09-15)

error[E0432]: unresolved import `syntax::ext::base::DummyMacroLoader`
 --> /Users/alexbool/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.26.1/src/mac.rs:3:25
  |
3 | use syntax::ext::base::{DummyMacroLoader, ExtCtxt};
  |                         ^^^^^^^^^^^^^^^^ no `DummyMacroLoader` in `syntax::ext::base`

$ rustc -vV
rustc 1.13.0-nightly (1265cbf4e 2016-09-15)
binary: rustc
commit-hash: 1265cbf4e05628c98f51afebe0b662c451173faa
commit-date: 2016-09-15
host: x86_64-apple-darwin
release: 1.13.0-nightly

Needs serde release as well as I suppose...

Not Compiling Against 1.7.0-Nightly

I'm having issues with compiling aster 1.9.1 on the latest rust nightly. It looks like a couple of missing bits. It does work on the 1.6.0-nightly.

I'm not actually depending on aster directly, just through serde.

rustc 1.7.0-nightly (42c3ef8f9 2015-12-22)
/home/ashley/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.1/src/fn_decl.rs:152:21: 152:37 error: unresolved name `ast::BindByValue` [E0425]
/home/ashley/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.1/src/fn_decl.rs:152                     ast::BindByValue(ast::Mutability::MutImmutable),

/home/ashley/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.1/src/fn_decl.rs:152:21: 152:37 help: run `rustc --explain E0425` to see a detailed explanation
/home/ashley/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.1/src/pat.rs:70:20: 70:49 error: no associated item named `BindByValue` found for type `syntax::ast::BindingMode` in the current scope
/home/ashley/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.1/src/pat.rs:70         let mode = ast::BindingMode::BindByValue(ast::Mutability::MutImmutable);

/home/ashley/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.1/src/pat.rs:77:20: 77:49 error: no associated item named `BindByValue` found for type `syntax::ast::BindingMode` in the current scope
/home/ashley/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.1/src/pat.rs:77         let mode = ast::BindingMode::BindByValue(ast::Mutability::MutMutable);

/home/ashley/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.1/src/pat.rs:84:20: 84:47 error: no associated item named `BindByRef` found for type `syntax::ast::BindingMode` in the current scope
/home/ashley/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.1/src/pat.rs:84         let mode = ast::BindingMode::BindByRef(ast::Mutability::MutImmutable);

/home/ashley/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.1/src/pat.rs:91:20: 91:47 error: no associated item named `BindByRef` found for type `syntax::ast::BindingMode` in the current scope
/home/ashley/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.1/src/pat.rs:91         let mode = ast::BindingMode::BindByRef(ast::Mutability::MutMutable);

Issues compiling on 1.7.0-nightly

Hi, I'm seeing issues building this on the latest nightly

rustc -vV rustc 1.7.0-nightly (8ad12c3e2 2015-12-19) binary: rustc commit-hash: 8ad12c3e251df6b8ed42b4d32709f4f55470a0be commit-date: 2015-12-19 host: x86_64-apple-darwin release: 1.7.0-nightly

/Users/nick/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.2/src/fn_decl.rs:152:21: 152:46 error: no associated item named `ByValue` found for type `syntax::ast::BindingMode` in the current scope
/Users/nick/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.2/src/fn_decl.rs:152                     ast::BindingMode::ByValue(ast::Mutability::MutImmutable),
                                                                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/nick/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.2/src/pat.rs:70:20: 70:45 error: no associated item named `ByValue` found for type `syntax::ast::BindingMode` in the current scope
/Users/nick/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.2/src/pat.rs:70         let mode = ast::BindingMode::ByValue(ast::Mutability::MutImmutable);
                                                                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/nick/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.2/src/pat.rs:77:20: 77:45 error: no associated item named `ByValue` found for type `syntax::ast::BindingMode` in the current scope
/Users/nick/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.2/src/pat.rs:77         let mode = ast::BindingMode::ByValue(ast::Mutability::MutMutable);
                                                                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/nick/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.2/src/pat.rs:84:20: 84:43 error: no associated item named `ByRef` found for type `syntax::ast::BindingMode` in the current scope
/Users/nick/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.2/src/pat.rs:84         let mode = ast::BindingMode::ByRef(ast::Mutability::MutImmutable);
                                                                                                         ^~~~~~~~~~~~~~~~~~~~~~~
/Users/nick/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.2/src/pat.rs:91:20: 91:43 error: no associated item named `ByRef` found for type `syntax::ast::BindingMode` in the current scope
/Users/nick/.cargo/registry/src/github.com-88ac128001ac3a9a/aster-0.9.2/src/pat.rs:91         let mode = ast::BindingMode::ByRef(ast::Mutability::MutMutable);
                                                                                                         ^~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 5 previous errors
Could not compile `aster`.

Thanks

0.4.3 Doesn't compile on latest nightly

/aster-0.4.3/src/mac.rs:6:5: 6:35 error: unresolved import `syntax::feature_gate::GatedCfg`. There is no `GatedCfg` in `syntax::feature_gate` [E0432]

I'm confused since I can definitely see GatedCfg in nightly source!

Does not compile on nightly rust

coreyf@frewbook-pro ~/D/r/aster (master)> rustc -Vv
rustc 1.7.0-nightly (42c3ef8f9 2015-12-22)
binary: rustc
commit-hash: 42c3ef8f9fd4b0dd1f881c49323bad456163f202
commit-date: 2015-12-22
host: x86_64-apple-darwin
release: 1.7.0-nightly
coreyf@frewbook-pro ~/D/r/aster (master)> cargo build
   Compiling aster v0.9.1 (file:///Users/coreyf/Development/rust/aster)
src/fn_decl.rs:152:21: 152:37 error: unresolved name `ast::BindByValue` [E0425]
src/fn_decl.rs:152                     ast::BindByValue(ast::Mutability::MutImmutable),
                                       ^~~~~~~~~~~~~~~~
src/fn_decl.rs:152:21: 152:37 help: run `rustc --explain E0425` to see a detailed explanation
src/pat.rs:70:20: 70:49 error: no associated item named `BindByValue` found for type `syntax::ast::BindingMode` in the current scope
src/pat.rs:70         let mode = ast::BindingMode::BindByValue(ast::Mutability::MutImmutable);
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pat.rs:77:20: 77:49 error: no associated item named `BindByValue` found for type `syntax::ast::BindingMode` in the current scope
src/pat.rs:77         let mode = ast::BindingMode::BindByValue(ast::Mutability::MutMutable);
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pat.rs:84:20: 84:47 error: no associated item named `BindByRef` found for type `syntax::ast::BindingMode` in the current scope
src/pat.rs:84         let mode = ast::BindingMode::BindByRef(ast::Mutability::MutImmutable);
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pat.rs:91:20: 91:47 error: no associated item named `BindByRef` found for type `syntax::ast::BindingMode` in the current scope
src/pat.rs:91         let mode = ast::BindingMode::BindByRef(ast::Mutability::MutMutable);
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 5 previous errors
Could not compile `aster`.

To learn more, run the command again with --verbose.

API consistency

Builder interfaces already have many regularities. Here's what can be done to make them more regular.

  • fn new_with_callback
    • Should be renamed to with_callback.
    • Sometimes takes additional arguments.
  • Invoking sometimes implicitly finishes building. E.g. building continues when an expr is built for ConstBuilder, but building ends when a type is built.
  • fn build sometimes takes additional arguments.
  • All use of To... traits can be replaced with std::convert::Into.

v0.4.3 fails to build with nightly 2015-08-28

/home/cody/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.4.3/src/mac.rs:99:13: 99:17 error: structure `syntax::codemap::NameAndSpan` has no field named `name`
/home/cody/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.4.3/src/mac.rs:99             name: "test".to_string(),
                                                                                                                              ^~~~
/home/cody/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.4.3/src/mac.rs:100:21: 100:44 error: mismatched types:
 expected `syntax::codemap::ExpnFormat`,
    found `fn(syntax::ast::Name) -> syntax::codemap::ExpnFormat {syntax::codemap::ExpnFormat::MacroAttribute}`
(expected enum `syntax::codemap::ExpnFormat`,
    found fn item) [E0308]
/home/cody/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.4.3/src/mac.rs:100             format: codemap::MacroAttribute,
                                                                                                                                       ^~~~~~~~~~~~~~~~~~~~~~~
/home/cody/.multirust/toolchains/nightly/cargo/registry/src/github.com-0a35038f75765ae4/aster-0.4.3/src/mac.rs:100:21: 100:44 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to 2 previous errors
Could not compile `aster`.

Does not compile on rustc 1.15.0-nightly (43006fcea 2016-11-15)

error[E0308]: mismatched types
    --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.33.1/src/expr.rs:2064:92
     |
2064 |         self.builder.build_expr_kind(ast::ExprKind::Closure(self.capture_by, self.fn_decl, block, self.span))
     |                                                                                            ^^^^^ expected struct `syntax::ast::Expr`, found struct `syntax::ast::Block`
     |
     = note: expected type `syntax::ptr::P<syntax::ast::Expr>`
     = note:    found type `syntax::ptr::P<syntax::ast::Block>`

Breakage with recent nightly

/Users/alexbool/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.17.0/src/mac.rs:112:18: 112:67 error: this function takes 5 parameters but 4 parameters were supplied [E0061]
/Users/alexbool/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.17.0/src/mac.rs:112     let mut cx = ExtCtxt::new(sess, cfg, ecfg, feature_gated_cfgs);
                                                                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/alexbool/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.17.0/src/mac.rs:112:18: 112:67 help: run `rustc --explain E0061` to see a detailed explanation
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
rustc 1.11.0-nightly (7d2f75a95 2016-06-09)
binary: rustc
commit-hash: 7d2f75a953b5645d3a336b2978b48b60d310bf54
commit-date: 2016-06-09
host: x86_64-apple-darwin
release: 1.11.0-nightly

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.