about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-10-29 01:25:34 +0000
committerbors <bors@rust-lang.org>2015-10-29 01:25:34 +0000
commitb4af35f7b1dc30468a043dabd689365f4e518bda (patch)
treeace55f220a0b039e39df04861c68ff6650963017 /src
parent8ca0acc25adb00d29e52b015bded4b2872a1170c (diff)
parent0809eaa7c05bdaef3fdd5efebdd3ff280a21668c (diff)
downloadrust-b4af35f7b1dc30468a043dabd689365f4e518bda.tar.gz
rust-b4af35f7b1dc30468a043dabd689365f4e518bda.zip
Auto merge of #29444 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #29264, #29405, #29417, #29435, #29437, #29438
- Failed merges: 
Diffstat (limited to 'src')
-rw-r--r--src/doc/trpl/syntax-index.md11
-rw-r--r--src/doc/trpl/the-stack-and-the-heap.md2
-rw-r--r--src/etc/add-authors.sh9
-rw-r--r--src/libcore/macros.rs5
-rw-r--r--src/librustdoc/html/format.rs4
-rw-r--r--src/librustdoc/html/static/main.css9
6 files changed, 29 insertions, 11 deletions
diff --git a/src/doc/trpl/syntax-index.md b/src/doc/trpl/syntax-index.md
index 7e03bb72cad..d0b46ed3719 100644
--- a/src/doc/trpl/syntax-index.md
+++ b/src/doc/trpl/syntax-index.md
@@ -60,6 +60,7 @@
 * `-` (`- expr`): arithmetic negation.  Overloadable (`Neg`).
 * `-=` (`var -= expr`): arithmetic subtraction & assignment.
 * `->` (`fn(…) -> type`, `|…| -> type`): function and closure return type.  See [Functions], [Closures].
+* `-> !` (`fn(…) -> !`, `|…| -> !`): diverging function or closure. See [Diverging Functions].
 * `.` (`expr.ident`): member access.  See [Structs], [Method Syntax].
 * `..` (`..`, `expr..`, `..expr`, `expr..expr`): right-exclusive range literal.
 * `..` (`..expr`): struct literal update syntax.  See [Structs (Update syntax)].
@@ -99,9 +100,9 @@
 * `'ident`: named lifetime or loop label.  See [Lifetimes], [Loops (Loops Labels)].
 * `…u8`, `…i32`, `…f64`, `…usize`, …: numeric literal of specific type.
 * `"…"`: string literal.  See [Strings].
-* `r"…"`, `r#"…"#`, `r##"…"##`, …: raw string literal.
-* `b"…"`: byte string literal.
-* `rb"…"`, `rb#"…"#`, `rb##"…"##`, …: raw byte string literal.
+* `r"…"`, `r#"…"#`, `r##"…"##`, …: raw string literal, escape characters are not processed. See [Reference (Raw String Literals)].
+* `b"…"`: byte string literal, constructs a `[u8]` instead of a string. See [Reference (Byte String Literals)].
+* `br"…"`, `br#"…"#`, `br##"…"##`, …: raw byte string literal, combination of raw and byte string literal. See [Reference (Raw Byte String Literals)].
 * `'…'`: character literal.  See [Primitive Types (`char`)].
 * `b'…'`: ASCII byte literal.
 
@@ -189,6 +190,7 @@
 [Crates and Modules (Importing External Crates)]: crates-and-modules.html#importing-external-crates
 [Crates and Modules (Importing Modules with `use`)]: crates-and-modules.html#importing-modules-with-use
 [Crates and Modules (Re-exporting with `pub use`)]: crates-and-modules.html#re-exporting-with-pub-use
+[Diverging Functions]: functions.html#diverging-functions
 [Enums]: enums.html
 [Foreign Function Interface]: ffi.html
 [Functions (Early Returns)]: functions.html#early-returns
@@ -217,6 +219,9 @@
 [Primitive Types (Tuple Indexing)]: primitive-types.html#tuple-indexing
 [Primitive Types (Tuples)]: primitive-types.html#tuples
 [Raw Pointers]: raw-pointers.html
+[Reference (Byte String Literals)]: ../reference.html#byte-string-literals
+[Reference (Raw Byte String Literals)]: ../reference.html#raw-byte-string-literals
+[Reference (Raw String Literals)]: ../reference.html#raw-string-literals
 [References and Borrowing]: references-and-borrowing.html
 [Strings]: strings.html
 [Structs (Update syntax)]: structs.html#update-syntax
diff --git a/src/doc/trpl/the-stack-and-the-heap.md b/src/doc/trpl/the-stack-and-the-heap.md
index f30dacc485a..0bc2ca263d5 100644
--- a/src/doc/trpl/the-stack-and-the-heap.md
+++ b/src/doc/trpl/the-stack-and-the-heap.md
@@ -97,7 +97,7 @@ Because `0` was taken by the first frame, `1` and `2` are used for `foo()`’s
 stack frame. It grows upward, the more functions we call.
 
 
-There’s some important things we have to take note of here. The numbers 0, 1,
+There are some important things we have to take note of here. The numbers 0, 1,
 and 2 are all solely for illustrative purposes, and bear no relationship to the
 actual numbers the computer will actually use. In particular, the series of
 addresses are in reality going to be separated by some number of bytes that
diff --git a/src/etc/add-authors.sh b/src/etc/add-authors.sh
index 917053cc205..3ae0ec73957 100644
--- a/src/etc/add-authors.sh
+++ b/src/etc/add-authors.sh
@@ -18,6 +18,11 @@
 # changes. If there are incorrect additions fix it by editing
 # .mailmap and re-running the script.
 
+if [ "${1-}" = "" ]; then
+    echo "Usage: add-authors.sh 1.0.0..rust-lang/master"
+    exit 1
+fi
+
 set -u -e
 
 range="$1"
@@ -27,6 +32,6 @@ tmp_file="./AUTHORS.txt.tmp"
 old_authors="$(cat "$authors_file" | tail -n +2 | sed "/^$/d" | sort)"
 new_authors="$(git log "$range" --format="%aN <%aE>" | sort | uniq)"
 
-echo "Rust was written by these fine people:\n" > "$tmp_file"
-echo "$old_authors\n$new_authors" | sort | uniq >> "$tmp_file"
+printf "%s\n\n" "Rust was written by these fine people:" > "$tmp_file"
+printf "%s\n%s" "$old_authors" "$new_authors" | sort | uniq >> "$tmp_file"
 mv -f "$tmp_file" "$authors_file"
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs
index bb112327abf..5b5f59d5ddb 100644
--- a/src/libcore/macros.rs
+++ b/src/libcore/macros.rs
@@ -34,6 +34,8 @@ macro_rules! panic {
 /// This will invoke the `panic!` macro if the provided expression cannot be
 /// evaluated to `true` at runtime.
 ///
+/// This macro has a second version, where a custom panic message can be provided.
+///
 /// # Examples
 ///
 /// ```
@@ -99,6 +101,9 @@ macro_rules! assert_eq {
 /// This will invoke the `panic!` macro if the provided expression cannot be
 /// evaluated to `true` at runtime.
 ///
+/// Like `assert!`, this macro also has a second version, where a custom panic
+/// message can be provided.
+///
 /// Unlike `assert!`, `debug_assert!` statements are only enabled in non
 /// optimized builds by default. An optimized build will omit all
 /// `debug_assert!` statements unless `-C debug-assertions` is passed to the
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs
index d12c5d2c6fb..79585a94cd0 100644
--- a/src/librustdoc/html/format.rs
+++ b/src/librustdoc/html/format.rs
@@ -378,7 +378,7 @@ fn primitive_link(f: &mut fmt::Formatter,
         Some(&LOCAL_CRATE) => {
             let len = CURRENT_LOCATION_KEY.with(|s| s.borrow().len());
             let len = if len == 0 {0} else {len - 1};
-            try!(write!(f, "<a href='{}primitive.{}.html'>",
+            try!(write!(f, "<a class='primitive' href='{}primitive.{}.html'>",
                         repeat("../").take(len).collect::<String>(),
                         prim.to_url_str()));
             needs_termination = true;
@@ -398,7 +398,7 @@ fn primitive_link(f: &mut fmt::Formatter,
             };
             match loc {
                 Some(root) => {
-                    try!(write!(f, "<a href='{}{}/primitive.{}.html'>",
+                    try!(write!(f, "<a class='primitive' href='{}{}/primitive.{}.html'>",
                                 root,
                                 path.0.first().unwrap(),
                                 prim.to_url_str()));
diff --git a/src/librustdoc/html/static/main.css b/src/librustdoc/html/static/main.css
index 5e27eab8575..a90bf17601f 100644
--- a/src/librustdoc/html/static/main.css
+++ b/src/librustdoc/html/static/main.css
@@ -415,9 +415,12 @@ a {
 .content span.mod, .content a.mod, block a.current.mod { color: #4d76ae; }
 .content span.enum, .content a.enum, .block a.current.enum { color: #5e9766; }
 .content span.struct, .content a.struct, .block a.current.struct { color: #e53700; }
-.content span.fn, .content a.fn, .block a.current.fn { color: #8c6067; }
-.content span.method, .content a.method, .block a.current.method { color: #8c6067; }
-.content span.tymethod, .content a.tymethod, .block a.current.tymethod { color: #8c6067; }
+.content a.primitive { color: #39a7bf; }
+.content a.type { color: #e57300; }
+.content a.macro { color: #068000; }
+.content span.fn, .content a.fn, .block a.current.fn,
+.content span.method, .content a.method, .block a.current.method,
+.content span.tymethod, .content a.tymethod, .block a.current.tymethod,
 .content .fnname { color: #8c6067; }
 .block a.current.crate { font-weight: 500; }