use rustc_middle::thir::*;
#[derive(Debug, PartialEq)]
-crate enum Category {
+pub(crate) enum Category {
// An assignable memory location like `x`, `x.f`, `foo()[3]`, that
// sort of thing. Something that could appear on the LHS of an `=`
// sign.
// Rvalues fall into different "styles" that will determine which fn
// is best suited to generate them.
#[derive(Debug, PartialEq)]
-crate enum RvalueFunc {
+pub(crate) enum RvalueFunc {
// Best generated by `into`. This is generally exprs that
// cause branching, like `match`, but also includes calls.
Into,
/// Determines the category for a given expression. Note that scope
/// and paren expressions have no category.
impl Category {
- crate fn of(ek: &ExprKind<'_>) -> Option<Category> {
+ pub(crate) fn of(ek: &ExprKind<'_>) -> Option<Category> {
match *ek {
ExprKind::Scope { .. } => None,