@@ -16,13 +16,12 @@ struct Foo;
16
16
#[derive(Copy)]
17
17
struct Foo;
18
18
19
- impl < > core ::marker::Copy for Foo< > where {}"# ] ] ,
19
+ impl < > $crate ::marker::Copy for Foo< > where {}"# ] ] ,
20
20
) ;
21
21
}
22
22
23
23
#[ test]
24
24
fn test_copy_expand_in_core ( ) {
25
- cov_mark:: check!( test_copy_expand_in_core) ;
26
25
check (
27
26
r#"
28
27
//- /lib.rs crate:core
@@ -41,7 +40,7 @@ macro Copy {}
41
40
#[derive(Copy)]
42
41
struct Foo;
43
42
44
- impl < > crate ::marker::Copy for Foo< > where {}"# ] ] ,
43
+ impl < > $ crate::marker::Copy for Foo< > where {}"# ] ] ,
45
44
) ;
46
45
}
47
46
@@ -57,7 +56,7 @@ struct Foo<A, B>;
57
56
#[derive(Copy)]
58
57
struct Foo<A, B>;
59
58
60
- impl <A: core ::marker::Copy, B: core ::marker::Copy, > core ::marker::Copy for Foo<A, B, > where {}"# ] ] ,
59
+ impl <A: $crate ::marker::Copy, B: $crate ::marker::Copy, > $crate ::marker::Copy for Foo<A, B, > where {}"# ] ] ,
61
60
) ;
62
61
}
63
62
@@ -74,7 +73,7 @@ struct Foo<A, B, 'a, 'b>;
74
73
#[derive(Copy)]
75
74
struct Foo<A, B, 'a, 'b>;
76
75
77
- impl <A: core ::marker::Copy, B: core ::marker::Copy, > core ::marker::Copy for Foo<A, B, > where {}"# ] ] ,
76
+ impl <A: $crate ::marker::Copy, B: $crate ::marker::Copy, > $crate ::marker::Copy for Foo<A, B, > where {}"# ] ] ,
78
77
) ;
79
78
}
80
79
@@ -98,7 +97,7 @@ enum Command<A, B> {
98
97
Jump,
99
98
}
100
99
101
- impl <A: core ::clone::Clone, B: core ::clone::Clone, > core ::clone::Clone for Command<A, B, > where {
100
+ impl <A: $crate ::clone::Clone, B: $crate ::clone::Clone, > $crate ::clone::Clone for Command<A, B, > where {
102
101
fn clone(&self ) -> Self {
103
102
match self {
104
103
Command::Move {
@@ -158,7 +157,7 @@ where
158
157
generic: Vec<T::InGenericArg>,
159
158
}
160
159
161
- impl <T: core ::clone::Clone, > core ::clone::Clone for Foo<T, > where T: Trait, T::InFieldShorthand: core ::clone::Clone, T::InGenericArg: core ::clone::Clone, {
160
+ impl <T: $crate ::clone::Clone, > $crate ::clone::Clone for Foo<T, > where T: Trait, T::InFieldShorthand: $crate ::clone::Clone, T::InGenericArg: $crate ::clone::Clone, {
162
161
fn clone(&self ) -> Self {
163
162
match self {
164
163
Foo {
@@ -186,7 +185,7 @@ struct Foo<const X: usize, T>(u32);
186
185
#[derive(Clone)]
187
186
struct Foo<const X: usize, T>(u32);
188
187
189
- impl <const X: usize, T: core ::clone::Clone, > core ::clone::Clone for Foo<X, T, > where {
188
+ impl <const X: usize, T: $crate ::clone::Clone, > $crate ::clone::Clone for Foo<X, T, > where {
190
189
fn clone(&self ) -> Self {
191
190
match self {
192
191
Foo(f0, )=>Foo(f0.clone(), ),
@@ -226,14 +225,14 @@ enum Bar {
226
225
Bar,
227
226
}
228
227
229
- impl < > core ::default::Default for Foo< > where {
228
+ impl < > $crate ::default::Default for Foo< > where {
230
229
fn default() -> Self {
231
230
Foo {
232
- field1: core ::default::Default::default(), field2: core ::default::Default::default(),
231
+ field1: $crate ::default::Default::default(), field2: $crate ::default::Default::default(),
233
232
}
234
233
}
235
234
}
236
- impl < > core ::default::Default for Bar< > where {
235
+ impl < > $crate ::default::Default for Bar< > where {
237
236
fn default() -> Self {
238
237
Bar::Bar
239
238
}
@@ -261,7 +260,7 @@ enum Command {
261
260
Jump,
262
261
}
263
262
264
- impl < > core ::cmp::PartialEq for Command< > where {
263
+ impl < > $crate ::cmp::PartialEq for Command< > where {
265
264
fn eq(&self , other: &Self ) -> bool {
266
265
match (self , other) {
267
266
(Command::Move {
@@ -274,7 +273,7 @@ impl < > core::cmp::PartialEq for Command< > where {
274
273
}
275
274
}
276
275
}
277
- impl < > core ::cmp::Eq for Command< > where {}"# ] ] ,
276
+ impl < > $crate ::cmp::Eq for Command< > where {}"# ] ] ,
278
277
) ;
279
278
}
280
279
@@ -299,7 +298,7 @@ enum Command {
299
298
Jump,
300
299
}
301
300
302
- impl < > core ::cmp::PartialEq for Command< > where {
301
+ impl < > $crate ::cmp::PartialEq for Command< > where {
303
302
fn eq(&self , other: &Self ) -> bool {
304
303
match (self , other) {
305
304
(Command::Move {
@@ -312,7 +311,7 @@ impl < > core::cmp::PartialEq for Command< > where {
312
311
}
313
312
}
314
313
}
315
- impl < > core ::cmp::Eq for Command< > where {}"# ] ] ,
314
+ impl < > $crate ::cmp::Eq for Command< > where {}"# ] ] ,
316
315
) ;
317
316
}
318
317
@@ -336,10 +335,10 @@ enum Command {
336
335
Jump,
337
336
}
338
337
339
- impl < > core ::cmp::PartialOrd for Command< > where {
340
- fn partial_cmp(&self , other: &Self ) -> core ::option::Option::Option<core ::cmp::Ordering> {
341
- match core ::intrinsics::discriminant_value(self ).partial_cmp(&core ::intrinsics::discriminant_value(other)) {
342
- core ::option::Option::Some(core ::cmp::Ordering::Equal)=> {
338
+ impl < > $crate ::cmp::PartialOrd for Command< > where {
339
+ fn partial_cmp(&self , other: &Self ) -> $crate ::option::Option::Option<$crate ::cmp::Ordering> {
340
+ match $crate ::intrinsics::discriminant_value(self ).partial_cmp(&$crate ::intrinsics::discriminant_value(other)) {
341
+ $crate ::option::Option::Some($crate ::cmp::Ordering::Equal)=> {
343
342
match (self , other) {
344
343
(Command::Move {
345
344
x: x_self, y: y_self,
@@ -348,33 +347,33 @@ impl < > core::cmp::PartialOrd for Command< > where {
348
347
x: x_other, y: y_other,
349
348
}
350
349
)=>match x_self.partial_cmp(&x_other) {
351
- core ::option::Option::Some(core ::cmp::Ordering::Equal)=> {
350
+ $crate ::option::Option::Some($crate ::cmp::Ordering::Equal)=> {
352
351
match y_self.partial_cmp(&y_other) {
353
- core ::option::Option::Some(core ::cmp::Ordering::Equal)=> {
354
- core ::option::Option::Some(core ::cmp::Ordering::Equal)
352
+ $crate ::option::Option::Some($crate ::cmp::Ordering::Equal)=> {
353
+ $crate ::option::Option::Some($crate ::cmp::Ordering::Equal)
355
354
}
356
355
c=>return c,
357
356
}
358
357
}
359
358
c=>return c,
360
359
}
361
360
, (Command::Do(f0_self, ), Command::Do(f0_other, ))=>match f0_self.partial_cmp(&f0_other) {
362
- core ::option::Option::Some(core ::cmp::Ordering::Equal)=> {
363
- core ::option::Option::Some(core ::cmp::Ordering::Equal)
361
+ $crate ::option::Option::Some($crate ::cmp::Ordering::Equal)=> {
362
+ $crate ::option::Option::Some($crate ::cmp::Ordering::Equal)
364
363
}
365
364
c=>return c,
366
365
}
367
- , (Command::Jump, Command::Jump)=>core ::option::Option::Some(core ::cmp::Ordering::Equal), _unused=>core ::option::Option::Some(core ::cmp::Ordering::Equal)
366
+ , (Command::Jump, Command::Jump)=>$crate ::option::Option::Some($crate ::cmp::Ordering::Equal), _unused=>$crate ::option::Option::Some($crate ::cmp::Ordering::Equal)
368
367
}
369
368
}
370
369
c=>return c,
371
370
}
372
371
}
373
372
}
374
- impl < > core ::cmp::Ord for Command< > where {
375
- fn cmp(&self , other: &Self ) -> core ::cmp::Ordering {
376
- match core ::intrinsics::discriminant_value(self ).cmp(&core ::intrinsics::discriminant_value(other)) {
377
- core ::cmp::Ordering::Equal=> {
373
+ impl < > $crate ::cmp::Ord for Command< > where {
374
+ fn cmp(&self , other: &Self ) -> $crate ::cmp::Ordering {
375
+ match $crate ::intrinsics::discriminant_value(self ).cmp(&$crate ::intrinsics::discriminant_value(other)) {
376
+ $crate ::cmp::Ordering::Equal=> {
378
377
match (self , other) {
379
378
(Command::Move {
380
379
x: x_self, y: y_self,
@@ -383,23 +382,23 @@ impl < > core::cmp::Ord for Command< > where {
383
382
x: x_other, y: y_other,
384
383
}
385
384
)=>match x_self.cmp(&x_other) {
386
- core ::cmp::Ordering::Equal=> {
385
+ $crate ::cmp::Ordering::Equal=> {
387
386
match y_self.cmp(&y_other) {
388
- core ::cmp::Ordering::Equal=> {
389
- core ::cmp::Ordering::Equal
387
+ $crate ::cmp::Ordering::Equal=> {
388
+ $crate ::cmp::Ordering::Equal
390
389
}
391
390
c=>return c,
392
391
}
393
392
}
394
393
c=>return c,
395
394
}
396
395
, (Command::Do(f0_self, ), Command::Do(f0_other, ))=>match f0_self.cmp(&f0_other) {
397
- core ::cmp::Ordering::Equal=> {
398
- core ::cmp::Ordering::Equal
396
+ $crate ::cmp::Ordering::Equal=> {
397
+ $crate ::cmp::Ordering::Equal
399
398
}
400
399
c=>return c,
401
400
}
402
- , (Command::Jump, Command::Jump)=>core ::cmp::Ordering::Equal, _unused=>core ::cmp::Ordering::Equal
401
+ , (Command::Jump, Command::Jump)=>$crate ::cmp::Ordering::Equal, _unused=>$crate ::cmp::Ordering::Equal
403
402
}
404
403
}
405
404
c=>return c,
@@ -433,8 +432,8 @@ struct Foo {
433
432
z: (i32, u64),
434
433
}
435
434
436
- impl < > core ::hash::Hash for Foo< > where {
437
- fn hash<H: core ::hash::Hasher>(&self , ra_expand_state: &mut H) {
435
+ impl < > $crate ::hash::Hash for Foo< > where {
436
+ fn hash<H: $crate ::hash::Hasher>(&self , ra_expand_state: &mut H) {
438
437
match self {
439
438
Foo {
440
439
x: x, y: y, z: z,
@@ -471,9 +470,9 @@ enum Command {
471
470
Jump,
472
471
}
473
472
474
- impl < > core ::hash::Hash for Command< > where {
475
- fn hash<H: core ::hash::Hasher>(&self , ra_expand_state: &mut H) {
476
- core ::mem::discriminant(self ).hash(ra_expand_state);
473
+ impl < > $crate ::hash::Hash for Command< > where {
474
+ fn hash<H: $crate ::hash::Hasher>(&self , ra_expand_state: &mut H) {
475
+ $crate ::mem::discriminant(self ).hash(ra_expand_state);
477
476
match self {
478
477
Command::Move {
479
478
x: x, y: y,
@@ -517,8 +516,8 @@ enum Command {
517
516
Jump,
518
517
}
519
518
520
- impl < > core ::fmt::Debug for Command< > where {
521
- fn fmt(&self , f: &mut core ::fmt::Formatter) -> core ::fmt::Result {
519
+ impl < > $crate ::fmt::Debug for Command< > where {
520
+ fn fmt(&self , f: &mut $crate ::fmt::Formatter) -> $crate ::fmt::Result {
522
521
match self {
523
522
Command::Move {
524
523
x: x, y: y,
0 commit comments