@@ -304,36 +304,19 @@ mod tests {
304304 check_assist (
305305 replace_derive_with_manual_impl,
306306 r#"
307- mod fmt {
308- pub struct Error;
309- pub type Result = Result<(), Error>;
310- pub struct Formatter<'a>;
311- pub trait Debug {
312- fn fmt(&self, f: &mut Formatter<'_>) -> Result;
313- }
314- }
315-
307+ //- minicore: fmt
316308#[derive(Debu$0g)]
317309struct Foo {
318310 bar: String,
319311}
320312"# ,
321313 r#"
322- mod fmt {
323- pub struct Error;
324- pub type Result = Result<(), Error>;
325- pub struct Formatter<'a>;
326- pub trait Debug {
327- fn fmt(&self, f: &mut Formatter<'_>) -> Result;
328- }
329- }
330-
331314struct Foo {
332315 bar: String,
333316}
334317
335- impl fmt::Debug for Foo {
336- $0fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
318+ impl core:: fmt::Debug for Foo {
319+ $0fn fmt(&self, f: &mut core:: fmt::Formatter<'_>) -> core:: fmt::Result {
337320 f.debug_struct("Foo").field("bar", &self.bar).finish()
338321 }
339322}
@@ -345,32 +328,14 @@ impl fmt::Debug for Foo {
345328 check_assist (
346329 replace_derive_with_manual_impl,
347330 r#"
348- mod fmt {
349- pub struct Error;
350- pub type Result = Result<(), Error>;
351- pub struct Formatter<'a>;
352- pub trait Debug {
353- fn fmt(&self, f: &mut Formatter<'_>) -> Result;
354- }
355- }
356-
331+ //- minicore: fmt
357332#[derive(Debu$0g)]
358333struct Foo(String, usize);
359334"# ,
360- r#"
361- mod fmt {
362- pub struct Error;
363- pub type Result = Result<(), Error>;
364- pub struct Formatter<'a>;
365- pub trait Debug {
366- fn fmt(&self, f: &mut Formatter<'_>) -> Result;
367- }
368- }
369-
370- struct Foo(String, usize);
335+ r#"struct Foo(String, usize);
371336
372- impl fmt::Debug for Foo {
373- $0fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
337+ impl core:: fmt::Debug for Foo {
338+ $0fn fmt(&self, f: &mut core:: fmt::Formatter<'_>) -> core:: fmt::Result {
374339 f.debug_tuple("Foo").field(&self.0).field(&self.1).finish()
375340 }
376341}
@@ -382,32 +347,15 @@ impl fmt::Debug for Foo {
382347 check_assist (
383348 replace_derive_with_manual_impl,
384349 r#"
385- mod fmt {
386- pub struct Error;
387- pub type Result = Result<(), Error>;
388- pub struct Formatter<'a>;
389- pub trait Debug {
390- fn fmt(&self, f: &mut Formatter<'_>) -> Result;
391- }
392- }
393-
350+ //- minicore: fmt
394351#[derive(Debu$0g)]
395352struct Foo;
396353"# ,
397354 r#"
398- mod fmt {
399- pub struct Error;
400- pub type Result = Result<(), Error>;
401- pub struct Formatter<'a>;
402- pub trait Debug {
403- fn fmt(&self, f: &mut Formatter<'_>) -> Result;
404- }
405- }
406-
407355struct Foo;
408356
409- impl fmt::Debug for Foo {
410- $0fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
357+ impl core:: fmt::Debug for Foo {
358+ $0fn fmt(&self, f: &mut core:: fmt::Formatter<'_>) -> core:: fmt::Result {
411359 f.debug_struct("Foo").finish()
412360 }
413361}
@@ -419,38 +367,21 @@ impl fmt::Debug for Foo {
419367 check_assist (
420368 replace_derive_with_manual_impl,
421369 r#"
422- mod fmt {
423- pub struct Error;
424- pub type Result = Result<(), Error>;
425- pub struct Formatter<'a>;
426- pub trait Debug {
427- fn fmt(&self, f: &mut Formatter<'_>) -> Result;
428- }
429- }
430-
370+ //- minicore: fmt
431371#[derive(Debu$0g)]
432372enum Foo {
433373 Bar,
434374 Baz,
435375}
436376"# ,
437377 r#"
438- mod fmt {
439- pub struct Error;
440- pub type Result = Result<(), Error>;
441- pub struct Formatter<'a>;
442- pub trait Debug {
443- fn fmt(&self, f: &mut Formatter<'_>) -> Result;
444- }
445- }
446-
447378enum Foo {
448379 Bar,
449380 Baz,
450381}
451382
452- impl fmt::Debug for Foo {
453- $0fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
383+ impl core:: fmt::Debug for Foo {
384+ $0fn fmt(&self, f: &mut core:: fmt::Formatter<'_>) -> core:: fmt::Result {
454385 match self {
455386 Self::Bar => write!(f, "Bar"),
456387 Self::Baz => write!(f, "Baz"),
0 commit comments