Skip to content

Commit

Permalink
Rename mros to class_metadata
Browse files Browse the repository at this point in the history
Summary: We renamed the data from MRO to ClassMetadata, but didn't update the field (partly because we always access it by type). Update the field to match.

Reviewed By: yangdanny97

Differential Revision: D68150221

fbshipit-source-id: 916f1b675a571de17803d5a83a0123b25f109c09
  • Loading branch information
ndmitchell authored and facebook-github-bot committed Jan 14, 2025
1 parent 525273a commit de393fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions pyre2/pyre2/bin/binding/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ macro_rules! table {
$($vis)* exports: $t<KeyExport>,
$($vis)* class_fields: $t<KeyClassField>,
$($vis)* annotations: $t<KeyAnnotation>,
$($vis)* mros: $t<KeyClassMetadata>,
$($vis)* class_metadata: $t<KeyClassMetadata>,
$($vis)* legacy_tparams: $t<KeyLegacyTypeParam>,
}

Expand Down Expand Up @@ -59,8 +59,8 @@ macro_rules! table {

impl $crate::binding::table::TableKeyed<KeyClassMetadata> for $name {
type Value = $t<KeyClassMetadata>;
fn get(&self) -> &Self::Value { &self.mros }
fn get_mut(&mut self) -> &mut Self::Value { &mut self.mros }
fn get(&self) -> &Self::Value { &self.class_metadata }
fn get_mut(&mut self) -> &mut Self::Value { &mut self.class_metadata }
}

impl $crate::binding::table::TableKeyed<KeyLegacyTypeParam> for $name {
Expand Down Expand Up @@ -96,7 +96,7 @@ macro_rules! table_for_each(
$f(&($e).exports);
$f(&($e).class_fields);
$f(&($e).annotations);
$f(&($e).mros);
$f(&($e).class_metadata);
$f(&($e).legacy_tparams);
};
);
Expand All @@ -108,7 +108,7 @@ macro_rules! table_mut_for_each(
$f(&mut ($e).exports);
$f(&mut ($e).class_fields);
$f(&mut ($e).annotations);
$f(&mut ($e).mros);
$f(&mut ($e).class_metadata);
$f(&mut ($e).legacy_tparams);
};
);
Expand All @@ -120,7 +120,7 @@ macro_rules! table_try_for_each(
$f(&($e).exports)?;
$f(&($e).class_fields)?;
$f(&($e).annotations)?;
$f(&($e).mros)?;
$f(&($e).class_metadata)?;
$f(&($e).legacy_tparams)?;
};
);
2 changes: 1 addition & 1 deletion pyre2/pyre2/bin/test/mro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub fn get_class_metadata(name: &str, module_name: ModuleName, state: &State) ->

let res = get_class(name, module_name, state).and_then(|cls| {
let x = solutions
.mros
.class_metadata
.get(&KeyClassMetadata(ShortIdentifier::new(cls.name())));
x.cloned()
});
Expand Down

0 comments on commit de393fb

Please sign in to comment.