Skip to content

Unclear example on mutability #33716

@mark-summerfield

Description

@mark-summerfield

This is copied from rust-lang/book#102 (comment) as requested:


In https://doc.rust-lang.org/book/mutability.html at the end of the Mutability section it has these examples:

let (mut x, y) = (5, 6);

fn foo(mut x: i32) {

I think there should be some following text, e.g.

Note that here, x is mutable, but y is not.

In the link I was given: http://rust-lang.github.io/book/variable-bindings.html#Mutable there is an updated explanation which explains this clearly.

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