Skip to content

Commit e7b0f2b

Browse files
committed
Remove function invokation parens from documentation links.
This was never established as a convention we should follow in the 'More API Documentation Conventions' RFC: https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md
1 parent f88b24b commit e7b0f2b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+491
-491
lines changed

src/doc/book/src/ffi.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ attribute turns off Rust's name mangling, so that it is easier to link to.
687687

688688
It’s important to be mindful of `panic!`s when working with FFI. A `panic!`
689689
across an FFI boundary is undefined behavior. If you’re writing code that may
690-
panic, you should run it in a closure with [`catch_unwind()`]:
690+
panic, you should run it in a closure with [`catch_unwind`]:
691691

692692
```rust
693693
use std::panic::catch_unwind;
@@ -706,11 +706,11 @@ pub extern fn oh_no() -> i32 {
706706
fn main() {}
707707
```
708708

709-
Please note that [`catch_unwind()`] will only catch unwinding panics, not
710-
those who abort the process. See the documentation of [`catch_unwind()`]
709+
Please note that [`catch_unwind`] will only catch unwinding panics, not
710+
those who abort the process. See the documentation of [`catch_unwind`]
711711
for more information.
712712

713-
[`catch_unwind()`]: ../std/panic/fn.catch_unwind.html
713+
[`catch_unwind`]: ../std/panic/fn.catch_unwind.html
714714

715715
# Representing opaque structs
716716

src/doc/book/src/guessing-game.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ The next part will use this handle to get input from the user:
217217
.read_line(&mut guess)
218218
```
219219

220-
Here, we call the [`read_line()`][read_line] method on our handle.
220+
Here, we call the [`read_line`][read_line] method on our handle.
221221
[Methods][method] are like associated functions, but are only available on a
222222
particular instance of a type, rather than the type itself. We’re also passing
223223
one argument to `read_line()`: `&mut guess`.

src/liballoc/rc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//! Single-threaded reference-counting pointers.
1414
//!
1515
//! The type [`Rc<T>`][`Rc`] provides shared ownership of a value of type `T`,
16-
//! allocated in the heap. Invoking [`clone()`][clone] on [`Rc`] produces a new
16+
//! allocated in the heap. Invoking [`clone`][clone] on [`Rc`] produces a new
1717
//! pointer to the same value in the heap. When the last [`Rc`] pointer to a
1818
//! given value is destroyed, the pointed-to value is also destroyed.
1919
//!
@@ -30,7 +30,7 @@
3030
//! threads. If you need multi-threaded, atomic reference counting, use
3131
//! [`sync::Arc`][arc].
3232
//!
33-
//! The [`downgrade()`][downgrade] method can be used to create a non-owning
33+
//! The [`downgrade`][downgrade] method can be used to create a non-owning
3434
//! [`Weak`] pointer. A [`Weak`] pointer can be [`upgrade`][upgrade]d
3535
//! to an [`Rc`], but this will return [`None`] if the value has
3636
//! already been dropped.

src/libcollections/binary_heap.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ pub struct BinaryHeap<T> {
218218
data: Vec<T>,
219219
}
220220

221-
/// A container object that represents the result of the [`peek_mut()`] method
221+
/// A container object that represents the result of the [`peek_mut`] method
222222
/// on `BinaryHeap`. See its documentation for details.
223223
///
224-
/// [`peek_mut()`]: struct.BinaryHeap.html#method.peek_mut
224+
/// [`peek_mut`]: struct.BinaryHeap.html#method.peek_mut
225225
#[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
226226
pub struct PeekMut<'a, T: 'a + Ord> {
227227
heap: &'a mut BinaryHeap<T>,

src/libcollections/slice.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@
7373
//! the element type of the slice is `i32`, the element type of the iterator is
7474
//! `&mut i32`.
7575
//!
76-
//! * [`.iter()`] and [`.iter_mut()`] are the explicit methods to return the default
76+
//! * [`.iter`] and [`.iter_mut`] are the explicit methods to return the default
7777
//! iterators.
78-
//! * Further methods that return iterators are [`.split()`], [`.splitn()`],
79-
//! [`.chunks()`], [`.windows()`] and more.
78+
//! * Further methods that return iterators are [`.split`], [`.splitn`],
79+
//! [`.chunks`], [`.windows`] and more.
8080
//!
8181
//! *[See also the slice primitive type](../../std/primitive.slice.html).*
8282
//!
@@ -85,12 +85,12 @@
8585
//! [`Ord`]: ../../std/cmp/trait.Ord.html
8686
//! [`Iter`]: struct.Iter.html
8787
//! [`Hash`]: ../../std/hash/trait.Hash.html
88-
//! [`.iter()`]: ../../std/primitive.slice.html#method.iter
89-
//! [`.iter_mut()`]: ../../std/primitive.slice.html#method.iter_mut
90-
//! [`.split()`]: ../../std/primitive.slice.html#method.split
91-
//! [`.splitn()`]: ../../std/primitive.slice.html#method.splitn
92-
//! [`.chunks()`]: ../../std/primitive.slice.html#method.chunks
93-
//! [`.windows()`]: ../../std/primitive.slice.html#method.windows
88+
//! [`.iter`]: ../../std/primitive.slice.html#method.iter
89+
//! [`.iter_mut`]: ../../std/primitive.slice.html#method.iter_mut
90+
//! [`.split`]: ../../std/primitive.slice.html#method.split
91+
//! [`.splitn`]: ../../std/primitive.slice.html#method.splitn
92+
//! [`.chunks`]: ../../std/primitive.slice.html#method.chunks
93+
//! [`.windows`]: ../../std/primitive.slice.html#method.windows
9494
#![stable(feature = "rust1", since = "1.0.0")]
9595

9696
// Many of the usings in this module are only used in the test configuration.
@@ -368,9 +368,9 @@ impl<T> [T] {
368368
}
369369

370370
/// Returns a mutable reference to an element or subslice depending on the
371-
/// type of index (see [`get()`]) or `None` if the index is out of bounds.
371+
/// type of index (see [`get`]) or `None` if the index is out of bounds.
372372
///
373-
/// [`get()`]: #method.get
373+
/// [`get`]: #method.get
374374
///
375375
/// # Examples
376376
///

src/libcollections/str.rs

+34-34
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,9 @@ impl str {
298298
/// excluding `end`.
299299
///
300300
/// To get a mutable string slice instead, see the
301-
/// [`slice_mut_unchecked()`] method.
301+
/// [`slice_mut_unchecked`] method.
302302
///
303-
/// [`slice_mut_unchecked()`]: #method.slice_mut_unchecked
303+
/// [`slice_mut_unchecked`]: #method.slice_mut_unchecked
304304
///
305305
/// # Safety
306306
///
@@ -341,9 +341,9 @@ impl str {
341341
/// excluding `end`.
342342
///
343343
/// To get an immutable string slice instead, see the
344-
/// [`slice_unchecked()`] method.
344+
/// [`slice_unchecked`] method.
345345
///
346-
/// [`slice_unchecked()`]: #method.slice_unchecked
346+
/// [`slice_unchecked`]: #method.slice_unchecked
347347
///
348348
/// # Safety
349349
///
@@ -367,10 +367,10 @@ impl str {
367367
/// The two slices returned go from the start of the string slice to `mid`,
368368
/// and from `mid` to the end of the string slice.
369369
///
370-
/// To get mutable string slices instead, see the [`split_at_mut()`]
370+
/// To get mutable string slices instead, see the [`split_at_mut`]
371371
/// method.
372372
///
373-
/// [`split_at_mut()`]: #method.split_at_mut
373+
/// [`split_at_mut`]: #method.split_at_mut
374374
///
375375
/// # Panics
376376
///
@@ -403,9 +403,9 @@ impl str {
403403
/// The two slices returned go from the start of the string slice to `mid`,
404404
/// and from `mid` to the end of the string slice.
405405
///
406-
/// To get immutable string slices instead, see the [`split_at()`] method.
406+
/// To get immutable string slices instead, see the [`split_at`] method.
407407
///
408-
/// [`split_at()`]: #method.split_at
408+
/// [`split_at`]: #method.split_at
409409
///
410410
/// # Panics
411411
///
@@ -824,10 +824,10 @@ impl str {
824824
/// [`DoubleEndedIterator`]: iter/trait.DoubleEndedIterator.html
825825
///
826826
/// If the pattern allows a reverse search but its results might differ
827-
/// from a forward search, the [`rsplit()`] method can be used.
827+
/// from a forward search, the [`rsplit`] method can be used.
828828
///
829829
/// [`char`]: primitive.char.html
830-
/// [`rsplit()`]: #method.rsplit
830+
/// [`rsplit`]: #method.rsplit
831831
///
832832
/// # Examples
833833
///
@@ -912,9 +912,9 @@ impl str {
912912
/// assert_eq!(d, &["a", "b", "c"]);
913913
/// ```
914914
///
915-
/// Use [`split_whitespace()`] for this behavior.
915+
/// Use [`split_whitespace`] for this behavior.
916916
///
917-
/// [`split_whitespace()`]: #method.split_whitespace
917+
/// [`split_whitespace`]: #method.split_whitespace
918918
#[stable(feature = "rust1", since = "1.0.0")]
919919
pub fn split<'a, P: Pattern<'a>>(&'a self, pat: P) -> Split<'a, P> {
920920
core_str::StrExt::split(self, pat)
@@ -936,9 +936,9 @@ impl str {
936936
///
937937
/// [`DoubleEndedIterator`]: iter/trait.DoubleEndedIterator.html
938938
///
939-
/// For iterating from the front, the [`split()`] method can be used.
939+
/// For iterating from the front, the [`split`] method can be used.
940940
///
941-
/// [`split()`]: #method.split
941+
/// [`split`]: #method.split
942942
///
943943
/// # Examples
944944
///
@@ -977,10 +977,10 @@ impl str {
977977
/// The pattern can be a `&str`, [`char`], or a closure that determines the
978978
/// split.
979979
///
980-
/// Equivalent to [`split()`], except that the trailing substring
980+
/// Equivalent to [`split`], except that the trailing substring
981981
/// is skipped if empty.
982982
///
983-
/// [`split()`]: #method.split
983+
/// [`split`]: #method.split
984984
///
985985
/// This method can be used for string data that is _terminated_,
986986
/// rather than _separated_ by a pattern.
@@ -995,9 +995,9 @@ impl str {
995995
/// [`char`]: primitive.char.html
996996
///
997997
/// If the pattern allows a reverse search but its results might differ
998-
/// from a forward search, the [`rsplit_terminator()`] method can be used.
998+
/// from a forward search, the [`rsplit_terminator`] method can be used.
999999
///
1000-
/// [`rsplit_terminator()`]: #method.rsplit_terminator
1000+
/// [`rsplit_terminator`]: #method.rsplit_terminator
10011001
///
10021002
/// # Examples
10031003
///
@@ -1025,10 +1025,10 @@ impl str {
10251025
///
10261026
/// [`char`]: primitive.char.html
10271027
///
1028-
/// Equivalent to [`split()`], except that the trailing substring is
1028+
/// Equivalent to [`split`], except that the trailing substring is
10291029
/// skipped if empty.
10301030
///
1031-
/// [`split()`]: #method.split
1031+
/// [`split`]: #method.split
10321032
///
10331033
/// This method can be used for string data that is _terminated_,
10341034
/// rather than _separated_ by a pattern.
@@ -1039,10 +1039,10 @@ impl str {
10391039
/// reverse search, and it will be double ended if a forward/reverse
10401040
/// search yields the same elements.
10411041
///
1042-
/// For iterating from the front, the [`split_terminator()`] method can be
1042+
/// For iterating from the front, the [`split_terminator`] method can be
10431043
/// used.
10441044
///
1045-
/// [`split_terminator()`]: #method.split_terminator
1045+
/// [`split_terminator`]: #method.split_terminator
10461046
///
10471047
/// # Examples
10481048
///
@@ -1076,10 +1076,10 @@ impl str {
10761076
/// The returned iterator will not be double ended, because it is
10771077
/// not efficient to support.
10781078
///
1079-
/// If the pattern allows a reverse search, the [`rsplitn()`] method can be
1079+
/// If the pattern allows a reverse search, the [`rsplitn`] method can be
10801080
/// used.
10811081
///
1082-
/// [`rsplitn()`]: #method.rsplitn
1082+
/// [`rsplitn`]: #method.rsplitn
10831083
///
10841084
/// # Examples
10851085
///
@@ -1127,9 +1127,9 @@ impl str {
11271127
/// The returned iterator will not be double ended, because it is not
11281128
/// efficient to support.
11291129
///
1130-
/// For splitting from the front, the [`splitn()`] method can be used.
1130+
/// For splitting from the front, the [`splitn`] method can be used.
11311131
///
1132-
/// [`splitn()`]: #method.splitn
1132+
/// [`splitn`]: #method.splitn
11331133
///
11341134
/// # Examples
11351135
///
@@ -1177,9 +1177,9 @@ impl str {
11771177
/// [`char`]: primitive.char.html
11781178
///
11791179
/// If the pattern allows a reverse search but its results might differ
1180-
/// from a forward search, the [`rmatches()`] method can be used.
1180+
/// from a forward search, the [`rmatches`] method can be used.
11811181
///
1182-
/// [`rmatches()`]: #method.rmatches
1182+
/// [`rmatches`]: #method.rmatches
11831183
///
11841184
/// # Examples
11851185
///
@@ -1213,9 +1213,9 @@ impl str {
12131213
///
12141214
/// [`DoubleEndedIterator`]: iter/trait.DoubleEndedIterator.html
12151215
///
1216-
/// For iterating from the front, the [`matches()`] method can be used.
1216+
/// For iterating from the front, the [`matches`] method can be used.
12171217
///
1218-
/// [`matches()`]: #method.matches
1218+
/// [`matches`]: #method.matches
12191219
///
12201220
/// # Examples
12211221
///
@@ -1255,9 +1255,9 @@ impl str {
12551255
/// [`DoubleEndedIterator`]: iter/trait.DoubleEndedIterator.html
12561256
///
12571257
/// If the pattern allows a reverse search but its results might differ
1258-
/// from a forward search, the [`rmatch_indices()`] method can be used.
1258+
/// from a forward search, the [`rmatch_indices`] method can be used.
12591259
///
1260-
/// [`rmatch_indices()`]: #method.rmatch_indices
1260+
/// [`rmatch_indices`]: #method.rmatch_indices
12611261
///
12621262
/// # Examples
12631263
///
@@ -1297,9 +1297,9 @@ impl str {
12971297
///
12981298
/// [`DoubleEndedIterator`]: iter/trait.DoubleEndedIterator.html
12991299
///
1300-
/// For iterating from the front, the [`match_indices()`] method can be used.
1300+
/// For iterating from the front, the [`match_indices`] method can be used.
13011301
///
1302-
/// [`match_indices()`]: #method.match_indices
1302+
/// [`match_indices`]: #method.match_indices
13031303
///
13041304
/// # Examples
13051305
///

0 commit comments

Comments
 (0)