Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rolling up PRs in the queue #27688

Merged
merged 45 commits into from
Aug 12, 2015
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
1eeaf20
Fix ICE when trying to drop an unsized type from a different crate
dotdash Aug 7, 2015
f804872
Fix the function return type used in get_res_dtor()
dotdash Aug 8, 2015
d83a0fd
add diagnostics for E0387
AlisdairO Aug 8, 2015
bbbfed2
Use https URLs to refer to rust-lang.org where appropriate.
eefriedman Aug 9, 2015
7d3c4bd
Tweak style guide to avoid referencing the removed ascii::Ascii.
eefriedman Aug 10, 2015
5bcbc5c
Bug #27621 - Make sure that LLVM FileCheck is available on the system
sylvestre Aug 10, 2015
3479915
Add another example for E0425
GuillaumeGomez Aug 10, 2015
86191e2
Fixed algorithm to match shootout requirements
llogiq Aug 10, 2015
78d2833
add info about cell types to diagnostic message E0387
AlisdairO Aug 10, 2015
f041966
fix import nit for long diagnostics on E0387
AlisdairO Aug 10, 2015
689d13d
Make the backtrace-debuginfo test less error prone
dotdash Aug 10, 2015
b7a88d8
Updated the link with rendered version of the Spanish trpl translation.
Aug 11, 2015
fef60c0
add long diagnostics for E0194
AlisdairO Aug 10, 2015
0354d7a
Remove unneeded FIXME
tbu- Aug 11, 2015
29945d5
syntax: fix use of "vector" for [x; n] literal and [x, y] patterns
birkenfeld Aug 11, 2015
f1e613e
Update E0425 error explanation
GuillaumeGomez Aug 11, 2015
3acec57
Fix formatting for E0067 and E0070 error messages
frewsxcv Aug 11, 2015
cb5cd54
Fix copy-paste bug.
vadimcn Aug 11, 2015
155689b
Use correct target CPU for iOS simulator.
eefriedman Aug 11, 2015
8f4aee8
std: Fix imports for ios target
zaeleus Aug 11, 2015
938099a
Register new snapshots
alexcrichton Aug 11, 2015
b6b4f5a
trans: Re-enable unwinding on 64-bit MSVC
alexcrichton Aug 11, 2015
27c44c8
correct copy/paste typos in stdio.rs comments
durka Aug 12, 2015
d73d22b
Update version number response for new version of rust
Aug 12, 2015
93bb57e
rollup merge of #27605: AlisdairO/diagnostics387
alexcrichton Aug 12, 2015
a0d5181
rollup merge of #27615: GuillaumeGomez/send_sync
alexcrichton Aug 12, 2015
e132f76
rollup merge of #27618: dotdash/drop_fixes
alexcrichton Aug 12, 2015
737397c
rollup merge of #27622: eefriedman/https-url
alexcrichton Aug 12, 2015
e837258
rollup merge of #27630: sylvestre/master
alexcrichton Aug 12, 2015
726c9f2
rollup merge of #27635: GuillaumeGomez/patch-4
alexcrichton Aug 12, 2015
4c728f8
rollup merge of #27636: llogiq/patch-1
alexcrichton Aug 12, 2015
b5b8f1b
rollup merge of #27644: AlisdairO/diagnostics194
alexcrichton Aug 12, 2015
29eae0e
rollup merge of #27650: dotdash/backtrace_test
alexcrichton Aug 12, 2015
1757837
rollup merge of #27659: goyox86/goyox86/update-spanish-book-link
alexcrichton Aug 12, 2015
2abc936
rollup merge of #27663: tbu-/pr_remove_fixme
alexcrichton Aug 12, 2015
8267ff7
rollup merge of #27664: birkenfeld/patch-1
alexcrichton Aug 12, 2015
d2552fa
rollup merge of #27665: frewsxcv/patch-25
alexcrichton Aug 12, 2015
d493659
rollup merge of #27666: vadimcn/cabi-typo
alexcrichton Aug 12, 2015
d4f2ef9
rollup merge of #27672: eefriedman/ios-target-cpu
alexcrichton Aug 12, 2015
00ac2c0
rollup merge of #27674: zaeleus/ios-imports
alexcrichton Aug 12, 2015
bbef889
rollup merge of #27676: alexcrichton/msvc-unwind
alexcrichton Aug 12, 2015
837ae4f
rollup merge of #27678: alexcrichton/snapshots
alexcrichton Aug 12, 2015
db3f063
rollup merge of #27679: durka/patch-5
alexcrichton Aug 12, 2015
fe3ab21
rollup merge of #27682: neurons/np.27681
alexcrichton Aug 12, 2015
6b09eb8
Test fixes and rebase conflicts
alexcrichton Aug 12, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ hop on [#rust-internals][pound-rust-internals].
As a reminder, all contributors are expected to follow our [Code of Conduct][coc].

[pound-rust-internals]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-internals
[internals]: http://internals.rust-lang.org
[coc]: http://www.rust-lang.org/conduct.html
[internals]: https://internals.rust-lang.org
[coc]: https://www.rust-lang.org/conduct.html

## Feature Requests

Expand Down Expand Up @@ -207,6 +207,6 @@ it to [Crates.io](http://crates.io). Easier said than done, but very, very
valuable!

[pound-rust]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust
[users]: http://users.rust-lang.org/
[users]: https://users.rust-lang.org/
[so]: http://stackoverflow.com/questions/tagged/rust
[community-library]: https://github.com/rust-lang/rfcs/labels/A-community-library
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ as standard libraries, tools and documentation for Rust.

Read ["Installing Rust"] from [The Book].

["Installing Rust"]: http://doc.rust-lang.org/book/installing-rust.html
[The Book]: http://doc.rust-lang.org/book/index.html
["Installing Rust"]: https://doc.rust-lang.org/book/installing-rust.html
[The Book]: https://doc.rust-lang.org/book/index.html

## Building from Source

Expand Down Expand Up @@ -117,7 +117,7 @@ The Rust community congregates in a few places:

[Stack Overflow]: http://stackoverflow.com/questions/tagged/rust
[/r/rust]: http://reddit.com/r/rust
[users.rust-lang.org]: http://users.rust-lang.org/
[users.rust-lang.org]: https://users.rust-lang.org/

## Contributing

Expand Down
110 changes: 55 additions & 55 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,51 +102,51 @@ Misc
* Fat pointers are now [passed in pairs of immediate arguments][fat],
resulting in faster compile times and smaller code.

[`Extend`]: http://doc.rust-lang.org/nightly/std/iter/trait.Extend.html
[`Extend`]: https://doc.rust-lang.org/nightly/std/iter/trait.Extend.html
[extend-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0839-embrace-extend-extinguish.md
[`iter::once`]: http://doc.rust-lang.org/nightly/std/iter/fn.once.html
[`iter::empty`]: http://doc.rust-lang.org/nightly/std/iter/fn.empty.html
[`matches`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.matches
[`rmatches`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.rmatches
[`Cell`]: http://doc.rust-lang.org/nightly/std/cell/struct.Cell.html
[`RefCell`]: http://doc.rust-lang.org/nightly/std/cell/struct.RefCell.html
[`wrapping_add`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_add
[`wrapping_sub`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_sub
[`wrapping_mul`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_mul
[`wrapping_div`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_div
[`wrapping_rem`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_rem
[`wrapping_neg`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_neg
[`wrapping_shl`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shl
[`wrapping_shr`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shr
[`Wrapping`]: http://doc.rust-lang.org/nightly/std/num/struct.Wrapping.html
[`fmt::Formatter`]: http://doc.rust-lang.org/nightly/std/fmt/struct.Formatter.html
[`fmt::Write`]: http://doc.rust-lang.org/nightly/std/fmt/trait.Write.html
[`io::Write`]: http://doc.rust-lang.org/nightly/std/io/trait.Write.html
[`debug_struct`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_struct
[`debug_tuple`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_tuple
[`debug_list`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_list
[`debug_set`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_set
[`debug_map`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_map
[`Debug`]: http://doc.rust-lang.org/nightly/std/fmt/trait.Debug.html
[strup]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_uppercase
[strlow]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_lowercase
[`to_uppercase`]: http://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_uppercase
[`to_lowercase`]: http://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_lowercase
[`PoisonError`]: http://doc.rust-lang.org/nightly/std/sync/struct.PoisonError.html
[`RwLock`]: http://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html
[`Mutex`]: http://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html
[`FromRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
[`AsRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
[`Stdio`]: http://doc.rust-lang.org/nightly/std/process/struct.Stdio.html
[`ChildStdin`]: http://doc.rust-lang.org/nightly/std/process/struct.ChildStdin.html
[`ChildStdout`]: http://doc.rust-lang.org/nightly/std/process/struct.ChildStdout.html
[`ChildStderr`]: http://doc.rust-lang.org/nightly/std/process/struct.ChildStderr.html
[`io::ErrorKind`]: http://doc.rust-lang.org/nightly/std/io/enum.ErrorKind.html
[`iter::once`]: https://doc.rust-lang.org/nightly/std/iter/fn.once.html
[`iter::empty`]: https://doc.rust-lang.org/nightly/std/iter/fn.empty.html
[`matches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.matches
[`rmatches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.rmatches
[`Cell`]: https://doc.rust-lang.org/nightly/std/cell/struct.Cell.html
[`RefCell`]: https://doc.rust-lang.org/nightly/std/cell/struct.RefCell.html
[`wrapping_add`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_add
[`wrapping_sub`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_sub
[`wrapping_mul`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_mul
[`wrapping_div`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_div
[`wrapping_rem`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_rem
[`wrapping_neg`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_neg
[`wrapping_shl`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shl
[`wrapping_shr`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shr
[`Wrapping`]: https://doc.rust-lang.org/nightly/std/num/struct.Wrapping.html
[`fmt::Formatter`]: https://doc.rust-lang.org/nightly/std/fmt/struct.Formatter.html
[`fmt::Write`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Write.html
[`io::Write`]: https://doc.rust-lang.org/nightly/std/io/trait.Write.html
[`debug_struct`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_struct
[`debug_tuple`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_tuple
[`debug_list`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_list
[`debug_set`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_set
[`debug_map`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_map
[`Debug`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Debug.html
[strup]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_uppercase
[strlow]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_lowercase
[`to_uppercase`]: https://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_uppercase
[`to_lowercase`]: https://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_lowercase
[`PoisonError`]: https://doc.rust-lang.org/nightly/std/sync/struct.PoisonError.html
[`RwLock`]: https://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html
[`Mutex`]: https://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html
[`FromRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
[`AsRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
[`Stdio`]: https://doc.rust-lang.org/nightly/std/process/struct.Stdio.html
[`ChildStdin`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStdin.html
[`ChildStdout`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStdout.html
[`ChildStderr`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStderr.html
[`io::ErrorKind`]: https://doc.rust-lang.org/nightly/std/io/enum.ErrorKind.html
[debugfmt]: https://www.reddit.com/r/rust/comments/3ceaui/psa_produces_prettyprinted_debug_output/
[`DerefMut`]: http://doc.rust-lang.org/nightly/std/ops/trait.DerefMut.html
[`mem::align_of`]: http://doc.rust-lang.org/nightly/std/mem/fn.align_of.html
[`DerefMut`]: https://doc.rust-lang.org/nightly/std/ops/trait.DerefMut.html
[`mem::align_of`]: https://doc.rust-lang.org/nightly/std/mem/fn.align_of.html
[align]: https://github.com/rust-lang/rust/pull/25646
[`mem::min_align_of`]: http://doc.rust-lang.org/nightly/std/mem/fn.min_align_of.html
[`mem::min_align_of`]: https://doc.rust-lang.org/nightly/std/mem/fn.min_align_of.html
[typos]: https://github.com/rust-lang/rust/pull/26087
[nop]: https://github.com/rust-lang/rust/pull/26336
[fat]: https://github.com/rust-lang/rust/pull/26411
Expand Down Expand Up @@ -237,14 +237,14 @@ Misc
* [The `drop_with_repr_extern` lint warns about mixing `repr(C)`
with `Drop`][drop].

[`str::split_whitespace`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_whitespace
[`FromRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
[`AsRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
[`std::os::unix::symlink`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/fn.symlink.html
[`IntoIterator`]: http://doc.rust-lang.org/nightly/std/iter/trait.IntoIterator.html
[`From`]: http://doc.rust-lang.org/nightly/std/convert/trait.From.html
[`str::split_whitespace`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_whitespace
[`FromRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
[`AsRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
[`std::os::unix::symlink`]: https://doc.rust-lang.org/nightly/std/os/unix/fs/fn.symlink.html
[`IntoIterator`]: https://doc.rust-lang.org/nightly/std/iter/trait.IntoIterator.html
[`From`]: https://doc.rust-lang.org/nightly/std/convert/trait.From.html
[rf]: https://github.com/rust-lang/rust/pull/24491
[err-index]: http://doc.rust-lang.org/error-index.html
[err-index]: https://doc.rust-lang.org/error-index.html
[sk]: https://github.com/rust-lang/rust/pull/24615
[pre]: https://github.com/rust-lang/rust/pull/25323
[file]: https://github.com/rust-lang/rust/pull/24598
Expand All @@ -258,13 +258,13 @@ Misc
[pie]: https://github.com/rust-lang/rust/pull/24953
[abs]: https://github.com/rust-lang/rust/pull/25441
[c]: https://github.com/rust-lang/rust/pull/25496
[`Cloned`]: http://doc.rust-lang.org/nightly/std/iter/struct.Cloned.html
[`Incoming`]: http://doc.rust-lang.org/nightly/std/net/struct.Incoming.html
[`Cloned`]: https://doc.rust-lang.org/nightly/std/iter/struct.Cloned.html
[`Incoming`]: https://doc.rust-lang.org/nightly/std/net/struct.Incoming.html
[inc]: https://github.com/rust-lang/rust/pull/25522
[bh]: https://github.com/rust-lang/rust/pull/25856
[`BinaryHeap`]: http://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html
[`BinaryHeap`]: https://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html
[ll]: https://github.com/rust-lang/rust/pull/26022
[`split_off`]: http://doc.rust-lang.org/nightly/collections/linked_list/struct.LinkedList.html#method.split_off
[`split_off`]: https://doc.rust-lang.org/nightly/collections/linked_list/struct.LinkedList.html#method.split_off
[drop]: https://github.com/rust-lang/rust/pull/24935

Version 1.0.0 (May 2015)
Expand Down Expand Up @@ -508,7 +508,7 @@ Version 1.0.0-alpha.2 (February 2015)
[drop]: https://github.com/rust-lang/rust/pull/21972
[drop-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md
[feat]: https://github.com/rust-lang/rust/pull/21248
[feat-forum]: http://users.rust-lang.org/t/psa-important-info-about-rustcs-new-feature-staging/82/5
[feat-forum]: https://users.rust-lang.org/t/psa-important-info-about-rustcs-new-feature-staging/82/5
[feat-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md
[fmt]: https://github.com/rust-lang/rust/pull/21457
[into]: https://github.com/rust-lang/rust/pull/20790
Expand Down Expand Up @@ -709,7 +709,7 @@ Version 1.0.0-alpha (January 2015)
[objsafe]: https://github.com/rust-lang/rfcs/blob/master/text/0255-object-safety.md
[assoc]: https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-items.md
[ints]: https://github.com/rust-lang/rfcs/pull/544#issuecomment-68760871
[trpl]: http://doc.rust-lang.org/book/index.html
[trpl]: https://doc.rust-lang.org/book/index.html
[rbe]: http://rustbyexample.com/


Expand Down
4 changes: 2 additions & 2 deletions mk/docs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ L10N_LANGS := ja
RUSTDOC_HTML_OPTS_NO_CSS = --html-before-content=doc/version_info.html \
--html-in-header=doc/favicon.inc \
--html-after-content=doc/footer.inc \
--markdown-playground-url='http://play.rust-lang.org/'
--markdown-playground-url='https://play.rust-lang.org/'

RUSTDOC_HTML_OPTS = $(RUSTDOC_HTML_OPTS_NO_CSS) --markdown-css rust.css

Expand Down Expand Up @@ -169,7 +169,7 @@ doc/not_found.html: $(D)/not_found.md $(HTML_DEPS) | doc/
@$(call E, rustdoc: $@)
$(Q)$(RUSTDOC) $(RUSTDOC_HTML_OPTS_NO_CSS) \
--markdown-no-toc \
--markdown-css http://doc.rust-lang.org/rust.css $<
--markdown-css https://doc.rust-lang.org/rust.css $<

define DEF_DOC

Expand Down
2 changes: 1 addition & 1 deletion src/doc/favicon.inc
Original file line number Diff line number Diff line change
@@ -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">
8 changes: 4 additions & 4 deletions src/doc/not_found.md
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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 = "";
Expand Down
2 changes: 1 addition & 1 deletion src/doc/style/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
2 changes: 1 addition & 1 deletion src/doc/style/errors/ergonomics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/doc/style/errors/signaling.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
28 changes: 15 additions & 13 deletions src/doc/style/features/functions-and-methods/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ 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]

_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.
Expand All @@ -147,24 +147,26 @@ Choose an argument type that rules out bad inputs.
For example, prefer

```rust
fn foo(a: ascii::Ascii) { ... }
enum FooMode {
Mode1,
Mode2,
Mode3,
}
fn foo(mode: FooMode) { ... }
```

over

```rust
fn foo(a: u8) { ... }
fn foo(mode2: bool, mode3: bool) {
assert!(!mode2 || !mode3);
...
}
```

Note that
[`ascii::Ascii`](http://static.rust-lang.org/doc/master/std/ascii/struct.Ascii.html)
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.

Static enforcement usually comes at little run-time cost: it pushes the
costs to the boundaries (e.g. when a `u8` is first converted into an
`Ascii`). It also catches bugs early, during compilation, rather than through
run-time failures.
costs to the boundaries. It also catches bugs early, during compilation,
rather than through run-time failures.

On the other hand, some properties are difficult or impossible to
express using types.
Expand All @@ -177,7 +179,7 @@ downsides:

1. Runtime overhead (unless checking can be done as part of processing the input).
2. Delayed detection of bugs.
3. Introduces failure cases, either via `fail!` or `Result`/`Option` types (see
3. Introduces failure cases, either via `panic!` or `Result`/`Option` types (see
the [error handling guidelines](../../errors/README.md)), which must then be
dealt with by client code.

Expand Down
Loading