Skip to content

Commit

Permalink
Move documentation to public API
Browse files Browse the repository at this point in the history
  • Loading branch information
adpaco-aws committed Mar 11, 2024
1 parent b5b19ab commit c25fd71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions compiler/rustc_smir/src/rustc_smir/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,9 +588,6 @@ impl<'tcx> Context for TablesWrapper<'tcx> {
}

/// Retrieve the plain intrinsic name of an instance if it's an intrinsic.
///
/// The plain name does not include type arguments (as `instance_name`
/// does), which is more convenient to match with intrinsic symbols.
fn intrinsic_name(&self, def: InstanceDef) -> Option<Symbol> {
let tables = self.0.borrow_mut();
let instance = tables.instances[def];
Expand Down
4 changes: 4 additions & 0 deletions compiler/stable_mir/src/mir/mono.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ impl Instance {
with(|context| context.instance_name(self.def, true))
}

/// Retrieve the plain intrinsic name of an instance if it's an intrinsic.
///
/// The plain name does not include type arguments (as `trimmed_name` does),
/// which is more convenient to match with intrinsic symbols.
pub fn intrinsic_name(&self) -> Option<Symbol> {
with(|context| context.intrinsic_name(self.def))
}
Expand Down

0 comments on commit c25fd71

Please sign in to comment.