Skip to content
This repository was archived by the owner on Mar 1, 2019. It is now read-only.
This repository was archived by the owner on Mar 1, 2019. It is now read-only.

Missing ref - field access in for loop #78

Description

@nrc

struct FrameBuffer {
    frame: Vec<f32>,
}

/// dfasf
pub fn main() {
    let output = FrameBuffer { frame: vec![0.0] };

    // println!("{:?}", output.frame);
    // let frame  = output.frame;

    for t in output.frame {
        println!("{}", t as i16);
    }
}

But the output in the for loop is fine, as are field accesses outside the for loop. Weird.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions