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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.3.0"
authors = ["Gary Guo <gary@garyguo.net>", "Benno Lossin <lossin@kernel.org>"]
edition = "2024"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/nbdd0121/field-projection"
repository = "https://github.com/Rust-for-Linux/field-projection"
keywords = ["macros", "attribute"]
categories = ["no-std", "rust-patterns"]
description = """
Expand Down
2 changes: 1 addition & 1 deletion internal/src/has_fields.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ pub fn derive(
false => (quote!(&#lt mut #ty), quote!(#r)),
};
quote! {
unsafe impl #impl_gen #core_::marker::PinableField
unsafe impl #impl_gen #core_::marker::PinnableField
for #field_info #info_ty_gen
#whr
{
Expand Down
2 changes: 1 addition & 1 deletion src/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub unsafe trait Field: UnalignedField {}
///
/// `Self::Projected<'a>` either is `Pin<&'a mut Self::Type>` or `&'a mut Self::Type`. In the first
/// case the field is structurally pinned.
pub unsafe trait PinableField: UnalignedField {
pub unsafe trait PinnableField: UnalignedField {
/// The pin-projected type of `Self`.
///
/// Either `Pin<&'a mut Self::Type>` or `&'a mut Self::Type`.
Expand Down
4 changes: 2 additions & 2 deletions src/ops.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
compat,
marker::{Field, PinableField, UnalignedField},
marker::{Field, PinnableField, UnalignedField},
};

/// Type supporting field projections.
Expand All @@ -11,7 +11,7 @@ use crate::{
/// ident in the expressions `@base->field` and `@mut base->field` refer to a field of the type
/// `Self::Inner`.
///
/// If the projection `@base->field` is available still depends on weather `Self` implements
/// If the projection `@base->field` is available still depends on whether `Self` implements
/// `Project<field_of!(Self::Inner, field)>`.
pub trait Projectable: Sized {
type Inner: ?Sized;
Expand Down
4 changes: 2 additions & 2 deletions src/projections/pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ unsafe impl<T> SafeProject for Pin<&mut T> {}
// No additional safety requirements for `project_mut`.
impl<'a, T, F> Project<F> for Pin<&'a mut T>
where
F: PinableField<Base = T> + Field<Base = T>,
F: PinnableField<Base = T> + Field<Base = T>,
F::Type: Sized + 'a,
{
type Output<'b>
Expand All @@ -31,7 +31,7 @@ where
// No additional safety requirements for `project_mut`.
impl<'a, T, F> ProjectMut<F> for Pin<&'a mut T>
where
F: PinableField<Base = T> + Field<Base = T>,
F: PinnableField<Base = T> + Field<Base = T>,
F::Type: Sized + 'a,
{
type OutputMut<'b>
Expand Down