2016-07-27 33 views
0

我想使用vulkano,它有a new crate中的所有示例。我复制的文件夹examples出来,改变了Cargo.toml到无法找到不安全的性状实施

[package] 
name = "examples" 
version = "0.1.0" 
build = "build.rs" 

[dependencies] 
vulkano = "0.1.0" 
vulkano-win = "0.1.0" 
cgmath = "0.7.0" 
image = "0.6.1" 
winit = "0.5.1" 

[build-dependencies] 
vk-sys = "0.1.1" 
vulkano-shaders = "0.1.0" 

当我尝试建立我得到:

error: the trait bound `(f32, f32, f32): vulkano::pipeline::vertex::VertexMember` is not satisfied [E0277] 
) { T :: format () } let dummy = 0usize as * const $ out ; f (
                  ^
note: in this expansion of impl_vertex! (defined in <vulkano macros>) 
help: run `rustc --explain E0277` to see a detailed explanation 
note: required by `<Vertex as vulkano::pipeline::vertex::Vertex>::member::f` 

错误位于here和特点是implemented here

为什么我得到这个错误? Rust为什么告诉我这个性状不满意?

回答

0

问题是似乎有货物使用crates.io的版本不匹配。指出.git作品的每一个依赖。

[package] 
name = "examples" 
version = "0.1.0" 
build = "build.rs" 

[dependencies] 
vulkano = { git = "https://github.com/tomaka/vulkano" } 
vulkano-win = { git = "https://github.com/tomaka/vulkano" } 
cgmath = "0.7.0" 
image = "0.6.1" 
winit = "0.5.1" 

[build-dependencies] 
vk-sys = { git = "https://github.com/tomaka/vulkano" } 
vulkano-shaders = { git = "https://github.com/tomaka/vulkano" }