diff options
| author | Kirby Linvill <kjlinvill@gmail.com> | 2023-10-26 00:18:42 +0100 |
|---|---|---|
| committer | Kirby Linvill <kjlinvill@gmail.com> | 2023-10-26 00:18:42 +0100 |
| commit | fe4dfb814b68bb03468736c5c0632f6495ea855e (patch) | |
| tree | 15e1071912d922d8b1bf8fea93e712f442ebddaf | |
| parent | 39b293fb5a68081e7c050ed2805c8e3404c9763a (diff) | |
| download | rust-fe4dfb814b68bb03468736c5c0632f6495ea855e.tar.gz rust-fe4dfb814b68bb03468736c5c0632f6495ea855e.zip | |
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.
| -rw-r--r-- | compiler/stable_mir/src/mir/body.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/stable_mir/src/mir/body.rs b/compiler/stable_mir/src/mir/body.rs index 97dd649bf64..75c988056b4 100644 --- a/compiler/stable_mir/src/mir/body.rs +++ b/compiler/stable_mir/src/mir/body.rs @@ -25,7 +25,7 @@ impl Body { /// because the `arg_count` and `locals` fields are private. pub fn new(blocks: Vec<BasicBlock>, locals: LocalDecls, arg_count: usize) -> Self { // If locals doesn't contain enough entries, it can lead to panics in - // `ret_local`, `arg_locals`, and `internal_locals`. + // `ret_local`, `arg_locals`, and `inner_locals`. assert!( locals.len() > arg_count, "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 { &self.locals[1..self.arg_count + 1] } - /// Internal locals for this function. These are the locals that are + /// Inner locals for this function. These are the locals that are /// neither the return local nor the argument locals. - pub fn internal_locals(&self) -> &[LocalDecl] { + pub fn inner_locals(&self) -> &[LocalDecl] { &self.locals[self.arg_count + 1..] } /// Convenience function to get all the locals in this function. /// /// Locals are typically accessed via the more specific methods `ret_local`, - /// `arg_locals`, and `internal_locals`. + /// `arg_locals`, and `inner_locals`. pub fn locals(&self) -> &[LocalDecl] { &self.locals } |
