Skip to content

Commit 7eaf870

Browse files
authored
Fix typos (#74)
1 parent d9f4c3f commit 7eaf870

File tree

5 files changed

+28
-28
lines changed

5 files changed

+28
-28
lines changed

src/test/basic.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn struct_() -> Result<()> {
88
test_derive(
99
quote! {
1010
#[derive_where(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
11-
struct Test<T> { field: std::marker::PhatomData<T> }
11+
struct Test<T> { field: std::marker::PhantomData<T> }
1212
},
1313
quote! {
1414
impl<T> ::core::clone::Clone for Test<T> {
@@ -45,7 +45,7 @@ fn struct_() -> Result<()> {
4545
struct __AssertEq<__T: ::core::cmp::Eq + ?::core::marker::Sized>(::core::marker::PhantomData<__T>);
4646

4747
// For some reason the comparison fails without the extra space at the end.
48-
let _: __AssertEq<std::marker::PhatomData<T> >;
48+
let _: __AssertEq<std::marker::PhantomData<T> >;
4949
}
5050
}
5151

@@ -95,7 +95,7 @@ fn tuple() -> Result<()> {
9595
test_derive(
9696
quote! {
9797
#[derive_where(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
98-
struct Test<T>(std::marker::PhatomData<T>);
98+
struct Test<T>(std::marker::PhantomData<T>);
9999
},
100100
quote! {
101101
impl<T> ::core::clone::Clone for Test<T> {
@@ -132,7 +132,7 @@ fn tuple() -> Result<()> {
132132
struct __AssertEq<__T: ::core::cmp::Eq + ?::core::marker::Sized>(::core::marker::PhantomData<__T>);
133133

134134
// For some reason the comparison fails without the extra space at the end.
135-
let _: __AssertEq<std::marker::PhatomData<T> >;
135+
let _: __AssertEq<std::marker::PhantomData<T> >;
136136
}
137137
}
138138

@@ -228,9 +228,9 @@ fn enum_() -> Result<()> {
228228
quote! {
229229
#[derive_where(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
230230
enum Test<T> {
231-
A { field: std::marker::PhatomData<T>},
231+
A { field: std::marker::PhantomData<T>},
232232
B { },
233-
C(std::marker::PhatomData<T>),
233+
C(std::marker::PhantomData<T>),
234234
D(),
235235
#[derive_where(default)]
236236
E,
@@ -285,8 +285,8 @@ fn enum_() -> Result<()> {
285285
struct __AssertEq<__T: ::core::cmp::Eq + ?::core::marker::Sized>(::core::marker::PhantomData<__T>);
286286

287287
// For some reason the comparison fails without the extra space at the end.
288-
let _: __AssertEq<std::marker::PhatomData<T> >;
289-
let _: __AssertEq<std::marker::PhatomData<T> >;
288+
let _: __AssertEq<std::marker::PhantomData<T> >;
289+
let _: __AssertEq<std::marker::PhantomData<T> >;
290290
}
291291
}
292292

src/test/bound.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ fn check_trait_bounds() -> Result<()> {
144144
test_derive(
145145
quote! {
146146
#[derive_where(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd; T)]
147-
struct Test<T, U>(T, std::marker::PhatomData<U>);
147+
struct Test<T, U>(T, std::marker::PhantomData<U>);
148148
},
149149
quote! {
150150
impl<T, U> ::core::clone::Clone for Test<T, U>
@@ -192,7 +192,7 @@ fn check_trait_bounds() -> Result<()> {
192192

193193
// For some reason the comparison fails without the extra space at the end.
194194
let _: __AssertEq<T >;
195-
let _: __AssertEq<std::marker::PhatomData<U> >;
195+
let _: __AssertEq<std::marker::PhantomData<U> >;
196196
}
197197
}
198198

@@ -267,7 +267,7 @@ fn check_multiple_trait_bounds() -> Result<()> {
267267
test_derive(
268268
quote! {
269269
#[derive_where(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd; T, U)]
270-
struct Test<T, U, V>(T, std::marker::PhatomData<(U, V)>);
270+
struct Test<T, U, V>(T, std::marker::PhantomData<(U, V)>);
271271
},
272272
quote! {
273273
impl<T, U, V> ::core::clone::Clone for Test<T, U, V>
@@ -325,7 +325,7 @@ fn check_multiple_trait_bounds() -> Result<()> {
325325

326326
// For some reason the comparison fails without the extra space at the end.
327327
let _: __AssertEq<T >;
328-
let _: __AssertEq<std::marker::PhatomData<(U, V)> >;
328+
let _: __AssertEq<std::marker::PhantomData<(U, V)> >;
329329
}
330330
}
331331

src/test/clone.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn struct_() -> Result<()> {
88
test_derive(
99
quote! {
1010
#[derive_where(Clone)]
11-
struct Test<T> { field: std::marker::PhatomData<T> }
11+
struct Test<T> { field: std::marker::PhantomData<T> }
1212
},
1313
quote! {
1414
impl<T> ::core::clone::Clone for Test<T> {
@@ -28,7 +28,7 @@ fn tuple() -> Result<()> {
2828
test_derive(
2929
quote! {
3030
#[derive_where(Clone)]
31-
struct Test<T>(std::marker::PhatomData<T>);
31+
struct Test<T>(std::marker::PhantomData<T>);
3232
},
3333
quote! {
3434
impl<T> ::core::clone::Clone for Test<T> {
@@ -49,9 +49,9 @@ fn enum_() -> Result<()> {
4949
quote! {
5050
#[derive_where(Clone)]
5151
enum Test<T> {
52-
A { field: std::marker::PhatomData<T>},
52+
A { field: std::marker::PhantomData<T>},
5353
B { },
54-
C(std::marker::PhatomData<T>),
54+
C(std::marker::PhantomData<T>),
5555
D(),
5656
E,
5757
}

src/test/partial_ord.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn struct_() -> Result<()> {
88
test_derive(
99
quote! {
1010
#[derive_where(PartialOrd)]
11-
struct Test<T> { field: std::marker::PhatomData<T> }
11+
struct Test<T> { field: std::marker::PhantomData<T> }
1212
},
1313
quote! {
1414
impl<T> ::core::cmp::PartialOrd for Test<T> {
@@ -32,7 +32,7 @@ fn tuple() -> Result<()> {
3232
test_derive(
3333
quote! {
3434
#[derive_where(PartialOrd)]
35-
struct Test<T>(std::marker::PhatomData<T>);
35+
struct Test<T>(std::marker::PhantomData<T>);
3636
},
3737
quote! {
3838
impl<T> ::core::cmp::PartialOrd for Test<T> {
@@ -101,9 +101,9 @@ fn enum_() -> Result<()> {
101101
quote! {
102102
#[derive_where(PartialOrd)]
103103
enum Test<T> {
104-
A { field: std::marker::PhatomData<T>},
104+
A { field: std::marker::PhantomData<T>},
105105
B { },
106-
C(std::marker::PhatomData<T>),
106+
C(std::marker::PhantomData<T>),
107107
D(),
108108
E,
109109
}

src/test/skip.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fn struct_inner() -> Result<()> {
99
quote! {
1010
#[derive_where(Debug)]
1111
#[derive_where(skip_inner)]
12-
struct Test<T>(std::marker::PhatomData<T>);
12+
struct Test<T>(std::marker::PhantomData<T>);
1313
},
1414
quote! {
1515
impl<T> ::core::fmt::Debug for Test<T> {
@@ -33,7 +33,7 @@ fn enum_inner() -> Result<()> {
3333
#[derive_where(Debug)]
3434
enum Test<T> {
3535
#[derive_where(skip_inner)]
36-
A(std::marker::PhatomData<T>),
36+
A(std::marker::PhantomData<T>),
3737
}
3838
},
3939
quote! {
@@ -57,7 +57,7 @@ fn struct_empty() -> Result<()> {
5757
quote! {
5858
#[derive_where(Ord)]
5959
#[derive_where(skip_inner)]
60-
struct Test<T>(std::marker::PhatomData<T>);
60+
struct Test<T>(std::marker::PhantomData<T>);
6161
},
6262
quote! {
6363
impl<T> ::core::cmp::Ord for Test<T> {
@@ -77,7 +77,7 @@ fn variant_empty() -> Result<()> {
7777
#[derive_where(Ord)]
7878
enum Test<T> {
7979
#[derive_where(skip_inner)]
80-
A(std::marker::PhatomData<T>),
80+
A(std::marker::PhantomData<T>),
8181
}
8282
},
8383
quote! {
@@ -128,9 +128,9 @@ fn variants_empty() -> Result<()> {
128128
#[derive_where(Ord)]
129129
enum Test<T> {
130130
#[derive_where(skip_inner)]
131-
A(std::marker::PhatomData<T>),
131+
A(std::marker::PhantomData<T>),
132132
#[derive_where(skip_inner)]
133-
B(std::marker::PhatomData<T>),
133+
B(std::marker::PhantomData<T>),
134134
}
135135
},
136136
quote! {
@@ -187,8 +187,8 @@ fn variants_partly_empty() -> Result<()> {
187187
#[derive_where(Ord)]
188188
enum Test<T> {
189189
#[derive_where(skip_inner)]
190-
A(std::marker::PhatomData<T>),
191-
B(#[derive_where(skip)] std::marker::PhatomData<T>, std::marker::PhatomData<T>),
190+
A(std::marker::PhantomData<T>),
191+
B(#[derive_where(skip)] std::marker::PhantomData<T>, std::marker::PhantomData<T>),
192192
}
193193
},
194194
quote! {

0 commit comments

Comments
 (0)