Skip to content

Commit

Permalink
Improve BindingMode doc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-Bertholet committed Apr 17, 2024
1 parent 2a4624d commit ce0e27d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions compiler/rustc_ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,10 @@ impl ByRef {
}

/// The mode of a binding (`mut`, `ref mut`, etc).
/// Used for both the wxplicit binding annotations given in the HIR for a binding
/// and the final binding *mode* that we infer after type inference.
/// Used for both the explicit binding annotations given in the HIR for a binding
/// and the final binding mode that we infer after type inference/match ergonomics.
/// `.0` is the by-reference mode (`ref`, `ref mut`, or by value),
/// `.1` is the mutability of the binding.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[derive(Encodable, Decodable, HashStable_Generic)]
pub struct BindingMode(pub ByRef, pub Mutability);
Expand Down

0 comments on commit ce0e27d

Please sign in to comment.