A Rust library for devising derives and other procedural macros.
sergiobenitez / devise Goto Github PK
View Code? Open in Web Editor NEWLibrary for devising derives and other procedural macros.
Library for devising derives and other procedural macros.
When generating docs for my Rocket project, Cargo bails out while trying to document the devise
crate:
Documenting devise v0.2.0
error[E0275]: overflow evaluating the requirement `alloc::raw_vec::RawVec<(devise_core::syn::Lifetime, devise_core::syn::token::Add)>: std::marker::Unpin`
|
= help: consider adding a `#![recursion_limit="128"]` attribute to your crate
= note: required because it appears within the type `std::vec::Vec<(devise_core::syn::Lifetime, devise_core::syn::token::Add)>`
= note: required because it appears within the type `devise_core::syn::punctuated::Punctuated<devise_core::syn::Lifetime, devise_core::syn::token::Add>`
= note: required because it appears within the type `devise_core::syn::LifetimeDef`
= note: required because it appears within the type `(devise_core::syn::LifetimeDef, devise_core::syn::token::Comma)`
= note: required because it appears within the type `*const (devise_core::syn::LifetimeDef, devise_core::syn::token::Comma)`
= note: required because it appears within the type `std::ptr::Unique<(devise_core::syn::LifetimeDef, devise_core::syn::token::Comma)>`
= note: required because it appears within the type `alloc::raw_vec::RawVec<(devise_core::syn::LifetimeDef, devise_core::syn::token::Comma)>`
= note: required because it appears within the type `std::vec::Vec<(devise_core::syn::LifetimeDef, devise_core::syn::token::Comma)>`
= note: required because it appears within the type `devise_core::syn::punctuated::Punctuated<devise_core::syn::LifetimeDef, devise_core::syn::token::Comma>`
= note: required because it appears within the type `devise_core::syn::BoundLifetimes`
= note: required because it appears within the type `std::option::Option<devise_core::syn::BoundLifetimes>`
= note: required because it appears within the type `devise_core::syn::TraitBound`
= note: required because it appears within the type `devise_core::syn::TypeParamBound`
= note: required because it appears within the type `(devise_core::syn::TypeParamBound, devise_core::syn::token::Add)`
= note: required because it appears within the type `*const (devise_core::syn::TypeParamBound, devise_core::syn::token::Add)`
= note: required because it appears within the type `std::ptr::Unique<(devise_core::syn::TypeParamBound, devise_core::syn::token::Add)>`
= note: required because it appears within the type `alloc::raw_vec::RawVec<(devise_core::syn::TypeParamBound, devise_core::syn::token::Add)>`
= note: required because it appears within the type `std::vec::Vec<(devise_core::syn::TypeParamBound, devise_core::syn::token::Add)>`
= note: required because it appears within the type `devise_core::syn::punctuated::Punctuated<devise_core::syn::TypeParamBound, devise_core::syn::token::Add>`
= note: required because it appears within the type `devise_core::syn::TypeParam`
= note: required because it appears within the type `devise_core::syn::GenericParam`
= note: required because it appears within the type `(devise_core::syn::GenericParam, devise_core::syn::token::Comma)`
= note: required because it appears within the type `*const (devise_core::syn::GenericParam, devise_core::syn::token::Comma)`
= note: required because it appears within the type `std::ptr::Unique<(devise_core::syn::GenericParam, devise_core::syn::token::Comma)>`
= note: required because it appears within the type `alloc::raw_vec::RawVec<(devise_core::syn::GenericParam, devise_core::syn::token::Comma)>`
= note: required because it appears within the type `std::vec::Vec<(devise_core::syn::GenericParam, devise_core::syn::token::Comma)>`
= note: required because it appears within the type `devise_core::syn::punctuated::Punctuated<devise_core::syn::GenericParam, devise_core::syn::token::Comma>`
= note: required because it appears within the type `devise_core::syn::Generics`
= note: required because it appears within the type `devise_core::syn::ItemType`
= note: required because it appears within the type `devise_core::syn::Item`
= note: required because it appears within the type `devise_core::syn::Stmt`
= note: required because it appears within the type `*const devise_core::syn::Stmt`
= note: required because it appears within the type `std::ptr::Unique<devise_core::syn::Stmt>`
= note: required because it appears within the type `alloc::raw_vec::RawVec<devise_core::syn::Stmt>`
= note: required because it appears within the type `std::vec::Vec<devise_core::syn::Stmt>`
= note: required because it appears within the type `devise_core::syn::Block`
= note: required because it appears within the type `devise_core::syn::ExprIf`
= note: required because it appears within the type `devise_core::syn::Expr`
= note: required because it appears within the type `devise_core::syn::TypeArray`
= note: required because it appears within the type `devise_core::syn::Type`
= note: required because it appears within the type `devise_core::syn::GenericArgument`
= note: required because it appears within the type `(devise_core::syn::GenericArgument, devise_core::syn::token::Comma)`
= note: required because it appears within the type `*const (devise_core::syn::GenericArgument, devise_core::syn::token::Comma)`
= note: required because it appears within the type `std::ptr::Unique<(devise_core::syn::GenericArgument, devise_core::syn::token::Comma)>`
= note: required because it appears within the type `alloc::raw_vec::RawVec<(devise_core::syn::GenericArgument, devise_core::syn::token::Comma)>`
= note: required because it appears within the type `std::vec::Vec<(devise_core::syn::GenericArgument, devise_core::syn::token::Comma)>`
= note: required because it appears within the type `devise_core::syn::punctuated::Punctuated<devise_core::syn::GenericArgument, devise_core::syn::token::Comma>`
= note: required because it appears within the type `devise_core::syn::AngleBracketedGenericArguments`
= note: required because it appears within the type `devise_core::syn::PathArguments`
= note: required because it appears within the type `devise_core::syn::PathSegment`
= note: required because it appears within the type `(devise_core::syn::PathSegment, devise_core::syn::token::Colon2)`
= note: required because it appears within the type `*const (devise_core::syn::PathSegment, devise_core::syn::token::Colon2)`
= note: required because it appears within the type `std::ptr::Unique<(devise_core::syn::PathSegment, devise_core::syn::token::Colon2)>`
= note: required because it appears within the type `alloc::raw_vec::RawVec<(devise_core::syn::PathSegment, devise_core::syn::token::Colon2)>`
= note: required because it appears within the type `std::vec::Vec<(devise_core::syn::PathSegment, devise_core::syn::token::Colon2)>`
= note: required because it appears within the type `devise_core::syn::punctuated::Punctuated<devise_core::syn::PathSegment, devise_core::syn::token::Colon2>`
= note: required because it appears within the type `devise_core::syn::Path`
= note: required because it appears within the type `devise_core::syn::Attribute`
= note: required because it appears within the type `*const devise_core::syn::Attribute`
= note: required because it appears within the type `std::ptr::Unique<devise_core::syn::Attribute>`
= note: required because it appears within the type `alloc::raw_vec::RawVec<devise_core::syn::Attribute>`
= note: required because it appears within the type `std::vec::Vec<devise_core::syn::Attribute>`
= note: required because it appears within the type `devise_core::syn::FieldPat`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0275`.
error: Could not document `devise`.
Toolchain information:
> rustc --version && cargo --version
rustc 1.38.0-nightly (6e310f2ab 2019-07-07)
cargo 1.37.0-nightly (4c1fa54d1 2019-06-24)
I don't really know Rust and it's ecosystem, so asking, to make sure, that Devise requires rust-nightly by design, on purpose. I'm compiling code which deep down in dependency chain requires Devise:
$ rustc --version
rustc 1.46.0
$ cargo build
...
Compiling devise_core v0.2.0
error[E0554]: `#![feature]` may not be used on the stable release channel
--> /home/mkucharski/.cargo/registry/src/github.com-1ecc6299db9ec823/devise_core-0.2.0/src/lib.rs:1:1
|
1 | #![feature(proc_macro_diagnostic, proc_macro_span)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0554]: `#![feature]` may not be used on the stable release channel
--> /home/mkucharski/.cargo/registry/src/github.com-1ecc6299db9ec823/devise_core-0.2.0/src/lib.rs:2:1
|
2 | #![feature(crate_visibility_modifier)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0554]: `#![feature]` may not be used on the stable release channel
--> /home/mkucharski/.cargo/registry/src/github.com-1ecc6299db9ec823/devise_core-0.2.0/src/lib.rs:3:1
|
3 | #![feature(concat_idents)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0554`.
error: could not compile `devise_core`.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
Is rust-nightly a hard requirement on your side, or would it be possible to drop features in the code, which would make it usable on rust-stable?
rust-lang/rust#68716 would change the default for quote!
from call_site
to mixed_site
. As expected there is some breakage, but it looks like the breakage caused by devise specifically is "legitimate" and caused by mismatching quote!
with quote_spanned!
. For example:
Line 74 in c4f110f
is in a quote_spanned!
invocation, but
Line 120 in c4f110f
is in a quote!
invocation.
My opinion is that these should be realigned such that quote!
is used consistently for variables such as __list
, which should work even after a switch to mixed_site
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.