error[E0495]: cannot infer an appropriate lifetime for lifetime parameter
'sprite
due to conflicting requirements
--> src/world/
mod.rs:20:13
|
20 | man.add_sprite_with_texture(text,0);
| ^^^^^^^^^^^^^^^^^^^^^^^
|
note: first, the lifetime cannot outlive the lifetime
'sprite
as defined on the impl at 17:13...
--> src/world/
mod.rs:17:13
|
17 | impl<'chunk,'sprite> World<'chunk,'sprite>{
| ^^^^^^^
note: ...so that reference does not outlive borrowed content
--> src/world/
mod.rs:20:37
|
20 | man.add_sprite_with_texture(text,0);
| ^^^^
note: but, the lifetime must be valid for the lifetime
'chunk
as defined on the impl at 17:6...
--> src/world/
mod.rs:17:6
|
17 | impl<'chunk,'sprite> World<'chunk,'sprite>{
| ^^^^^^
note: ...so that the expression is assignable
--> src/world/
mod.rs:24:34
|
24 | arr.insert([x,y],Chunk{spr:man.take(0)});
| ^^^^^^^^^^^^^^^^^^^^^^
= note: expected
world::Chunk<'chunk>
found
world::Chunk<'_>
error: aborting due to previous error
For more information about this error, try
rustc --explain E0495
.
error: could not compile
survival
.