Skip to content

Commit ce0e27d

Browse files
Improve BindingMode doc comment
1 parent 2a4624d commit ce0e27d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler/rustc_ast/src/ast.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -717,8 +717,10 @@ impl ByRef {
717717
}
718718

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

0 commit comments

Comments
 (0)