Skip to content

Commit 2e61659

Browse files
committed
Update comment and fix fmt
1 parent 7d0afae commit 2e61659

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

compiler/rustc_typeck/src/expr_use_visitor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ impl<'a, 'tcx> ExprUseVisitor<'a, 'tcx> {
266266
needs_to_be_read = true;
267267
}
268268
} else {
269-
// If it is not ty::Adt, then it is a MultiVariant
269+
// If it is not ty::Adt, then it should be read
270270
needs_to_be_read = true;
271271
}
272272
}

src/test/ui/closures/2229_closure_analysis/match-multi-variant.rs src/test/ui/closures/2229_closure_analysis/match-edge-cases.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const PATTERN_REF: &str = "Hello World";
55
const NUMBER: i32 = 30;
66
const NUMBER_POINTER: *const i32 = &NUMBER;
77

8-
pub fn multi_variant_ref(event: &str) {
8+
pub fn edge_case_ref(event: &str) {
99
let _ = || {
1010
match event {
1111
PATTERN_REF => (),
@@ -14,7 +14,7 @@ pub fn multi_variant_ref(event: &str) {
1414
};
1515
}
1616

17-
pub fn multi_variant_str(event: String) {
17+
pub fn edge_case_str(event: String) {
1818
let _ = || {
1919
match event.as_str() {
2020
"hello" => (),
@@ -23,7 +23,7 @@ pub fn multi_variant_str(event: String) {
2323
};
2424
}
2525

26-
pub fn multi_variant_raw_ptr(event: *const i32) {
26+
pub fn edge_case_raw_ptr(event: *const i32) {
2727
let _ = || {
2828
match event {
2929
NUMBER_POINTER => (),
@@ -32,7 +32,7 @@ pub fn multi_variant_raw_ptr(event: *const i32) {
3232
};
3333
}
3434

35-
pub fn multi_variant_char(event: char) {
35+
pub fn edge_case_char(event: char) {
3636
let _ = || {
3737
match event {
3838
'a' => (),

0 commit comments

Comments
 (0)