Skip to content

Compiler suggested <unnamed> in a use #43189

Closed
@moonheart08

Description

@moonheart08
error[E0599]: no method named `size` found for type `glutin_window::GlutinWindow` in the current sco
pe
  --> src/grenderer/game.rs:28:39
   |
28 |             let tilespace_y = (window.size().height / 4) * 3;
   |                                       ^^^^
   |
   = help: items from traits can only be used if the trait is in scope
   = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
           candidate #1: `use piston::<unnamed>::Window;`

Attempting to use that suggustion causes a compiler error itself, and the correct use statement is use piston::window::Window;

I dont know how to reproduce this behavior, but it can likely be found by looking in the piston_window crate's source code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions