Skip to content

Commit

Permalink
more 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thetayloredman committed Nov 14, 2024
1 parent d29e4e1 commit 9d550b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions compiler/zrc_typeck/src/tast/stmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl<'input> ArgumentDeclarationList<'input> {
}
}
}
impl<'input> Display for ArgumentDeclarationList<'input> {
impl Display for ArgumentDeclarationList<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let (Self::Variadic(args) | Self::NonVariadic(args)) = self;

Expand All @@ -153,7 +153,7 @@ pub struct ArgumentDeclaration<'input> {
/// The type of the parameter.
pub ty: Spanned<Type<'input>>,
}
impl<'input> Display for ArgumentDeclaration<'input> {
impl Display for ArgumentDeclaration<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}: {}", self.name, self.ty)
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/zrc_typeck/src/tast/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub struct Fn<'input> {
/// The function's return type
pub returns: Box<Type<'input>>,
}
impl<'input> Display for Fn<'input> {
impl Display for Fn<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "(fn({}) -> {})", self.arguments, self.returns)
}
Expand Down Expand Up @@ -74,7 +74,7 @@ pub enum Type<'input> {
Union(IndexMap<&'input str, Type<'input>>),
}

impl<'input> Display for Type<'input> {
impl Display for Type<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::I8 => write!(f, "i8"),
Expand Down
2 changes: 1 addition & 1 deletion compiler/zrc_typeck/src/typeck/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub enum BlockReturnAbility<'input> {
/// Any sub-blocks of this block MAY return. At least one MUST return.
MustReturn(TastType<'input>),
}
impl<'input> BlockReturnAbility<'input> {
impl BlockReturnAbility<'_> {
/// Determine the [`BlockReturnAbility`] of a sub-scope. `MustReturn`
/// become`MayReturn`.
#[must_use]
Expand Down

0 comments on commit 9d550b8

Please sign in to comment.