Skip to content

Commit fe4dfb8

Browse files
committed
Rename internal_locals to inner_locals
The word internal has connotations about information that's not exposed. It's more accurate to say that the remaining locals apply only to the inner part of the function, so I'm renaming them to inner locals.
1 parent 39b293f commit fe4dfb8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/stable_mir/src/mir/body.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl Body {
2525
/// because the `arg_count` and `locals` fields are private.
2626
pub fn new(blocks: Vec<BasicBlock>, locals: LocalDecls, arg_count: usize) -> Self {
2727
// If locals doesn't contain enough entries, it can lead to panics in
28-
// `ret_local`, `arg_locals`, and `internal_locals`.
28+
// `ret_local`, `arg_locals`, and `inner_locals`.
2929
assert!(
3030
locals.len() > arg_count,
3131
"A Body must contain at least a local for the return value and each of the function's arguments"
@@ -43,16 +43,16 @@ impl Body {
4343
&self.locals[1..self.arg_count + 1]
4444
}
4545

46-
/// Internal locals for this function. These are the locals that are
46+
/// Inner locals for this function. These are the locals that are
4747
/// neither the return local nor the argument locals.
48-
pub fn internal_locals(&self) -> &[LocalDecl] {
48+
pub fn inner_locals(&self) -> &[LocalDecl] {
4949
&self.locals[self.arg_count + 1..]
5050
}
5151

5252
/// Convenience function to get all the locals in this function.
5353
///
5454
/// Locals are typically accessed via the more specific methods `ret_local`,
55-
/// `arg_locals`, and `internal_locals`.
55+
/// `arg_locals`, and `inner_locals`.
5656
pub fn locals(&self) -> &[LocalDecl] {
5757
&self.locals
5858
}

0 commit comments

Comments
 (0)