lazy_static
. It looks like my toolchain has two lazy_static rlibs. How do I fix this?
build.rs
and cc
crate in practice, like here - https://github.com/alexcrichton/rust-ffi-examples/tree/master/rust-to-c
cargo rustc -- -Z unstable-options --pretty expanded
lazy_static
crate. IIUC, normally cargo
provides special arguments to rustc
to tell it where should the crates come from. You don't pass it, so rustc
tries a fallback and fails due to multiple candidates it cannot choose between.
cargo build --verbose
to see the full command line cargo
uses
1.26
is releasing ?
Release Dates
Rust 1.25 stable was released on Fri Mar 30 2018.
Rust 1.26 stable will be released on Fri May 11 2018.
Rust 1.27 stable will be released on Fri Jun 22 2018.
#var
in quote!
refers to a variable called var
, so you probably need to introduce a variable for it.
&Trait
to &Req
when trait Trait: Req
?
&T
, you cannot directly call that impl if you have a &mut T
, while it safely coerce to &T
i try to call module like this
mod module_name
in main.rs, it works, but not in schema.rs
main.rs
schema/mod.rs
schema/module_name.rs
// main.rs
mod schema; // refers to schema/mod.rs
// schema/mod.rs
mod submodule; // refers to schema/submodule.rs
use schema::submodule::S as So; // note absolute path in `use`
const MY_S: submodule::S = So;
// schema/submodule.rs
pub(crate) struct S;