Skip to content

Commit

Permalink
Remove two cross-references
Browse files Browse the repository at this point in the history
  * Replace a malformed link in `write` docstring with a literal `write` rather than
    a real cross-reference, since that would just cross-reference itself. Also move
    `write` docstring inline.

  * Remove cross-reference for `<<` from inside a literal since text inside a literal
    can't contain a link. A cross-reference to `<<` already appears at the end of the
    docstring.
  • Loading branch information
MichaelHatherly committed Aug 11, 2016
1 parent b066714 commit 2301c27
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 18 deletions.
15 changes: 0 additions & 15 deletions base/docs/helpdb/Base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2912,21 +2912,6 @@ Squared absolute value of `x`.
"""
abs2

"""
write(stream::IO, x)
write(filename::AbstractString, x)
Write the canonical binary representation of a value to the given I/O stream or file.
Returns the number of bytes written into the stream.
You can write multiple values with the same :func:`write` call. i.e. the following are
equivalent:
write(stream, x, y...)
write(stream, x) + write(stream, y...)
"""
write

"""
sizehint!(s, n)
Expand Down
14 changes: 14 additions & 0 deletions base/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ function iswritable end
function copy end
function eof end

"""
write(stream::IO, x)
write(filename::AbstractString, x)
Write the canonical binary representation of a value to the given I/O stream or file.
Returns the number of bytes written into the stream.
You can write multiple values with the same `write` call. i.e. the following are equivalent:
write(stream, x, y...)
write(stream, x) + write(stream, y...)
"""
function write end

read(s::IO, ::Type{UInt8}) = error(typeof(s)," does not support byte I/O")
write(s::IO, x::UInt8) = error(typeof(s)," does not support byte I/O")

Expand Down
2 changes: 1 addition & 1 deletion base/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ end
Unsigned right bit shift operator, `x >>> n`. For `n >= 0`, the result is `x`
shifted right by `n` bits, where `n >= 0`, filling with `0`s. For `n < 0`, this
is equivalent to `x [<<](:func:`<<`) -n`].
is equivalent to `x << -n`.
For `Unsigned` integer types, this is equivalent to [`>>`](:func:`>>`). For
`Signed` integer types, this is equivalent to `signed(unsigned(x) >> n)`.
Expand Down
2 changes: 1 addition & 1 deletion doc/stdlib/io-network.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ General I/O
Write the canonical binary representation of a value to the given I/O stream or file. Returns the number of bytes written into the stream.

You can write multiple values with the same :func:``write`` call. i.e. the following are equivalent:
You can write multiple values with the same ``write`` call. i.e. the following are equivalent:

.. code-block:: julia
Expand Down
2 changes: 1 addition & 1 deletion doc/stdlib/math.rst
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ Mathematical Operators

.. Docstring generated from Julia source
Unsigned right bit shift operator, ``x >>> n``\ . For ``n >= 0``\ , the result is ``x`` shifted right by ``n`` bits, where ``n >= 0``\ , filling with ``0``\ s. For ``n < 0``\ , this is equivalent to ``x [<<](:func:``\ <<``) -n``\ ].
Unsigned right bit shift operator, ``x >>> n``\ . For ``n >= 0``\ , the result is ``x`` shifted right by ``n`` bits, where ``n >= 0``\ , filling with ``0``\ s. For ``n < 0``\ , this is equivalent to ``x << -n``\ .

For ``Unsigned`` integer types, this is equivalent to :func:`>>`\ . For ``Signed`` integer types, this is equivalent to ``signed(unsigned(x) >> n)``\ .

Expand Down

0 comments on commit 2301c27

Please sign in to comment.