about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamelid <camelidcamel@gmail.com>2020-08-25 16:53:33 -0700
committerCamelid <camelidcamel@gmail.com>2020-08-25 18:45:20 -0700
commit511ee052a0c2381bb2e6b3cecefb9ee69ebf2467 (patch)
treefdb79f46301c2c377bef488ecd1f2d3c66d8308e
parent8ba22504e8e5dcbbe136d97f63c1280dabc523d0 (diff)
downloadrust-511ee052a0c2381bb2e6b3cecefb9ee69ebf2467.tar.gz
rust-511ee052a0c2381bb2e6b3cecefb9ee69ebf2467.zip
Use intra-doc links in `core::macros`
Also cleaned up some things and added a few more links.
-rw-r--r--library/core/src/macros/mod.rs10
-rw-r--r--library/core/src/macros/panic.md16
2 files changed, 13 insertions, 13 deletions
diff --git a/library/core/src/macros/mod.rs b/library/core/src/macros/mod.rs
index d26f2124f15..4e0da1fc4a6 100644
--- a/library/core/src/macros/mod.rs
+++ b/library/core/src/macros/mod.rs
@@ -333,16 +333,16 @@ macro_rules! r#try {
 /// This macro accepts a format string, a list of arguments, and a 'writer'. Arguments will be
 /// formatted according to the specified format string and the result will be passed to the writer.
 /// The writer may be any value with a `write_fmt` method; generally this comes from an
-/// implementation of either the [`std::fmt::Write`] or the [`std::io::Write`] trait. The macro
-/// returns whatever the `write_fmt` method returns; commonly a [`std::fmt::Result`], or an
+/// implementation of either the [`fmt::Write`] or the [`io::Write`] trait. The macro
+/// returns whatever the `write_fmt` method returns; commonly a [`fmt::Result`], or an
 /// [`io::Result`].
 ///
 /// See [`std::fmt`] for more information on the format string syntax.
 ///
 /// [`std::fmt`]: crate::fmt
-/// [`std::fmt::Write`]: crate::fmt::Write
-/// [`std::io::Write`]: ../std/io/trait.Write.html
-/// [`std::fmt::Result`]: crate::fmt::Result
+/// [`fmt::Write`]: crate::fmt::Write
+/// [`io::Write`]: ../std/io/trait.Write.html
+/// [`fmt::Result`]: crate::fmt::Result
 /// [`io::Result`]: ../std/io/type.Result.html
 ///
 /// # Examples
diff --git a/library/core/src/macros/panic.md b/library/core/src/macros/panic.md
index 3ecfc43be04..a02e74d5e5a 100644
--- a/library/core/src/macros/panic.md
+++ b/library/core/src/macros/panic.md
@@ -5,12 +5,12 @@ to the caller of the program. `panic!` should be used when a program reaches
 an unrecoverable state.
 
 This macro is the perfect way to assert conditions in example code and in
-tests. `panic!` is closely tied with the `unwrap` method of both [`Option`]
-and [`Result`][runwrap] enums. Both implementations call `panic!` when they are set
-to None or Err variants.
+tests. `panic!` is closely tied with the `unwrap` method of both
+[`Option`][ounwrap] and [`Result`][runwrap] enums. Both implementations call
+`panic!` when they are set to [`None`] or [`Err`] variants.
 
 This macro is used to inject panic into a Rust thread, causing the thread to
-panic entirely. Each thread's panic can be reaped as the `Box<Any>` type,
+panic entirely. Each thread's panic can be reaped as the [`Box`]`<`[`Any`]`>` type,
 and the single-argument form of the `panic!` macro will be the value which
 is transmitted.
 
@@ -24,11 +24,11 @@ The multi-argument form of this macro panics with a string and has the
 
 See also the macro [`compile_error!`], for raising errors during compilation.
 
-[runwrap]: ../std/result/enum.Result.html#method.unwrap
-[`Option`]: ../std/option/enum.Option.html#method.unwrap
-[`Result`]: ../std/result/enum.Result.html
+[ounwrap]: Option::unwrap
+[runwrap]: Result::unwrap
+[`Box`]: ../std/boxed/struct.Box.html
+[`Any`]: crate::any::Any
 [`format!`]: ../std/macro.format.html
-[`compile_error!`]: ../std/macro.compile_error.html
 [book]: ../book/ch09-00-error-handling.html
 
 # Current implementation