Skip to content

First code example regarding stdin emits a warning #99654

Closed
@dexygen

Description

@dexygen

What needs to be fixed?

The very first code example on the page in the docs regarding stdin is confusing because, using Rust 1.6.2, when executing the line with the comment // We get Stdin here appended, the warning "variable does not need to be mutable" is emitted.

Page(s) Affected

https://doc.rust-lang.org/std/io/struct.Stdin.html

Suggested Improvement

If the need for a mutable became unnecessasry as of a particular Rust version, perhaps add a comment to that effect

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-bugCategory: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions