Skip to content

Unclear example on mutability #33716

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.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions