@@ -117,8 +117,6 @@ pub trait Write {
117
117
///
118
118
/// This function will return an instance of [`Error`] on error.
119
119
///
120
- /// [`Error`]: struct.Error.html
121
- ///
122
120
/// # Examples
123
121
///
124
122
/// ```
@@ -146,9 +144,6 @@ pub trait Write {
146
144
///
147
145
/// This function will return an instance of [`Error`] on error.
148
146
///
149
- /// [`char`]: ../../std/primitive.char.html
150
- /// [`Error`]: struct.Error.html
151
- ///
152
147
/// # Examples
153
148
///
154
149
/// ```
@@ -218,9 +213,6 @@ impl<W: Write + ?Sized> Write for &mut W {
218
213
/// To interact with a `Formatter`, you'll call various methods to change the
219
214
/// various options related to formatting. For examples, please see the
220
215
/// documentation of the methods defined on `Formatter` below.
221
- ///
222
- /// [`Debug`]: trait.Debug.html
223
- /// [`Display`]: trait.Display.html
224
216
#[ allow( missing_debug_implementations) ]
225
217
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
226
218
pub struct Formatter < ' a > {
@@ -378,7 +370,7 @@ impl<'a> Arguments<'a> {
378
370
///
379
371
/// The [`format_args!`] macro will safely create an instance of this structure.
380
372
/// The macro validates the format string at compile-time so usage of the
381
- /// [`write`] and [`format`] functions can be safely performed.
373
+ /// [`write() `] and [`format() `] functions can be safely performed.
382
374
///
383
375
/// You can use the `Arguments<'a>` that [`format_args!`] returns in `Debug`
384
376
/// and `Display` contexts as seen below. The example also shows that `Debug`
@@ -392,9 +384,7 @@ impl<'a> Arguments<'a> {
392
384
/// assert_eq!(display, debug);
393
385
/// ```
394
386
///
395
- /// [`format_args!`]: ../../std/macro.format_args.html
396
- /// [`format`]: ../../std/fmt/fn.format.html
397
- /// [`write`]: ../../std/fmt/fn.write.html
387
+ /// [`format()`]: ../../std/fmt/fn.format.html
398
388
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
399
389
#[ derive( Copy , Clone ) ]
400
390
pub struct Arguments < ' a > {
@@ -472,9 +462,7 @@ impl Display for Arguments<'_> {
472
462
///
473
463
/// When used with the alternate format specifier `#?`, the output is pretty-printed.
474
464
///
475
- /// For more information on formatters, see [the module-level documentation][module].
476
- ///
477
- /// [module]: ../../std/fmt/index.html
465
+ /// For more information on formatters, see [the module-level documentation][self].
478
466
///
479
467
/// This trait can be used with `#[derive]` if all fields implement `Debug`. When
480
468
/// `derive`d for structs, it will use the name of the `struct`, then `{`, then a
@@ -535,8 +523,7 @@ impl Display for Arguments<'_> {
535
523
/// `Debug` implementations using either `derive` or the debug builder API
536
524
/// on [`Formatter`] support pretty-printing using the alternate flag: `{:#?}`.
537
525
///
538
- /// [`debug_struct`]: ../../std/fmt/struct.Formatter.html#method.debug_struct
539
- /// [`Formatter`]: ../../std/fmt/struct.Formatter.html
526
+ /// [`debug_struct`]: Formatter::debug_struct
540
527
///
541
528
/// Pretty-printing with `#?`:
542
529
///
@@ -618,14 +605,10 @@ pub use macros::Debug;
618
605
619
606
/// Format trait for an empty format, `{}`.
620
607
///
621
- /// `Display` is similar to [`Debug`][debug] , but `Display` is for user-facing
608
+ /// `Display` is similar to [`Debug`], but `Display` is for user-facing
622
609
/// output, and so cannot be derived.
623
610
///
624
- /// [debug]: trait.Debug.html
625
- ///
626
- /// For more information on formatters, see [the module-level documentation][module].
627
- ///
628
- /// [module]: ../../std/fmt/index.html
611
+ /// For more information on formatters, see [the module-level documentation][self].
629
612
///
630
613
/// # Examples
631
614
///
@@ -697,9 +680,7 @@ pub trait Display {
697
680
///
698
681
/// The alternate flag, `#`, adds a `0o` in front of the output.
699
682
///
700
- /// For more information on formatters, see [the module-level documentation][module].
701
- ///
702
- /// [module]: ../../std/fmt/index.html
683
+ /// For more information on formatters, see [the module-level documentation][self].
703
684
///
704
685
/// # Examples
705
686
///
@@ -751,7 +732,7 @@ pub trait Octal {
751
732
///
752
733
/// The alternate flag, `#`, adds a `0b` in front of the output.
753
734
///
754
- /// For more information on formatters, see [the module-level documentation][module ].
735
+ /// For more information on formatters, see [the module-level documentation][self ].
755
736
///
756
737
/// # Examples
757
738
///
@@ -790,12 +771,6 @@ pub trait Octal {
790
771
/// "l as binary is: 0b000000000000000000000001101011"
791
772
/// );
792
773
/// ```
793
- ///
794
- /// [module]: ../../std/fmt/index.html
795
- /// [`i8`]: ../../std/primitive.i8.html
796
- /// [`i128`]: ../../std/primitive.i128.html
797
- /// [`isize`]: ../../std/primitive.isize.html
798
- /// [`i32`]: ../../std/primitive.i32.html
799
774
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
800
775
pub trait Binary {
801
776
/// Formats the value using the given formatter.
@@ -813,9 +788,7 @@ pub trait Binary {
813
788
///
814
789
/// The alternate flag, `#`, adds a `0x` in front of the output.
815
790
///
816
- /// For more information on formatters, see [the module-level documentation][module].
817
- ///
818
- /// [module]: ../../std/fmt/index.html
791
+ /// For more information on formatters, see [the module-level documentation][self].
819
792
///
820
793
/// # Examples
821
794
///
@@ -868,9 +841,7 @@ pub trait LowerHex {
868
841
///
869
842
/// The alternate flag, `#`, adds a `0x` in front of the output.
870
843
///
871
- /// For more information on formatters, see [the module-level documentation][module].
872
- ///
873
- /// [module]: ../../std/fmt/index.html
844
+ /// For more information on formatters, see [the module-level documentation][self].
874
845
///
875
846
/// # Examples
876
847
///
@@ -918,9 +889,7 @@ pub trait UpperHex {
918
889
/// The `Pointer` trait should format its output as a memory location. This is commonly presented
919
890
/// as hexadecimal.
920
891
///
921
- /// For more information on formatters, see [the module-level documentation][module].
922
- ///
923
- /// [module]: ../../std/fmt/index.html
892
+ /// For more information on formatters, see [the module-level documentation][self].
924
893
///
925
894
/// # Examples
926
895
///
@@ -967,9 +936,7 @@ pub trait Pointer {
967
936
///
968
937
/// The `LowerExp` trait should format its output in scientific notation with a lower-case `e`.
969
938
///
970
- /// For more information on formatters, see [the module-level documentation][module].
971
- ///
972
- /// [module]: ../../std/fmt/index.html
939
+ /// For more information on formatters, see [the module-level documentation][self].
973
940
///
974
941
/// # Examples
975
942
///
@@ -1018,9 +985,7 @@ pub trait LowerExp {
1018
985
///
1019
986
/// The `UpperExp` trait should format its output in scientific notation with an upper-case `E`.
1020
987
///
1021
- /// For more information on formatters, see [the module-level documentation][module].
1022
- ///
1023
- /// [module]: ../../std/fmt/index.html
988
+ /// For more information on formatters, see [the module-level documentation][self].
1024
989
///
1025
990
/// # Examples
1026
991
///
@@ -1812,8 +1777,7 @@ impl<'a> Formatter<'a> {
1812
1777
/// Creates a [`DebugStruct`] builder designed to assist with creation of
1813
1778
/// [`fmt::Debug`] implementations for structs.
1814
1779
///
1815
- /// [`DebugStruct`]: ../../std/fmt/struct.DebugStruct.html
1816
- /// [`fmt::Debug`]: ../../std/fmt/trait.Debug.html
1780
+ /// [`fmt::Debug`]: self::Debug
1817
1781
///
1818
1782
/// # Examples
1819
1783
///
0 commit comments