我的空rust项目无法编译,我该怎么办



昨天我试图更新我的bevy依赖项,但一切都停止了。我从";0.1.2〃;到版本";0.1.3";当我这样做的时候,我的项目完全停止了编译。我把依赖关系改回";0.1.2〃;但它并没有解决问题。然后我运行了rustup更新,但这也没有纠正问题。所以,最后,我删掉了所有的项目代码,除了:

use bevy:: {
prelude::*,
input::mouse::{MouseButtonInput, MouseMotion},
};
fn main() {
println!("Hello.");
}

我的cargo.toml也很简单,唯一修改的部分如下:

[dependencies]
bevy = "0.1.2"

因此,我得到的错误如下:

error[E0599]: no function or associated item named `perspective_rh` found for struct `glam::f32::mat4::Mat4` in the current scope
--> srcgithub.com-1ecc6299db9ec823bevy_render-0.1.3srccameraprojection.rs:22:15
|
22 |         Mat4::perspective_rh(self.fov, self.aspect_ratio, self.near, self.far)
|               ^^^^^^^^^^^^^^
|               |
|               function or associated item not found in `glam::f32::mat4::Mat4`
|               help: there is an associated function with a similar name: `perspective_lh`
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope; perhaps add a `use` for it:
`use bevy_math::perspective::PerspectiveRh;`

我应该怎么做才能解决这个问题?

编辑(锈蚀检查结果(:

锈蚀检查稳定-x86_64-pc-windows-msvc-最新版本:1.45.2(d3fb005a3 2020-07-31(nightly-x86_64-pc-windows-msvc-最新:1.47.0-右侧(f44c6e4e2 2020-08-24(

尝试cargo clean并删除Cargo.lock

相关内容

最新更新