Skip to content

Commit

Permalink
Rollup merge of rust-lang#40456 - frewsxcv:frewsxcv-docs-function-par…
Browse files Browse the repository at this point in the history
…ens, r=GuillaumeGomez

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
  • Loading branch information
frewsxcv authored Mar 15, 2017
2 parents c4db59f + e7b0f2b commit 85f10d8
Show file tree
Hide file tree
Showing 42 changed files with 491 additions and 491 deletions.
8 changes: 4 additions & 4 deletions src/doc/book/src/ffi.md
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ attribute turns off Rust's name mangling, so that it is easier to link to.

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

```rust
use std::panic::catch_unwind;
Expand All @@ -706,11 +706,11 @@ pub extern fn oh_no() -> i32 {
fn main() {}
```

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

[`catch_unwind()`]: ../std/panic/fn.catch_unwind.html
[`catch_unwind`]: ../std/panic/fn.catch_unwind.html

# Representing opaque structs

Expand Down
2 changes: 1 addition & 1 deletion src/doc/book/src/guessing-game.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ The next part will use this handle to get input from the user:
.read_line(&mut guess)
```

Here, we call the [`read_line()`][read_line] method on our handle.
Here, we call the [`read_line`][read_line] method on our handle.
[Methods][method] are like associated functions, but are only available on a
particular instance of a type, rather than the type itself. We’re also passing
one argument to `read_line()`: `&mut guess`.
Expand Down
4 changes: 2 additions & 2 deletions src/liballoc/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//! Single-threaded reference-counting pointers.
//!
//! The type [`Rc<T>`][`Rc`] provides shared ownership of a value of type `T`,
//! allocated in the heap. Invoking [`clone()`][clone] on [`Rc`] produces a new
//! allocated in the heap. Invoking [`clone`][clone] on [`Rc`] produces a new
//! pointer to the same value in the heap. When the last [`Rc`] pointer to a
//! given value is destroyed, the pointed-to value is also destroyed.
//!
Expand All @@ -30,7 +30,7 @@
//! threads. If you need multi-threaded, atomic reference counting, use
//! [`sync::Arc`][arc].
//!
//! The [`downgrade()`][downgrade] method can be used to create a non-owning
//! The [`downgrade`][downgrade] method can be used to create a non-owning
//! [`Weak`] pointer. A [`Weak`] pointer can be [`upgrade`][upgrade]d
//! to an [`Rc`], but this will return [`None`] if the value has
//! already been dropped.
Expand Down
4 changes: 2 additions & 2 deletions src/libcollections/binary_heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,10 @@ pub struct BinaryHeap<T> {
data: Vec<T>,
}

/// A container object that represents the result of the [`peek_mut()`] method
/// A container object that represents the result of the [`peek_mut`] method
/// on `BinaryHeap`. See its documentation for details.
///
/// [`peek_mut()`]: struct.BinaryHeap.html#method.peek_mut
/// [`peek_mut`]: struct.BinaryHeap.html#method.peek_mut
#[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
pub struct PeekMut<'a, T: 'a + Ord> {
heap: &'a mut BinaryHeap<T>,
Expand Down
22 changes: 11 additions & 11 deletions src/libcollections/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@
//! the element type of the slice is `i32`, the element type of the iterator is
//! `&mut i32`.
//!
//! * [`.iter()`] and [`.iter_mut()`] are the explicit methods to return the default
//! * [`.iter`] and [`.iter_mut`] are the explicit methods to return the default
//! iterators.
//! * Further methods that return iterators are [`.split()`], [`.splitn()`],
//! [`.chunks()`], [`.windows()`] and more.
//! * Further methods that return iterators are [`.split`], [`.splitn`],
//! [`.chunks`], [`.windows`] and more.
//!
//! *[See also the slice primitive type](../../std/primitive.slice.html).*
//!
Expand All @@ -85,12 +85,12 @@
//! [`Ord`]: ../../std/cmp/trait.Ord.html
//! [`Iter`]: struct.Iter.html
//! [`Hash`]: ../../std/hash/trait.Hash.html
//! [`.iter()`]: ../../std/primitive.slice.html#method.iter
//! [`.iter_mut()`]: ../../std/primitive.slice.html#method.iter_mut
//! [`.split()`]: ../../std/primitive.slice.html#method.split
//! [`.splitn()`]: ../../std/primitive.slice.html#method.splitn
//! [`.chunks()`]: ../../std/primitive.slice.html#method.chunks
//! [`.windows()`]: ../../std/primitive.slice.html#method.windows
//! [`.iter`]: ../../std/primitive.slice.html#method.iter
//! [`.iter_mut`]: ../../std/primitive.slice.html#method.iter_mut
//! [`.split`]: ../../std/primitive.slice.html#method.split
//! [`.splitn`]: ../../std/primitive.slice.html#method.splitn
//! [`.chunks`]: ../../std/primitive.slice.html#method.chunks
//! [`.windows`]: ../../std/primitive.slice.html#method.windows
#![stable(feature = "rust1", since = "1.0.0")]

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

/// Returns a mutable reference to an element or subslice depending on the
/// type of index (see [`get()`]) or `None` if the index is out of bounds.
/// type of index (see [`get`]) or `None` if the index is out of bounds.
///
/// [`get()`]: #method.get
/// [`get`]: #method.get
///
/// # Examples
///
Expand Down
68 changes: 34 additions & 34 deletions src/libcollections/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,9 @@ impl str {
/// excluding `end`.
///
/// To get a mutable string slice instead, see the
/// [`slice_mut_unchecked()`] method.
/// [`slice_mut_unchecked`] method.
///
/// [`slice_mut_unchecked()`]: #method.slice_mut_unchecked
/// [`slice_mut_unchecked`]: #method.slice_mut_unchecked
///
/// # Safety
///
Expand Down Expand Up @@ -341,9 +341,9 @@ impl str {
/// excluding `end`.
///
/// To get an immutable string slice instead, see the
/// [`slice_unchecked()`] method.
/// [`slice_unchecked`] method.
///
/// [`slice_unchecked()`]: #method.slice_unchecked
/// [`slice_unchecked`]: #method.slice_unchecked
///
/// # Safety
///
Expand All @@ -367,10 +367,10 @@ impl str {
/// The two slices returned go from the start of the string slice to `mid`,
/// and from `mid` to the end of the string slice.
///
/// To get mutable string slices instead, see the [`split_at_mut()`]
/// To get mutable string slices instead, see the [`split_at_mut`]
/// method.
///
/// [`split_at_mut()`]: #method.split_at_mut
/// [`split_at_mut`]: #method.split_at_mut
///
/// # Panics
///
Expand Down Expand Up @@ -403,9 +403,9 @@ impl str {
/// The two slices returned go from the start of the string slice to `mid`,
/// and from `mid` to the end of the string slice.
///
/// To get immutable string slices instead, see the [`split_at()`] method.
/// To get immutable string slices instead, see the [`split_at`] method.
///
/// [`split_at()`]: #method.split_at
/// [`split_at`]: #method.split_at
///
/// # Panics
///
Expand Down Expand Up @@ -824,10 +824,10 @@ impl str {
/// [`DoubleEndedIterator`]: iter/trait.DoubleEndedIterator.html
///
/// If the pattern allows a reverse search but its results might differ
/// from a forward search, the [`rsplit()`] method can be used.
/// from a forward search, the [`rsplit`] method can be used.
///
/// [`char`]: primitive.char.html
/// [`rsplit()`]: #method.rsplit
/// [`rsplit`]: #method.rsplit
///
/// # Examples
///
Expand Down Expand Up @@ -912,9 +912,9 @@ impl str {
/// assert_eq!(d, &["a", "b", "c"]);
/// ```
///
/// Use [`split_whitespace()`] for this behavior.
/// Use [`split_whitespace`] for this behavior.
///
/// [`split_whitespace()`]: #method.split_whitespace
/// [`split_whitespace`]: #method.split_whitespace
#[stable(feature = "rust1", since = "1.0.0")]
pub fn split<'a, P: Pattern<'a>>(&'a self, pat: P) -> Split<'a, P> {
core_str::StrExt::split(self, pat)
Expand All @@ -936,9 +936,9 @@ impl str {
///
/// [`DoubleEndedIterator`]: iter/trait.DoubleEndedIterator.html
///
/// For iterating from the front, the [`split()`] method can be used.
/// For iterating from the front, the [`split`] method can be used.
///
/// [`split()`]: #method.split
/// [`split`]: #method.split
///
/// # Examples
///
Expand Down Expand Up @@ -977,10 +977,10 @@ impl str {
/// The pattern can be a `&str`, [`char`], or a closure that determines the
/// split.
///
/// Equivalent to [`split()`], except that the trailing substring
/// Equivalent to [`split`], except that the trailing substring
/// is skipped if empty.
///
/// [`split()`]: #method.split
/// [`split`]: #method.split
///
/// This method can be used for string data that is _terminated_,
/// rather than _separated_ by a pattern.
Expand All @@ -995,9 +995,9 @@ impl str {
/// [`char`]: primitive.char.html
///
/// If the pattern allows a reverse search but its results might differ
/// from a forward search, the [`rsplit_terminator()`] method can be used.
/// from a forward search, the [`rsplit_terminator`] method can be used.
///
/// [`rsplit_terminator()`]: #method.rsplit_terminator
/// [`rsplit_terminator`]: #method.rsplit_terminator
///
/// # Examples
///
Expand Down Expand Up @@ -1025,10 +1025,10 @@ impl str {
///
/// [`char`]: primitive.char.html
///
/// Equivalent to [`split()`], except that the trailing substring is
/// Equivalent to [`split`], except that the trailing substring is
/// skipped if empty.
///
/// [`split()`]: #method.split
/// [`split`]: #method.split
///
/// This method can be used for string data that is _terminated_,
/// rather than _separated_ by a pattern.
Expand All @@ -1039,10 +1039,10 @@ impl str {
/// reverse search, and it will be double ended if a forward/reverse
/// search yields the same elements.
///
/// For iterating from the front, the [`split_terminator()`] method can be
/// For iterating from the front, the [`split_terminator`] method can be
/// used.
///
/// [`split_terminator()`]: #method.split_terminator
/// [`split_terminator`]: #method.split_terminator
///
/// # Examples
///
Expand Down Expand Up @@ -1076,10 +1076,10 @@ impl str {
/// The returned iterator will not be double ended, because it is
/// not efficient to support.
///
/// If the pattern allows a reverse search, the [`rsplitn()`] method can be
/// If the pattern allows a reverse search, the [`rsplitn`] method can be
/// used.
///
/// [`rsplitn()`]: #method.rsplitn
/// [`rsplitn`]: #method.rsplitn
///
/// # Examples
///
Expand Down Expand Up @@ -1127,9 +1127,9 @@ impl str {
/// The returned iterator will not be double ended, because it is not
/// efficient to support.
///
/// For splitting from the front, the [`splitn()`] method can be used.
/// For splitting from the front, the [`splitn`] method can be used.
///
/// [`splitn()`]: #method.splitn
/// [`splitn`]: #method.splitn
///
/// # Examples
///
Expand Down Expand Up @@ -1177,9 +1177,9 @@ impl str {
/// [`char`]: primitive.char.html
///
/// If the pattern allows a reverse search but its results might differ
/// from a forward search, the [`rmatches()`] method can be used.
/// from a forward search, the [`rmatches`] method can be used.
///
/// [`rmatches()`]: #method.rmatches
/// [`rmatches`]: #method.rmatches
///
/// # Examples
///
Expand Down Expand Up @@ -1213,9 +1213,9 @@ impl str {
///
/// [`DoubleEndedIterator`]: iter/trait.DoubleEndedIterator.html
///
/// For iterating from the front, the [`matches()`] method can be used.
/// For iterating from the front, the [`matches`] method can be used.
///
/// [`matches()`]: #method.matches
/// [`matches`]: #method.matches
///
/// # Examples
///
Expand Down Expand Up @@ -1255,9 +1255,9 @@ impl str {
/// [`DoubleEndedIterator`]: iter/trait.DoubleEndedIterator.html
///
/// If the pattern allows a reverse search but its results might differ
/// from a forward search, the [`rmatch_indices()`] method can be used.
/// from a forward search, the [`rmatch_indices`] method can be used.
///
/// [`rmatch_indices()`]: #method.rmatch_indices
/// [`rmatch_indices`]: #method.rmatch_indices
///
/// # Examples
///
Expand Down Expand Up @@ -1297,9 +1297,9 @@ impl str {
///
/// [`DoubleEndedIterator`]: iter/trait.DoubleEndedIterator.html
///
/// For iterating from the front, the [`match_indices()`] method can be used.
/// For iterating from the front, the [`match_indices`] method can be used.
///
/// [`match_indices()`]: #method.match_indices
/// [`match_indices`]: #method.match_indices
///
/// # Examples
///
Expand Down
Loading

0 comments on commit 85f10d8

Please sign in to comment.