Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error[E0557]: feature has been removed #148

Open
jyn514 opened this issue Jun 13, 2019 · 3 comments
Open

error[E0557]: feature has been removed #148

jyn514 opened this issue Jun 13, 2019 · 3 comments

Comments

@jyn514
Copy link

jyn514 commented Jun 13, 2019

When I try to run cargo +nightly test, I get a whole slew of errors:

error[E0557]: feature has been removed
 --> /home/joshua/.cargo/registry/src/github.com-1ecc6299db9ec823/mutagen-plugin-0.1.2/src/lib.rs:1:30
  |
1 | #![feature(plugin_registrar, quote, rustc_private, custom_attribute)]
  |                              ^^^^^ feature has been removed

 error[E0432]: unresolved imports `syntax::fold`, `syntax::fold`
  --> /home/joshua/.cargo/registry/src/github.com-1ecc6299db9ec823/mutagen-plugin-0.1.2/src/lib.rs:23:20
   |
23 | use syntax::fold::{self, Folder, ExpectOne};
   |             ^^^^   ^^^^ no `fold` in the root
   |             |
   |             could not find `fold` in `syntax`

error: cannot find macro `quote_expr!` in this scope
   --> /home/joshua/.cargo/registry/src/github.com-1ecc6299db9ec823/mutagen-plugin-0.1.2/src/lib.rs:431:42
    |
431 |                 let mut mut_expression = quote_expr!(self.cx(), $lit);
    |                                          ^^^^^^^^^^

...
error[E0412]: cannot find type `TypeBinding` in this scope
    --> /home/joshua/.cargo/registry/src/github.com-1ecc6299db9ec823/mutagen-plugin-0.1.2/src/lib.rs:1240:26
     |
1240 | fn ty_bindings_equal(a: &TypeBinding, b: &TypeBinding, inout: bool) -> bool {
     |                          ^^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `TypeBinding` in this scope
    --> /home/joshua/.cargo/registry/src/github.com-1ecc6299db9ec823/mutagen-plugin-0.1.2/src/lib.rs:1240:43
     |
1240 | fn ty_bindings_equal(a: &TypeBinding, b: &TypeBinding, inout: bool) -> bool {
     |                                           ^^^^^^^^^^^ not found in this scope

error: aborting due to 48 previous errors

Some errors have detailed explanations: E0412, E0432, E0557.
For more information about an error, try `rustc --explain E0412`.
error: Could not compile `mutagen-plugin`.

cargo +nightly --version: cargo 1.37.0-nightly (545f35425 2019-05-23)
rustup run nightly rustc --version: rustc 1.37.0-nightly (d132f544f 2019-06-07)
mutagen-plugin version: v0.1.2

My code in src/main.rs:

#![cfg_attr(test, feature(plugin))]
#![cfg_attr(test, plugin(mutagen_plugin))]
#![feature(custom_attribute)]

#[cfg(test)]
extern crate mutagen;

pub mod lex;
// more code follows

My code in src/lex.rs:

#[cfg_attr(test, mutate)]
// lots of code
@jyn514
Copy link
Author

jyn514 commented Jun 13, 2019

Hmm, I cloned the repo and ran cargo +nightly build and it works fine from there. Not sure why it behaves different when used in a library. I was compiling mutagen, not mutagen-plugin. The plugin shows the same errors.

@jyn514
Copy link
Author

jyn514 commented Jun 13, 2019

https://stackoverflow.com/questions/25561137/how-to-write-a-custom-attribute-that-injects-code-into-a-function#25563608 suggests using the syntax crate instead, not sure if that's a workable solution.

@llogiq
Copy link
Owner

llogiq commented Jun 17, 2019

I have an unfinished rewrite using the syn and quote crates, but stopped working on it due to some architectural discussions with @power-fungus that have not yet been resolved. Guess I should resume working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants