Skip to content

Commit 0528fb8

Browse files
authored
Merge pull request #1 from ojeda/prerfc-v3-comments
Nits from the pre-RFC v3 comments
2 parents 7f5b713 + 9f3bf0c commit 0528fb8

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.3.0"
44
authors = ["Gary Guo <[email protected]>", "Benno Lossin <[email protected]>"]
55
edition = "2024"
66
license = "Apache-2.0 OR MIT"
7-
repository = "https://github.com/nbdd0121/field-projection"
7+
repository = "https://github.com/Rust-for-Linux/field-projection"
88
keywords = ["macros", "attribute"]
99
categories = ["no-std", "rust-patterns"]
1010
description = """

internal/src/has_fields.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ pub fn derive(
120120
false => (quote!(&#lt mut #ty), quote!(#r)),
121121
};
122122
quote! {
123-
unsafe impl #impl_gen #core_::marker::PinableField
123+
unsafe impl #impl_gen #core_::marker::PinnableField
124124
for #field_info #info_ty_gen
125125
#whr
126126
{

src/marker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub unsafe trait Field: UnalignedField {}
2929
///
3030
/// `Self::Projected<'a>` either is `Pin<&'a mut Self::Type>` or `&'a mut Self::Type`. In the first
3131
/// case the field is structurally pinned.
32-
pub unsafe trait PinableField: UnalignedField {
32+
pub unsafe trait PinnableField: UnalignedField {
3333
/// The pin-projected type of `Self`.
3434
///
3535
/// Either `Pin<&'a mut Self::Type>` or `&'a mut Self::Type`.

src/ops.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{
22
compat,
3-
marker::{Field, PinableField, UnalignedField},
3+
marker::{Field, PinnableField, UnalignedField},
44
};
55

66
/// Type supporting field projections.
@@ -11,7 +11,7 @@ use crate::{
1111
/// ident in the expressions `@base->field` and `@mut base->field` refer to a field of the type
1212
/// `Self::Inner`.
1313
///
14-
/// If the projection `@base->field` is available still depends on weather `Self` implements
14+
/// If the projection `@base->field` is available still depends on whether `Self` implements
1515
/// `Project<field_of!(Self::Inner, field)>`.
1616
pub trait Projectable: Sized {
1717
type Inner: ?Sized;

src/projections/pin.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ unsafe impl<T> SafeProject for Pin<&mut T> {}
1010
// No additional safety requirements for `project_mut`.
1111
impl<'a, T, F> Project<F> for Pin<&'a mut T>
1212
where
13-
F: PinableField<Base = T> + Field<Base = T>,
13+
F: PinnableField<Base = T> + Field<Base = T>,
1414
F::Type: Sized + 'a,
1515
{
1616
type Output<'b>
@@ -31,7 +31,7 @@ where
3131
// No additional safety requirements for `project_mut`.
3232
impl<'a, T, F> ProjectMut<F> for Pin<&'a mut T>
3333
where
34-
F: PinableField<Base = T> + Field<Base = T>,
34+
F: PinnableField<Base = T> + Field<Base = T>,
3535
F::Type: Sized + 'a,
3636
{
3737
type OutputMut<'b>

0 commit comments

Comments
 (0)