Skip to content

Commit 511ee05

Browse files
committed
Use intra-doc links in core::macros
Also cleaned up some things and added a few more links.
1 parent 8ba2250 commit 511ee05

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

Diff for: library/core/src/macros/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -333,16 +333,16 @@ macro_rules! r#try {
333333
/// This macro accepts a format string, a list of arguments, and a 'writer'. Arguments will be
334334
/// formatted according to the specified format string and the result will be passed to the writer.
335335
/// The writer may be any value with a `write_fmt` method; generally this comes from an
336-
/// implementation of either the [`std::fmt::Write`] or the [`std::io::Write`] trait. The macro
337-
/// returns whatever the `write_fmt` method returns; commonly a [`std::fmt::Result`], or an
336+
/// implementation of either the [`fmt::Write`] or the [`io::Write`] trait. The macro
337+
/// returns whatever the `write_fmt` method returns; commonly a [`fmt::Result`], or an
338338
/// [`io::Result`].
339339
///
340340
/// See [`std::fmt`] for more information on the format string syntax.
341341
///
342342
/// [`std::fmt`]: crate::fmt
343-
/// [`std::fmt::Write`]: crate::fmt::Write
344-
/// [`std::io::Write`]: ../std/io/trait.Write.html
345-
/// [`std::fmt::Result`]: crate::fmt::Result
343+
/// [`fmt::Write`]: crate::fmt::Write
344+
/// [`io::Write`]: ../std/io/trait.Write.html
345+
/// [`fmt::Result`]: crate::fmt::Result
346346
/// [`io::Result`]: ../std/io/type.Result.html
347347
///
348348
/// # Examples

Diff for: library/core/src/macros/panic.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ to the caller of the program. `panic!` should be used when a program reaches
55
an unrecoverable state.
66

77
This macro is the perfect way to assert conditions in example code and in
8-
tests. `panic!` is closely tied with the `unwrap` method of both [`Option`]
9-
and [`Result`][runwrap] enums. Both implementations call `panic!` when they are set
10-
to None or Err variants.
8+
tests. `panic!` is closely tied with the `unwrap` method of both
9+
[`Option`][ounwrap] and [`Result`][runwrap] enums. Both implementations call
10+
`panic!` when they are set to [`None`] or [`Err`] variants.
1111

1212
This macro is used to inject panic into a Rust thread, causing the thread to
13-
panic entirely. Each thread's panic can be reaped as the `Box<Any>` type,
13+
panic entirely. Each thread's panic can be reaped as the [`Box`]`<`[`Any`]`>` type,
1414
and the single-argument form of the `panic!` macro will be the value which
1515
is transmitted.
1616

@@ -24,11 +24,11 @@ The multi-argument form of this macro panics with a string and has the
2424

2525
See also the macro [`compile_error!`], for raising errors during compilation.
2626

27-
[runwrap]: ../std/result/enum.Result.html#method.unwrap
28-
[`Option`]: ../std/option/enum.Option.html#method.unwrap
29-
[`Result`]: ../std/result/enum.Result.html
27+
[ounwrap]: Option::unwrap
28+
[runwrap]: Result::unwrap
29+
[`Box`]: ../std/boxed/struct.Box.html
30+
[`Any`]: crate::any::Any
3031
[`format!`]: ../std/macro.format.html
31-
[`compile_error!`]: ../std/macro.compile_error.html
3232
[book]: ../book/ch09-00-error-handling.html
3333

3434
# Current implementation

0 commit comments

Comments
 (0)