diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 140435b..e9eaab8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,6 +7,13 @@ on: branches: [ master, '[0-9]+.[0-9]+' ] jobs: + typos: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: crate-ci/typos@v1 + + test: name: Test strategy: diff --git a/README.md b/README.md index b92cdf6..a86ba5c 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ fn main() { `#[impl_self]` provides `impl Self` syntax, avoiding the need to repeat generics when writing impls on a local type definition. -This supercedes `impl_scope!` (except regarding `macro@impl_default`). +This supersedes `impl_scope!` (except regarding `macro@impl_default`). ```rust use std::fmt::Display; diff --git a/lib/src/autoimpl/for_deref.rs b/lib/src/autoimpl/for_deref.rs index a2efa52..0280ed5 100644 --- a/lib/src/autoimpl/for_deref.rs +++ b/lib/src/autoimpl/for_deref.rs @@ -6,7 +6,7 @@ //! Implementation of the `#[autoimpl]` attribute use crate::generics::{GenericParam, Generics, TypeParamBound, WherePredicate}; -use crate::utils::propegate_attr_to_impl; +use crate::utils::propagate_attr_to_impl; use proc_macro_error3::{emit_call_site_error, emit_call_site_warning, emit_error}; use proc_macro2::{Span, TokenStream}; use quote::{ToTokens, TokenStreamExt, quote}; @@ -190,7 +190,7 @@ impl ForDeref { } TraitItem::Fn(mut item) => { for attr in item.attrs.iter() { - if propegate_attr_to_impl(attr) { + if propagate_attr_to_impl(attr) { attr.to_tokens(tokens); } } @@ -268,7 +268,7 @@ impl ForDeref { match arg { FnArg::Receiver(arg) => { for attr in &arg.attrs { - if propegate_attr_to_impl(&attr) { + if propagate_attr_to_impl(&attr) { attr.to_tokens(&mut toks); } } @@ -287,7 +287,7 @@ impl ForDeref { } FnArg::Typed(arg) => { for attr in &arg.attrs { - if propegate_attr_to_impl(&attr) { + if propagate_attr_to_impl(&attr) { attr.to_tokens(&mut toks); }; } diff --git a/lib/src/lib.rs b/lib/src/lib.rs index c979f9f..9957dc1 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -10,7 +10,7 @@ //! merely documentation plus wrappers around this crate. #![deny(missing_docs)] -// Lint advocates use of bool::then_some, stablizied in rustc 1.62.0 +// Lint advocates use of bool::then_some, stabilized in rustc 1.62.0 #![allow(clippy::unnecessary_lazy_evaluations)] #![allow(clippy::style)] diff --git a/lib/src/split_impl.rs b/lib/src/split_impl.rs index bc5da1a..ce3fcac 100644 --- a/lib/src/split_impl.rs +++ b/lib/src/split_impl.rs @@ -49,7 +49,7 @@ impl SplitImpl { pub fn process(self, mut trait_: ItemTrait) -> TokenStream { let mut attrs = Vec::with_capacity(trait_.attrs.len()); for attr in &trait_.attrs { - if utils::propegate_attr_to_impl(attr) { + if utils::propagate_attr_to_impl(attr) { attrs.push(attr.clone()); } } diff --git a/lib/src/utils.rs b/lib/src/utils.rs index 63952a9..8787569 100644 --- a/lib/src/utils.rs +++ b/lib/src/utils.rs @@ -22,7 +22,7 @@ impl PathAsStr for Attribute { /// /// This is a HACK: there is no definitive determination of which attributes /// should be emitted on the generated impl fn items. We use a whitelist. -pub fn propegate_attr_to_impl(attr: &Attribute) -> bool { +pub(crate) fn propagate_attr_to_impl(attr: &Attribute) -> bool { matches!( attr.path_as_string().as_str(), "cfg" | "allow" | "warn" | "deny" | "forbid" diff --git a/src/lib.rs b/src/lib.rs index 6f4f9cb..69930c0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,7 @@ // https://www.apache.org/licenses/LICENSE-2.0 #![allow(clippy::needless_doctest_main)] -// Lint advocates use of bool::then_some, stablizied in rustc 1.62.0 +// Lint advocates use of bool::then_some, stabilized in rustc 1.62.0 #![allow(clippy::unnecessary_lazy_evaluations)] //! # Impl-tools @@ -17,7 +17,7 @@ //! //! [`#[impl_self]`](macro@impl_self) provides `impl Self` syntax, avoiding the //! need to repeat generics when writing impls on a local type definition. -//! This supercedes [`impl_scope!`] (except regarding [`macro@impl_default`]). +//! This supersedes [`impl_scope!`] (except regarding [`macro@impl_default`]). //! //! [`impl_anon!`] is a function-like macro used to define and instantiate a //! unique (single-use) type. It supports everything supported by [`impl_scope!`]