Skip to content

Commit

Permalink
Update comment and fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
roxelo committed Aug 14, 2021
1 parent 7d0afae commit 2e61659
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_typeck/src/expr_use_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ impl<'a, 'tcx> ExprUseVisitor<'a, 'tcx> {
needs_to_be_read = true;
}
} else {
// If it is not ty::Adt, then it is a MultiVariant
// If it is not ty::Adt, then it should be read
needs_to_be_read = true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const PATTERN_REF: &str = "Hello World";
const NUMBER: i32 = 30;
const NUMBER_POINTER: *const i32 = &NUMBER;

pub fn multi_variant_ref(event: &str) {
pub fn edge_case_ref(event: &str) {
let _ = || {
match event {
PATTERN_REF => (),
Expand All @@ -14,7 +14,7 @@ pub fn multi_variant_ref(event: &str) {
};
}

pub fn multi_variant_str(event: String) {
pub fn edge_case_str(event: String) {
let _ = || {
match event.as_str() {
"hello" => (),
Expand All @@ -23,7 +23,7 @@ pub fn multi_variant_str(event: String) {
};
}

pub fn multi_variant_raw_ptr(event: *const i32) {
pub fn edge_case_raw_ptr(event: *const i32) {
let _ = || {
match event {
NUMBER_POINTER => (),
Expand All @@ -32,7 +32,7 @@ pub fn multi_variant_raw_ptr(event: *const i32) {
};
}

pub fn multi_variant_char(event: char) {
pub fn edge_case_char(event: char) {
let _ = || {
match event {
'a' => (),
Expand Down

0 comments on commit 2e61659

Please sign in to comment.