Skip to content

Sloppy wording in 4.3 #1862

Closed
Closed
@mulkieran

Description

@mulkieran

Recall from the borrowing rules that if we have an immutable reference to something, we cannot also take a mutable reference. Because clear needs to truncate the String, it tries to take a mutable reference, which fails. Not only has Rust made our API easier to use, but it has also eliminated an entire class of errors at compile time!

"it tries to take a mutable reference, which fails" sounds dynamic. But the whole point is that this is statically checked.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions