Skip to content

Commit

Permalink
Improve code documentation a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Oct 11, 2023
1 parent bd59fc6 commit 00c3de9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustdoc/html/render/print_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,8 @@ fn item_enum(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, e: &clean::
}

/// It'll return false if any variant is not a C-like variant. Otherwise it'll return true if at
/// least one of them has a value set or if the enum has `#[repr(C)]` or has an integer `repr`.
/// least one of them has an explicit discriminant or if the enum has `#[repr(C)]` or an integer
/// `repr`.
fn should_show_enum_discriminant(
cx: &Context<'_>,
enum_def_id: DefId,
Expand All @@ -1467,7 +1468,6 @@ fn should_show_enum_discriminant(
return true;
}
let repr = cx.tcx().adt_def(enum_def_id).repr();
// let repr = cx.tcx().repr_options_of_def(enum_def_id);
repr.c() || repr.int.is_some()
}

Expand Down

0 comments on commit 00c3de9

Please sign in to comment.