std::let - Rust
Description: API documentation for the Rust `let` keyword in crate `std`.
Keywords: rust, rustlang, rust-lang, let

# [−]Keyword let

The `let` keyword.

The `let` keyword is used to declare a variable.

Example:

    let x = 3; // We create a variable named `x` with the value `3`.Run

By default, all variables are not mutable. If you want a mutable variable, you'll have to use the `mut` keyword.

Example:

    let mut x = 3; // We create a mutable variable named `x` with the value `3`.

    x += 4; // `x` is now equal to `7`.Run

For more information about the `let` keyword, take a look at the Rust Book.

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g. `str,u8` or `String,struct:Vec,test`)