本人从未使用过rust语言,所以在简单安装了rust的编译环境后就在代码目录下运行了cargo run -r -j 4 --bin prpr-render命令,但是会出现编译错误:
error[E0050]: method touch_event has 6 parameters but the declaration in trait touch_event has 7
--> prpr\src\judge.rs:840:20
help: the return type of this call is std::option::Option<(i32, i32, i32, i32)> due to the type of the argument passed
--> prpr\src\ext.rs:130:9
130
gl.quad_gl.get_active_render_pass().map_or(that,
it
{
^ ---- this argument influences the return type of map_or
_____
131
let tex = it.texture(gl.quad_context);
132
(0, 0, tex.width as i32, tex.height as i32)
133
})
__^
note: method defined here
--> /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\option.rs:1127:12
help: consider using Option::expect to unwrap the std::option::Option<(i32, i32, i32, i32)> value, panicking if the value is an Option::None
|
130 | gl.quad_gl.get_active_render_pass().map_or(that.expect("REASON"), |it| {
| +++++++++++++++++
help: consider using Option::expect to unwrap the std::option::Option<(i32, i32, i32, i32)> value, panicking if the value is an Option::None
|
135 | that.expect("REASON")
| +++++++++++++++++
error[E0063]: missing field time in initializer of macroquad::input::Touch
--> prpr\src\judge.rs:348:30
|
348 | touches.push(Touch {
| ^^^^^ missing time
error[E0063]: missing field time in initializer of macroquad::input::Touch
--> prpr\src\judge.rs:355:30
|
355 | touches.push(Touch {
| ^^^^^ missing time
error[E0063]: missing field time in initializer of macroquad::input::Touch
--> prpr\src\judge.rs:362:30
|
362 | touches.push(Touch {
| ^^^^^ missing time
error[E0027]: pattern does not mention field time
--> prpr\src\judge.rs:388:17
388
for Touch { id, phase, position: p } in events.into_iter() {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing field time
help: include the missing field in the pattern
388
for Touch { id, phase, position: p, time } in events.into_iter() {
~~~~
help: if you don't care about this missing field, you can explicitly ignore it
388
for Touch { id, phase, position: p, .. } in events.into_iter() {
~~
error[E0063]: missing field time in initializer of macroquad::input::Touch
--> prpr\src\judge.rs:397:48
|
397 | ... .or_insert_with(|| Touch {
| ^^^^^ missing time
error[E0063]: missing field time in initializer of macroquad::input::Touch
--> prpr\src\judge.rs:818:25
|
818 | self.0.push(Touch {
| ^^^^^ missing time
error[E0063]: missing field time in initializer of macroquad::input::Touch
--> prpr\src\judge.rs:841:21
|
841 | self.0.push(Touch {
| ^^^^^ missing time
error[E0063]: missing field time in initializer of macroquad::input::Touch
--> prpr\src\judge.rs:849:21
|
849 | self.0.push(Touch {
| ^^^^^ missing time
error[E0063]: missing field time in initializer of macroquad::input::Touch
--> prpr\src\judge.rs:857:21
|
857 | self.0.push(Touch {
| ^^^^^ missing time
help: try wrapping the pattern in Some
|
774 | let Some((x, y, w, h)) = quad_gl.get_viewport();
| +++++ +
error[E0560]: struct MusicParams has no field named loop_
--> prpr\src\scene\ending.rs:76:17
76
loop_: true,
^^^^^ MusicParams does not have this field
= note: available fields are: loop_mix_time, playback_rate, command_buffer_size
Some errors have detailed explanations: E0027, E0050, E0063, E0308, E0560.
For more information about an error, try rustc --explain E0027.
error: could not compile prpr (lib) due to 16 previous errors
cargo run -r -j 4 --bin prpr-render
命令,但是会出现编译错误: error[E0050]: methodtouch_event
has 6 parameters but the declaration in traittouch_event
has 7 --> prpr\src\judge.rs:840:20Option<(i32, i32, i32, i32)>
, found({integer}, {integer}, _, _)
std::option::Option<(i32, i32, i32, i32)>
help: try wrapping the expression in
Some
| 129 | if that == Some((0, 0, screenwidth() as , screenheight() as )) { | +++++ +(i32, i32, i32, i32)
, foundOption<(i32, i32, i32, i32)>
std::option::Option<(i32, i32, i32, i32)>
due to the type of the argument passed --> prpr\src\ext.rs:130:9map_or
note: method defined here --> /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\option.rs:1127:12 help: consider using
Option::expect
to unwrap thestd::option::Option<(i32, i32, i32, i32)>
value, panicking if the value is anOption::None
| 130 | gl.quad_gl.get_active_render_pass().map_or(that.expect("REASON"), |it| { | +++++++++++++++++(i32, i32, i32, i32)
because of return type ... 135(i32, i32, i32, i32)
, foundOption<(i32, i32, i32, i32)>
help: consider using
Option::expect
to unwrap thestd::option::Option<(i32, i32, i32, i32)>
value, panicking if the value is anOption::None
| 135 | that.expect("REASON") | +++++++++++++++++error[E0063]: missing field
time
in initializer ofmacroquad::input::Touch
--> prpr\src\judge.rs:348:30 | 348 | touches.push(Touch { | ^^^^^ missingtime
error[E0063]: missing field
time
in initializer ofmacroquad::input::Touch
--> prpr\src\judge.rs:355:30 | 355 | touches.push(Touch { | ^^^^^ missingtime
error[E0063]: missing field
time
in initializer ofmacroquad::input::Touch
--> prpr\src\judge.rs:362:30 | 362 | touches.push(Touch { | ^^^^^ missingtime
time
--> prpr\src\judge.rs:388:17time
~~~~ help: if you don't care about this missing field, you can explicitly ignore it~~error[E0063]: missing field
time
in initializer ofmacroquad::input::Touch
--> prpr\src\judge.rs:397:48 | 397 | ... .or_insert_with(|| Touch { | ^^^^^ missingtime
error[E0063]: missing field
time
in initializer ofmacroquad::input::Touch
--> prpr\src\judge.rs:818:25 | 818 | self.0.push(Touch { | ^^^^^ missingtime
error[E0063]: missing field
time
in initializer ofmacroquad::input::Touch
--> prpr\src\judge.rs:841:21 | 841 | self.0.push(Touch { | ^^^^^ missingtime
error[E0063]: missing field
time
in initializer ofmacroquad::input::Touch
--> prpr\src\judge.rs:849:21 | 849 | self.0.push(Touch { | ^^^^^ missingtime
error[E0063]: missing field
time
in initializer ofmacroquad::input::Touch
--> prpr\src\judge.rs:857:21 | 857 | self.0.push(Touch { | ^^^^^ missingtime
std::option::Option<(i32, i32, i32, i32)>
Option<(i32, i32, i32, i32)>
, found(_, _, _, _)
help: try wrapping the pattern in
Some
| 758 | let Some((x, y, w, h)) = quad_gl.get_viewport(); | +++++ +std::option::Option<(i32, i32, i32, i32)>
Option<(i32, i32, i32, i32)>
, found(_, _, _, _)
help: try wrapping the pattern in
Some
| 774 | let Some((x, y, w, h)) = quad_gl.get_viewport(); | +++++ +MusicParams
has no field namedloop_
--> prpr\src\scene\ending.rs:76:17MusicParams
does not have this field= note: available fields are:
loop_mix_time
,playback_rate
,command_buffer_size
Some errors have detailed explanations: E0027, E0050, E0063, E0308, E0560. For more information about an error, try
rustc --explain E0027
. error: could not compileprpr
(lib) due to 16 previous errors