Skip to content

Compile error in VGA Buffer with Volatile #991

@Rdna123

Description

@Rdna123
rror[E0599]: the method `write` exists for struct `Volatile<ScreenChar>`, but its trait bounds were not satisfied
  --> src\vga_buffer.rs:97:45
   |
55 | struct ScreenChar {
   | -----------------
   | |
   | doesn't satisfy `<ScreenChar as Deref>::Target = _`
   | doesn't satisfy `ScreenChar: Deref`
...
97 |                 self.buffer.chars[row][col].write(ScreenChar {
   |                                             ^^^^^ method cannot be called on `Volatile<ScreenChar>` due to unsatisfied trait bounds
   |
   = note: the following trait bounds were not satisfied:
           `<ScreenChar as Deref>::Target = _`
           `ScreenChar: Deref`

rustc --version
rustc 1.54.0-nightly (5c0292654 2021-05-11)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions