Skip to content

Compiler errors (Copy constraint on Buffer) #181

@bvssvni

Description

@bvssvni

The methods on Cell requires a Copy constraint, which is no longer implemented by Buffer.

src/chunk.rs:113:40: 113:45 error: type `&core::cell::Cell<core::option::Option<shader::Buffer>>` does not implement any method in scope named `get`
src/chunk.rs:113                 f(x, y as i32, z, c, b.get())
                                                        ^~~~~
src/chunk.rs:113:45: 113:45 help: methods from traits can only be called if the trait is implemented and in scope; the following traits define a method `get`, perhaps you need to implement one of them:
src/chunk.rs:113:45: 113:45 help: candidate #1: `core::slice::SliceExt`
src/chunk.rs:113:45: 113:45 help: candidate #2: `collections::slice::SliceExt`
src/chunk.rs:113:45: 113:45 help: candidate #3: `quack::get::Get`
src/minecraft/region.rs:143:41: 143:50 error: the trait `core::marker::Copy` is not implemented for the type `shader::Buffer` [E0277]
src/minecraft/region.rs:143             buffers: Array::from_fn(|_| Cell::new(None)),
                                                                    ^~~~~~~~~
src/main.rs:294:38: 294:43 error: type `&core::cell::Cell<core::option::Option<shader::Buffer>>` does not implement any method in scope named `get`
src/main.rs:294                         match buffer.get() {
                                                     ^~~~~
src/main.rs:294:43: 294:43 help: methods from traits can only be called if the trait is implemented and in scope; the following traits define a method `get`, perhaps you need to implement one of them:
src/main.rs:294:43: 294:43 help: candidate #1: `core::slice::SliceExt`
src/main.rs:294:43: 294:43 help: candidate #2: `collections::slice::SliceExt`
src/main.rs:294:43: 294:43 help: candidate #3: `quack::get::Get`
src/main.rs:302:32: 304:27 error: type `&core::cell::Cell<core::option::Option<shader::Buffer>>` does not implement any method in scope named `set`
src/main.rs:302                         buffer.set(Some(
src/main.rs:303                             renderer.create_buffer(staging_buffer.as_slice())
src/main.rs:304                         ));
src/main.rs:304:27: 304:27 help: methods from traits can only be called if the trait is implemented and in scope; the following trait defines a method `set`, perhaps you need to implement it:
src/main.rs:304:27: 304:27 help: candidate #1: `quack::set::Set`
error: aborting due to 4 previous errors
Could not compile `hematite`.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions