diff --git a/Cargo.toml b/Cargo.toml index b815ecc..daa741c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "0.3.0" authors = ["Gary Guo ", "Benno Lossin "] 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 = """ diff --git a/internal/src/has_fields.rs b/internal/src/has_fields.rs index aadb21d..0e88927 100644 --- a/internal/src/has_fields.rs +++ b/internal/src/has_fields.rs @@ -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 { diff --git a/src/marker.rs b/src/marker.rs index 0979b4d..ca8c3f6 100644 --- a/src/marker.rs +++ b/src/marker.rs @@ -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`. diff --git a/src/ops.rs b/src/ops.rs index ef3d6f3..a2a6776 100644 --- a/src/ops.rs +++ b/src/ops.rs @@ -1,6 +1,6 @@ use crate::{ compat, - marker::{Field, PinableField, UnalignedField}, + marker::{Field, PinnableField, UnalignedField}, }; /// Type supporting field projections. @@ -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`. pub trait Projectable: Sized { type Inner: ?Sized; diff --git a/src/projections/pin.rs b/src/projections/pin.rs index d5a09c2..df7f8a8 100644 --- a/src/projections/pin.rs +++ b/src/projections/pin.rs @@ -10,7 +10,7 @@ unsafe impl SafeProject for Pin<&mut T> {} // No additional safety requirements for `project_mut`. impl<'a, T, F> Project for Pin<&'a mut T> where - F: PinableField + Field, + F: PinnableField + Field, F::Type: Sized + 'a, { type Output<'b> @@ -31,7 +31,7 @@ where // No additional safety requirements for `project_mut`. impl<'a, T, F> ProjectMut for Pin<&'a mut T> where - F: PinableField + Field, + F: PinnableField + Field, F::Type: Sized + 'a, { type OutputMut<'b>