Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions lib/src/autoimpl/for_deref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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);
}
}
Expand All @@ -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);
};
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]

Expand Down
2 changes: 1 addition & 1 deletion lib/src/split_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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!`]
Expand Down