Skip to content

Generic vector reads read from the wrong place #301

Closed
@pcwalton

Description

@pcwalton

Test case:

fn get[T](vec[T] v) -> T {
    ret v.(1);
}

fn main() {
    auto v = vec(1, 2, 3, 4, 5);
    log get(v);
}

Result:

[pwalton@fireferret ~/Source/rust/build] ./a.out
rt: ---
rt: 12ed:main:main:                       rust: 33554432 (0x2000000)

ret v.(0) works, so looks like we're miscalculating vec element size.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions