Skip to content

primitive_types3.rs: linked documentation no longer contains "fixed array with size" shorthand #86

@wittekm

Description

@wittekm

primitive_types3.rs mentions:

// There's a shorthand to initialize Arrays with a certain size that does not 
// require you to type in 100 items (but you certainly can if you want!)
// Check out the Primitive Types -> Arrays section of the book:
// https://doc.rust-lang.org/stable/book/second-edition/ch03-02-data-types.html#arrays

I suspect that the shorthand here is

    let a: [i32; 100] = [0; 100];

but that shorthand is no longer mentioned in the linked data types page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions