phil-opp / blog_os

Writing an OS in Rust
http://os.phil-opp.com
Apache License 2.0
14.27k stars 1.01k forks source link

Edition 3 Post 3: Compiler Error #1315

Closed a-usr closed 2 months ago

a-usr commented 2 months ago

In this section of the post rustc throws the following error:

error[E0223]: ambiguous associated type
  --> kernel\src\framebuffer.rs:99:57
   |
99 |     fn draw_iter<I>(&mut self, pixels: I) -> Result<(), Self::Error>
   |                                                         ^^^^^^^^^^^
   |
help: use fully-qualified syntax
   |
99 |     fn draw_iter<I>(&mut self, pixels: I) -> Result<(), <framebuffer::Display<'f> as TryFrom>::Error>
   |                                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99 |     fn draw_iter<I>(&mut self, pixels: I) -> Result<(), <framebuffer::Display<'f> as TryInto>::Error>
   |                                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a-usr commented 2 months ago

Works now, maybe rust-analyzer was just acting up or smth