Use https URLs to refer to rust-lang.org where appropriate.

Also fixes a few outdated links.
This commit is contained in:
Eli Friedman 2015-08-09 14:15:05 -07:00
parent febdc3b201
commit bbbfed2f93
57 changed files with 185 additions and 206 deletions

View file

@ -1 +1 @@
<link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico">
<link rel="shortcut icon" href="https://www.rust-lang.org/favicon.ico">

View file

@ -21,12 +21,12 @@ Some things that might be helpful to you though:
# Reference
* [The Rust official site](http://rust-lang.org)
* [The Rust reference](http://doc.rust-lang.org/reference.html)
* [The Rust official site](https://www.rust-lang.org)
* [The Rust reference](https://doc.rust-lang.org/reference.html)
# Docs
* [The standard library](http://doc.rust-lang.org/std/)
* [The standard library](https://doc.rust-lang.org/std/)
<script>
function get_url_fragments() {
@ -58,7 +58,7 @@ function populate_rust_search() {
// #18540, use a single token
var a = document.createElement("a");
a.href = "http://doc.rust-lang.org/core/?search=" + encodeURIComponent(lt);
a.href = "https://doc.rust-lang.org/core/?search=" + encodeURIComponent(lt);
a.textContent = lt;
var search = document.getElementById('core-search');
search.innerHTML = "";

View file

@ -26,7 +26,7 @@ Every guideline has a status:
One purpose of these guidelines is to reach decisions on a number of
cross-cutting API and stylistic choices. Discussion and development of
the guidelines will happen primarily on http://discuss.rust-lang.org/,
the guidelines will happen primarily on https://internals.rust-lang.org/,
using the Guidelines category. Discussion can also occur on the
[guidelines issue tracker](https://github.com/rust-lang/rust-guidelines).

View file

@ -57,7 +57,7 @@ fn write_info(info: &Info) -> Result<(), IoError> {
```
See
[the `result` module documentation](http://static.rust-lang.org/doc/master/std/result/index.html#the-try!-macro)
[the `result` module documentation](https://doc.rust-lang.org/stable/std/result/index.html#the-try!-macro)
for more details.
### The `Result`-`impl` pattern [FIXME]

View file

@ -94,7 +94,7 @@ aspects of the input that are not covered by the contract.
### For obstructions, use `Result`
The
[`Result<T,E>` type](http://static.rust-lang.org/doc/master/std/result/index.html)
[`Result<T,E>` type](https://doc.rust-lang.org/stable/std/result/index.html)
represents either a success (yielding `T`) or failure (yielding `E`). By
returning a `Result`, a function allows its clients to discover and react to
obstructions in a fine-grained way.

View file

@ -124,7 +124,7 @@ that the caller already owns, for example to re-use a buffer:
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize>
```
(From the [Reader trait](http://static.rust-lang.org/doc/master/std/io/trait.Reader.html#tymethod.read).)
(From the [Read trait](https://doc.rust-lang.org/stable/std/io/trait.Read.html#tymethod.read).)
### Consider validating arguments, statically or dynamically. [FIXME: needs RFC]
@ -132,7 +132,7 @@ _Note: this material is closely related to
[library-level guarantees](../../safety/lib-guarantees.md)._
Rust APIs do _not_ generally follow the
[robustness principle](http://en.wikipedia.org/wiki/Robustness_principle): "be
[robustness principle](https://en.wikipedia.org/wiki/Robustness_principle): "be
conservative in what you send; be liberal in what you accept".
Instead, Rust code should _enforce_ the validity of input whenever practical.
@ -156,8 +156,7 @@ over
fn foo(a: u8) { ... }
```
Note that
[`ascii::Ascii`](http://static.rust-lang.org/doc/master/std/ascii/struct.Ascii.html)
Note that `ascii::Ascii`
is a _wrapper_ around `u8` that guarantees the highest bit is zero; see
[newtype patterns](../types/newtype.md) for more details on creating typesafe wrappers.

View file

@ -58,13 +58,13 @@ For modules that themselves have submodules, place the module in a separate
directory (e.g., `bar/mod.rs` for a module `bar`) rather than the same directory.
Note the structure of
[`std::io`](http://doc.rust-lang.org/std/io/). Many of the submodules lack
[`std::io`](https://doc.rust-lang.org/std/io/). Many of the submodules lack
children, like
[`io::fs`](http://doc.rust-lang.org/std/io/fs/)
[`io::fs`](https://doc.rust-lang.org/std/io/fs/)
and
[`io::stdio`](http://doc.rust-lang.org/std/io/stdio/).
[`io::stdio`](https://doc.rust-lang.org/std/io/stdio/).
On the other hand,
[`io::net`](http://doc.rust-lang.org/std/io/net/)
[`io::net`](https://doc.rust-lang.org/std/io/net/)
contains submodules, so it lives in a separate directory:
```
@ -88,7 +88,7 @@ submodules of `io::net` easier to find.
### Consider top-level definitions or reexports. [FIXME: needs RFC]
For modules with submodules,
define or [reexport](http://doc.rust-lang.org/std/io/#reexports) commonly used
define or [reexport](https://doc.rust-lang.org/std/io/#reexports) commonly used
definitions at the top level:
* Functionality relevant to the module itself or to many of its
@ -98,10 +98,10 @@ definitions at the top level:
common definitions.
For example,
[`IoError`](http://doc.rust-lang.org/std/io/struct.IoError.html)
[`IoError`](https://doc.rust-lang.org/std/io/struct.IoError.html)
is defined in `io/mod.rs`, since it pertains to the entirety of `io`,
while
[`TcpStream`](http://doc.rust-lang.org/std/io/net/tcp/struct.TcpStream.html)
[`TcpStream`](https://doc.rust-lang.org/std/io/net/tcp/struct.TcpStream.html)
is defined in `io/net/tcp.rs` and reexported in the `io` module.
### Use internal module hirearchies for organization. [FIXME: needs RFC]
@ -113,11 +113,11 @@ is defined in `io/net/tcp.rs` and reexported in the `io` module.
Internal module hirearchies (i.e., private submodules) may be used to
hide implementation details that are not part of the module's API.
For example, in [`std::io`](http://doc.rust-lang.org/std/io/), `mod mem`
For example, in [`std::io`](https://doc.rust-lang.org/std/io/), `mod mem`
provides implementations for
[`BufReader`](http://doc.rust-lang.org/std/io/struct.BufReader.html)
[`BufReader`](https://doc.rust-lang.org/std/io/struct.BufReader.html)
and
[`BufWriter`](http://doc.rust-lang.org/std/io/struct.BufWriter.html),
[`BufWriter`](https://doc.rust-lang.org/std/io/struct.BufWriter.html),
but these are re-exported in `io/mod.rs` at the top level of the module:
```rust

View file

@ -32,7 +32,7 @@ treatment of ownership, as described below.
In some cases, constructing the final `T` does not require the builder itself to
be consumed. The follow variant on
[`std::io::process::Command`](http://static.rust-lang.org/doc/master/std/io/process/struct.Command.html)
[`std::process::Command`](https://doc.rust-lang.org/stable/std/process/struct.Command.html)
is one example:
```rust

View file

@ -13,7 +13,7 @@ even though some of these abstractions feel like those of a high-level
language. Even then, Rust still allows precise control like a low-level
language would.
[rust]: http://rust-lang.org
[rust]: https://www.rust-lang.org
“The Rust Programming Language” is split into eight sections. This introduction
is the first. After this:

View file

@ -115,7 +115,7 @@ In addition to procedural macros, you can define new
extensions. See
[`Registry::register_syntax_extension`](../rustc/plugin/registry/struct.Registry.html#method.register_syntax_extension)
and the [`SyntaxExtension`
enum](http://doc.rust-lang.org/syntax/ext/base/enum.SyntaxExtension.html). For
enum](https://doc.rust-lang.org/syntax/ext/base/enum.SyntaxExtension.html). For
a more involved macro example, see
[`regex_macros`](https://github.com/rust-lang/regex/blob/master/regex_macros/src/lib.rs).
@ -156,7 +156,7 @@ so that the compiler can continue and find further errors.
To print syntax fragments for debugging, you can use
[`span_note`](../syntax/ext/base/struct.ExtCtxt.html#method.span_note) together
with
[`syntax::print::pprust::*_to_string`](http://doc.rust-lang.org/syntax/print/pprust/index.html#functions).
[`syntax::print::pprust::*_to_string`](https://doc.rust-lang.org/syntax/print/pprust/index.html#functions).
The example above produced an integer literal using
[`AstBuilder::expr_usize`](../syntax/ext/build/trait.AstBuilder.html#tymethod.expr_usize).

View file

@ -76,7 +76,7 @@ This [unfortunate error](https://github.com/rust-lang/rust/issues/22547) is
correct: documentation comments apply to the thing after them, and there's no
thing after that last comment.
[rc-new]: http://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.new
[rc-new]: https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.new
### Writing documentation comments
@ -544,9 +544,9 @@ You can control a few aspects of the HTML that `rustdoc` generates through the
`#![doc]` version of the attribute:
```rust
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/")]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://www.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/")]
```
This sets a few different options, with a logo, favicon, and a root URL.

View file

@ -32,7 +32,7 @@ install dialog and on the "Product Features" page ensure "Add to PATH" is
installed on the local hard drive.
[install-page]: http://www.rust-lang.org/install.html
[install-page]: https://www.rust-lang.org/install.html
## Uninstalling
@ -112,5 +112,5 @@ resources include [the users forum][users], and
[irc]: irc://irc.mozilla.org/#rust
[mibbit]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust
[users]: http://users.rust-lang.org/
[users]: https://users.rust-lang.org/
[stackoverflow]: http://stackoverflow.com/questions/tagged/rust

View file

@ -50,7 +50,7 @@ documentation on [building Rust from Source][from-source], or [the official
binary downloads][install-page].
[from-source]: https://github.com/rust-lang/rust#building-from-source
[install-page]: http://www.rust-lang.org/install.html
[install-page]: https://www.rust-lang.org/install.html
Oh, we should also mention the officially supported platforms:
@ -95,5 +95,5 @@ resources include [the users forum][users], and [Stack Overflow][stackoverflo
[irc]: irc://irc.mozilla.org/#rust
[mibbit]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust
[users]: http://users.rust-lang.org/
[users]: https://users.rust-lang.org/
[stackoverflow]: http://stackoverflow.com/questions/tagged/rust

View file

@ -1,6 +1,6 @@
<div id="versioninfo">
<img src="http://www.rust-lang.org/logos/rust-logo-32x32-blk.png" width="32" height="32" alt><br>
<span class="white-sticker"><a href="http://rust-lang.org">Rust</a> VERSION</span><br>
<a href="http://github.com/rust-lang/rust/commit/STAMP"
<img src="https://www.rust-lang.org/logos/rust-logo-32x32-blk.png" width="32" height="32" alt><br>
<span class="white-sticker"><a href="https://www.rust-lang.org">Rust</a> VERSION</span><br>
<a href="https://github.com/rust-lang/rust/commit/STAMP"
class="hash white-sticker">SHORT_HASH</a>
</div>