Skip to content

Commit 2bb8fca

Browse files
committed
Auto merge of #44058 - frewsxcv:rollup, r=frewsxcv
Rollup of 8 pull requests - Successful merges: #43631, #43977, #43983, #44016, #44039, #44043, #44047, #44054 - Failed merges:
2 parents a3f0ee9 + 96efcdf commit 2bb8fca

File tree

8 files changed

+30
-18
lines changed

8 files changed

+30
-18
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ Windows build triples are:
135135
- `i686-pc-windows-msvc`
136136
- `x86_64-pc-windows-msvc`
137137

138-
The build triple can be specified by either specifying `--build=ABI` when
138+
The build triple can be specified by either specifying `--build=<triple>` when
139139
invoking `x.py` commands, or by copying the `config.toml` file (as described
140140
in Building From Source), and modifying the `build` option under the `[build]`
141141
section.

src/libproc_macro/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ pub enum TokenNode {
246246
pub enum Delimiter {
247247
/// `( ... )`
248248
Parenthesis,
249-
/// `[ ... ]`
250-
Brace,
251249
/// `{ ... }`
250+
Brace,
251+
/// `[ ... ]`
252252
Bracket,
253253
/// An implicit delimiter, e.g. `$var`, where $var is `...`.
254254
None,

src/librustdoc/html/static/rustdoc.css

+4
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ p {
126126
margin: 0 0 .6em 0;
127127
}
128128

129+
summary {
130+
outline: none;
131+
}
132+
129133
code, pre {
130134
font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
131135
white-space: pre-wrap;

src/libstd/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
//! Note the documentation for the primitives [`str`] and [`[T]`][slice] (also
8282
//! called 'slice'). Many method calls on [`String`] and [`Vec<T>`] are actually
8383
//! calls to methods on [`str`] and [`[T]`][slice] respectively, via [deref
84-
//! coercions].
84+
//! coercions][deref-coercions].
8585
//!
8686
//! Third, the standard library defines [The Rust Prelude], a small collection
8787
//! of items - mostly traits - that are imported into every module of every
@@ -203,7 +203,7 @@
203203
//! [`use`]: ../book/first-edition/crates-and-modules.html#importing-modules-with-use
204204
//! [crate root]: ../book/first-edition/crates-and-modules.html#basic-terminology-crates-and-modules
205205
//! [crates.io]: https://crates.io
206-
//! [deref coercions]: ../book/first-edition/deref-coercions.html
206+
//! [deref-coercions]: ../book/second-edition/ch15-02-deref.html#implicit-deref-coercions-with-functions-and-methods
207207
//! [files]: fs/struct.File.html
208208
//! [multithreading]: thread/index.html
209209
//! [other]: #what-is-in-the-standard-library-documentation

src/libstd/path.rs

+13-3
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,11 @@ unsafe fn u8_slice_as_os_str(s: &[u8]) -> &OsStr {
323323
mem::transmute(s)
324324
}
325325

326+
// Detect scheme on Redox
327+
fn has_redox_scheme(s: &[u8]) -> bool {
328+
cfg!(target_os = "redox") && s.split(|b| *b == b'/').next().unwrap_or(b"").contains(&b':')
329+
}
330+
326331
////////////////////////////////////////////////////////////////////////////////
327332
// Cross-platform, iterator-independent parsing
328333
////////////////////////////////////////////////////////////////////////////////
@@ -1685,8 +1690,12 @@ impl Path {
16851690
#[stable(feature = "rust1", since = "1.0.0")]
16861691
#[allow(deprecated)]
16871692
pub fn is_absolute(&self) -> bool {
1688-
// FIXME: Remove target_os = "redox" and allow Redox prefixes
1689-
self.has_root() && (cfg!(unix) || cfg!(target_os = "redox") || self.prefix().is_some())
1693+
if !cfg!(target_os = "redox") {
1694+
self.has_root() && (cfg!(unix) || self.prefix().is_some())
1695+
} else {
1696+
// FIXME: Allow Redox prefixes
1697+
has_redox_scheme(self.as_u8_slice())
1698+
}
16901699
}
16911700

16921701
/// Returns `true` if the `Path` is relative, i.e. not absolute.
@@ -2050,7 +2059,8 @@ impl Path {
20502059
Components {
20512060
path: self.as_u8_slice(),
20522061
prefix,
2053-
has_physical_root: has_physical_root(self.as_u8_slice(), prefix),
2062+
has_physical_root: has_physical_root(self.as_u8_slice(), prefix) ||
2063+
has_redox_scheme(self.as_u8_slice()),
20542064
front: State::Prefix,
20552065
back: State::Body,
20562066
}

src/libstd/primitive_docs.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,10 @@ mod prim_unit { }
188188
/// Working with raw pointers in Rust is uncommon,
189189
/// typically limited to a few patterns.
190190
///
191-
/// Use the [`null`] function to create null pointers, and the [`is_null`] method
192-
/// of the `*const T` type to check for null. The `*const T` type also defines
193-
/// the [`offset`] method, for pointer math.
191+
/// Use the [`null`] and [`null_mut`] functions to create null pointers, and the
192+
/// [`is_null`] method of the `*const T` and `*mut T` types to check for null.
193+
/// The `*const T` and `*mut T` types also define the [`offset`] method, for
194+
/// pointer math.
194195
///
195196
/// # Common ways to create raw pointers
196197
///
@@ -261,6 +262,7 @@ mod prim_unit { }
261262
/// *[See also the `std::ptr` module](ptr/index.html).*
262263
///
263264
/// [`null`]: ../std/ptr/fn.null.html
265+
/// [`null_mut`]: ../std/ptr/fn.null_mut.html
264266
/// [`is_null`]: ../std/primitive.pointer.html#method.is_null
265267
/// [`offset`]: ../std/primitive.pointer.html#method.offset
266268
/// [`into_raw`]: ../std/boxed/struct.Box.html#method.into_raw

src/libstd/thread/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ impl Builder {
374374
{
375375
let Builder { name, stack_size } = self;
376376

377-
let stack_size = stack_size.unwrap_or(util::min_stack());
377+
let stack_size = stack_size.unwrap_or_else(util::min_stack);
378378

379379
let my_thread = Thread::new(name);
380380
let their_thread = my_thread.clone();

src/test/run-pass/union/union-basic.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010

1111
// aux-build:union.rs
1212

13-
// FIXME: This test case makes little-endian assumptions.
14-
// ignore-s390x
15-
// ignore-sparc
16-
1713
extern crate union;
1814
use std::mem::{size_of, align_of, zeroed};
1915

@@ -39,7 +35,7 @@ fn local() {
3935
assert_eq!(w.b, 0);
4036
w.a = 1;
4137
assert_eq!(w.a, 1);
42-
assert_eq!(w.b, 1);
38+
assert_eq!(w.b.to_le(), 1);
4339
}
4440
}
4541

@@ -60,7 +56,7 @@ fn xcrate() {
6056
assert_eq!(w.b, 0);
6157
w.a = 1;
6258
assert_eq!(w.a, 1);
63-
assert_eq!(w.b, 1);
59+
assert_eq!(w.b.to_le(), 1);
6460
}
6561
}
6662

0 commit comments

Comments
 (0)