diff --git a/compiler/cl-ast/src/format.rs b/compiler/cl-ast/src/format.rs index 9db5e9e..d93138a 100644 --- a/compiler/cl-ast/src/format.rs +++ b/compiler/cl-ast/src/format.rs @@ -3,15 +3,15 @@ use std::fmt::Write; impl FmtAdapter for W {} pub trait FmtAdapter: Write { - fn indent(&mut self) -> Indent { + fn indent(&mut self) -> Indent<'_, Self> { Indent { f: self } } - fn delimit(&mut self, delim: Delimiters) -> Delimit { + fn delimit(&mut self, delim: Delimiters) -> Delimit<'_, Self> { Delimit::new(self, delim) } - fn delimit_with(&mut self, open: &'static str, close: &'static str) -> Delimit { + fn delimit_with(&mut self, open: &'static str, close: &'static str) -> Delimit<'_, Self> { Delimit::new(self, Delimiters { open, close }) } } diff --git a/compiler/cl-interpret/src/env.rs b/compiler/cl-interpret/src/env.rs index af0d303..6c7a8e1 100644 --- a/compiler/cl-interpret/src/env.rs +++ b/compiler/cl-interpret/src/env.rs @@ -159,7 +159,7 @@ impl Environment { /// Enters a nested scope, returning a [`Frame`] stack-guard. /// /// [`Frame`] implements Deref/DerefMut for [`Environment`]. - pub fn frame(&mut self, name: &'static str) -> Frame { + pub fn frame(&mut self, name: &'static str) -> Frame<'_> { Frame::new(self, name) } diff --git a/compiler/cl-interpret/src/function.rs b/compiler/cl-interpret/src/function.rs index 985b33b..39cd711 100644 --- a/compiler/cl-interpret/src/function.rs +++ b/compiler/cl-interpret/src/function.rs @@ -33,7 +33,7 @@ impl Function { pub fn decl(&self) -> &FnDecl { &self.decl } - pub fn upvars(&self) -> Ref { + pub fn upvars(&self) -> Ref<'_, Upvars> { self.upvars.borrow() } pub fn lift_upvars(&self, env: &Environment) { diff --git a/compiler/cl-interpret/src/lib.rs b/compiler/cl-interpret/src/lib.rs index 8665490..7311e0f 100644 --- a/compiler/cl-interpret/src/lib.rs +++ b/compiler/cl-interpret/src/lib.rs @@ -328,7 +328,7 @@ pub mod collector { self.env.modules().get(self.module) } - pub fn as_node_mut(&mut self) -> ModuleNodeMut { + pub fn as_node_mut(&mut self) -> ModuleNodeMut<'_> { self.env.modules_mut().get_mut(self.module) } diff --git a/compiler/cl-repl/examples/yaml.rs b/compiler/cl-repl/examples/yaml.rs index c18bdce..a80fa65 100644 --- a/compiler/cl-repl/examples/yaml.rs +++ b/compiler/cl-repl/examples/yaml.rs @@ -54,7 +54,7 @@ pub mod yamler { Self::default() } - pub fn indent(&mut self) -> Section { + pub fn indent(&mut self) -> Section<'_> { Section::new(self) } @@ -80,7 +80,7 @@ pub mod yamler { } /// Prints a section header and increases indentation - pub fn key(&mut self, name: impl Yamlify) -> Section { + pub fn key(&mut self, name: impl Yamlify) -> Section<'_> { println!(); self.print_indentation(&mut std::io::stdout().lock()); print!(" ");