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

Rollup of 12 pull requests #40513

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
13341f4
Reword the non-dropping of `src` for `ptr::write{,_unaligned}`
tbu- Mar 9, 2017
97a1b6a
Update usages of 'OSX' (and other old names) to 'macOS'.
frewsxcv Mar 12, 2017
0644773
Remove doc about highlighting code in other languages #40301
projektir Mar 13, 2017
6b7b262
Updating README.md to point to the correct doc location
projektir Mar 13, 2017
197e529
Initial attempt at implementing optimization fuel and re-enabling str…
ahicks92 Mar 8, 2017
8f36057
Make a comment better.
ahicks92 Mar 9, 2017
c2d14fc
Tests for -Z fuel=foo=n
ahicks92 Mar 10, 2017
3fb94b7
UI test for -Z print-fuel=foo
ahicks92 Mar 10, 2017
eb203d5
Adjust wording #40301
projektir Mar 13, 2017
adba642
fix format grammar
llogiq Mar 13, 2017
5e49f79
Add test for issue #29595
mattico Mar 10, 2017
11d3344
Using X headings #39850
projektir Mar 13, 2017
8b9b3b6
Fix sidebar not extending to the bottom of the page
wesleywiser Mar 14, 2017
1545f4e
std: remove a workaround for privacy limitations that isn't necessary…
swgillespie Mar 14, 2017
e7b0f2b
Remove function invokation parens from documentation links.
frewsxcv Mar 12, 2017
460bf55
Cleanup.
jseyfried Mar 6, 2017
68c1cc6
Refactor `Attribute` to use `Path` and `TokenStream` instead of `Meta…
jseyfried Mar 3, 2017
839c286
Liberalize attributes.
jseyfried Mar 8, 2017
85e02bd
Add tests.
jseyfried Mar 8, 2017
b6c26ef
Rollup merge of #40346 - jseyfried:path_and_tokenstream_attr, r=nrc
frewsxcv Mar 14, 2017
a72b876
Rollup merge of #40377 - camlorn:optimization_fuel, r=eddyb
frewsxcv Mar 14, 2017
5d36784
Rollup merge of #40387 - tbu-:pr_doc_ptr_write2, r=steveklabnik
frewsxcv Mar 14, 2017
8f2ff57
Rollup merge of #40433 - mattico:test-issue-29595, r=estebank
frewsxcv Mar 14, 2017
2853a9b
Rollup merge of #40456 - frewsxcv:frewsxcv-docs-function-parens, r=Gu…
frewsxcv Mar 14, 2017
70511e7
Rollup merge of #40457 - frewsxcv:frewsxcv-macos, r=steveklabnik
frewsxcv Mar 14, 2017
7cf0a09
Rollup merge of #40466 - projektir:outdated_docs_highlighting, r=stev…
frewsxcv Mar 14, 2017
74c16eb
Rollup merge of #40467 - projektir:readme_docs, r=steveklabnik
frewsxcv Mar 14, 2017
bd5b868
Rollup merge of #40495 - llogiq:format-docs, r=steveklabnik
frewsxcv Mar 14, 2017
fd699d2
Rollup merge of #40496 - projektir:docs_number_headings, r=frewsxcv
frewsxcv Mar 14, 2017
9f2e520
Rollup merge of #40497 - wesleywiser:fix_sidebar, r=GuillaumeGomez
frewsxcv Mar 14, 2017
fc1bb24
Rollup merge of #40503 - swgillespie:thread-hack-removal, r=sfackler
frewsxcv Mar 14, 2017
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
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,9 @@ If you’d like to build the documentation, it’s almost the same:
$ ./x.py doc
```

The generated documentation will appear in a top-level `doc` directory,
created by the `make` rule.
The generated documentation will appear under `doc` in the `build` directory for
the ABI used. I.e., if the ABI was `x86_64-pc-windows-msvc`, the directory will be
`build\x86_64-pc-windows-msvc\doc`.

## Notes

Expand Down
2 changes: 1 addition & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5056,7 +5056,7 @@ Version 0.1 (2012-01-20)

* Compiler works with the following configurations:
* Linux: x86 and x86_64 hosts and targets
* MacOS: x86 and x86_64 hosts and targets
* macOS: x86 and x86_64 hosts and targets
* Windows: x86 hosts and targets

* Cross compilation / multi-target configuration supported.
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/bin/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ fn main() {
if env::var("RUSTC_RPATH") == Ok("true".to_string()) {
let rpath = if target.contains("apple") {

// Note that we need to take one extra step on OSX to also pass
// Note that we need to take one extra step on macOS to also pass
// `-Wl,-instal_name,@rpath/...` to get things to work right. To
// do that we pass a weird flag to the compiler to get it to do
// so. Note that this is definitely a hack, and we should likely
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ pub fn compiletest(build: &Build,
cmd.arg("--docck-python").arg(build.python());

if build.config.build.ends_with("apple-darwin") {
// Force /usr/bin/python on OSX for LLDB tests because we're loading the
// Force /usr/bin/python on macOS for LLDB tests because we're loading the
// LLDB plugin's compiled module which only works with the system python
// (namely not Homebrew-installed python)
cmd.arg("--lldb-python").arg("/usr/bin/python");
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ pub fn rustc(build: &Build, target: &str, compiler: &Compiler) {
cargo.env("CFG_LLVM_ROOT", s);
}
// Building with a static libstdc++ is only supported on linux right now,
// not for MSVC or OSX
// not for MSVC or macOS
if build.config.llvm_static_stdcpp &&
!target.contains("windows") &&
!target.contains("apple") {
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ impl Build {
.filter(|s| !s.starts_with("-O") && !s.starts_with("/O"))
.collect::<Vec<_>>();

// If we're compiling on OSX then we add a few unconditional flags
// If we're compiling on macOS then we add a few unconditional flags
// indicating that we want libc++ (more filled out than libstdc++) and
// we want to compile for 10.7. This way we can ensure that
// LLVM/jemalloc/etc are all properly compiled.
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ pub fn check(build: &mut Build) {
}

for target in build.config.target.iter() {
// Can't compile for iOS unless we're on OSX
// Can't compile for iOS unless we're on macOS
if target.contains("apple-ios") &&
!build.config.build.contains("apple-darwin") {
panic!("the iOS target is only supported on OSX");
panic!("the iOS target is only supported on macOS");
}

// Make sure musl-root is valid if specified
Expand Down
21 changes: 2 additions & 19 deletions src/doc/book/src/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ more than one section:
# fn foo() {}
```

Let's discuss the details of these code blocks.

#### Code block annotations

To write some Rust code in a comment, use the triple graves:
Expand All @@ -183,23 +181,8 @@ To write some Rust code in a comment, use the triple graves:
# fn foo() {}
```

If you want something that's not Rust code, you can add an annotation:

```rust
/// ```c
/// printf("Hello, world\n");
/// ```
# fn foo() {}
```

This will highlight according to whatever language you're showing off.
If you're only showing plain text, choose `text`.

It's important to choose the correct annotation here, because `rustdoc` uses it
in an interesting way: It can be used to actually test your examples in a
library crate, so that they don't get out of date. If you have some C code but
`rustdoc` thinks it's Rust because you left off the annotation, `rustdoc` will
complain when trying to generate the documentation.
This will add code highlighting. If you are only showing plain text, put `text`
instead of `rust` after the triple graves (see below).

## Documentation as tests

Expand Down
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
2 changes: 1 addition & 1 deletion src/doc/book/src/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ And that's reflected in the summary line:
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured
```

We also get a non-zero status code. We can use `$?` on OS X and Linux:
We also get a non-zero status code. We can use `$?` on macOS and Linux:

```bash
$ echo $?
Expand Down
6 changes: 3 additions & 3 deletions src/doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ Other unofficial documentation may exist elsewhere; for example, the [Rust
Learning] project collects documentation from the community, and [Docs.rs]
builds documentation for individual Rust packages.

## API Documentation
# API Documentation

Rust provides a standard library with a number of features; [we host its
documentation here][api].

## Extended Error Documentation
# Extended Error Documentation

Many of Rust's errors come with error codes, and you can request extended
diagnostics from the compiler on those errors. We also [have the text of those
extended errors on the web][err], if you prefer to read them that way.

## The Rust Bookshelf
# The Rust Bookshelf

Rust provides a number of book-length sets of documentation, collectively
nicknamed 'The Rust Bookshelf.'
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
2 changes: 1 addition & 1 deletion src/liballoc_jemalloc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub use imp::*;
mod imp {
use libc::{c_int, c_void, size_t};

// Note that the symbols here are prefixed by default on OSX and Windows (we
// Note that the symbols here are prefixed by default on macOS and Windows (we
// don't explicitly request it), and on Android and DragonFly we explicitly
// request it as unprefixing cause segfaults (mismatches in allocators).
extern "C" {
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
3 changes: 2 additions & 1 deletion src/libcollections/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@
//! `%`. The actual grammar for the formatting syntax is:
//!
//! ```text
//! format_string := <text> [ format <text> ] *
//! format_string := <text> [ maybe-format <text> ] *
//! maybe-format := '{' '{' | '}' '}' | <format>
//! format := '{' [ argument ] [ ':' format_spec ] '}'
//! argument := integer | identifier
//!
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
Loading