error[E0557]: feature has been removed
--> C:\Users\yknomeh\.cargo\git\checkouts\pear-000cd7c33a1ee164\b475140\lib\src\lib.rs:2:12
|
2 | #![feature(proc_macro_non_items, use_extern_macros)]
| ^^^^^^^^^^^^^^^^^^^^
|
note: subsumed by `#![feature(proc_macro_hygiene)]`
--> C:\Users\yknomeh\.cargo\git\checkouts\pear-000cd7c33a1ee164\b475140\lib\src\lib.rs:2:12
|
2 | #![feature(proc_macro_non_items, use_extern_macros)]
| ^^^^^^^^^^^^^^^^^^^^
error[E0658]: procedural macros cannot be expanded to statements (see issue #54727)
--> C:\Users\yknomeh\.cargo\git\checkouts\pear-000cd7c33a1ee164\b475140\lib\src\parsers.rs:296:9
|
296 | / switch! { [collection; input]
297 | | eat(end) => break,
298 | | eat(seperator) => continue,
299 | | _ => collection.add(item()?)
300 | | }
| |_________^
|
= help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable
error: aborting due to 2 previous errors
Some errors occurred: E0557, E0658.
For more information about an error, try `rustc --explain E0557`.
error: Could not compile `pear`.
warning: build failed, waiting for other jobs to finish...
error: build failed
I was having the same issue, and implemented a fix for this. I did submit a pull request for the first part of the fix, but it was rejected because SergioBenitez was already working on a fix locally with an official 0.4 release. See here: https://github.com/SergioBenitez/Rocket/pull/789
In the mean time you may switch to my personal fork which includes this fix for the v0.4-preview branch, it is located here: https://github.com/timvisee/Rocket/tree/v0.4-preview-pear-fix
To temporarily switch you can add the following to your Cargo.toml:
[patch.crates-io.rocket]
git = "https://github.com/timvisee/Rocket"
rev = "c5fdd06"
Note that you might have to do the same for other dependencies such as rocket_contrib.
Be sure to remove the patch once SergioBenitez releases the official 0.4 version. :smile:
Thanks for this Tim! Had the same issue, and your personal fork fixed it.
Fixed in master.
@SergioBenitez Awesome, thank you!
I'm having problems using it though (as I'm currently using the v0.4-preview branch). The static_files feature seems to be missing from the current master branch.
Can these new changes be merged into the v0.4-preview branch to allow me to keep using it with the issues fixed, or am I missing something regarding the static files in the current master branch?
@timvisee It's now called "serve".