Skip to content

Commit 8cdde6d

Browse files
committed
Auto merge of #47012 - kennytm:rollup, r=kennytm
Rollup of 8 pull requests - Successful merges: #46928, #46930, #46933, #46939, #46940, #46943, #46979, #46986 - Failed merges:
2 parents 2e83f3c + 6b1aa53 commit 8cdde6d

File tree

18 files changed

+212
-14
lines changed

18 files changed

+212
-14
lines changed

CODE_OF_CONDUCT.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ A version of this document [can be found online](https://www.rust-lang.org/condu
1212
* Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer.
1313
* Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works.
1414
* We will exclude you from interaction if you insult, demean or harass anyone. That is not welcome behaviour. We interpret the term "harassment" as including the definition in the <a href="http://citizencodeofconduct.org/">Citizen Code of Conduct</a>; if you have any lack of clarity about what might be included in that concept, please read their definition. In particular, we don't tolerate behavior that excludes people in socially marginalized groups.
15-
* Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the channel ops or any of the [Rust moderation team](/team.html#Moderation) immediately. Whether you're a regular contributor or a newcomer, we care about making this community a safe place for you and we've got your back.
15+
* Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the channel ops or any of the [Rust moderation team][mod_team] immediately. Whether you're a regular contributor or a newcomer, we care about making this community a safe place for you and we've got your back.
1616
* Likewise any spamming, trolling, flaming, baiting or other attention-stealing behaviour is not welcome.
1717

1818
## Moderation
1919

2020

21-
These are the policies for upholding our community's standards of conduct. If you feel that a thread needs moderation, please contact the [Rust moderation team](/team.html#Moderation).
21+
These are the policies for upholding our community's standards of conduct. If you feel that a thread needs moderation, please contact the [Rust moderation team][mod_team].
2222

2323
1. Remarks that violate the Rust standards of conduct, including hateful, hurtful, oppressive, or exclusionary remarks, are not allowed. (Cursing is allowed, but never targeting another user, and never in a hateful manner.)
2424
2. Remarks that moderators find inappropriate, whether listed in the code of conduct or not, are also not allowed.
@@ -36,3 +36,5 @@ And if someone takes issue with something you said or did, resist the urge to be
3636
The enforcement policies listed above apply to all official Rust venues; including official IRC channels (#rust, #rust-internals, #rust-tools, #rust-libs, #rustc, #rust-beginners, #rust-docs, #rust-community, #rust-lang, and #cargo); GitHub repositories under rust-lang, rust-lang-nursery, and rust-lang-deprecated; and all forums under rust-lang.org (users.rust-lang.org, internals.rust-lang.org). For other projects adopting the Rust Code of Conduct, please contact the maintainers of those projects for enforcement. If you wish to use this code of conduct for your own project, consider explicitly mentioning your moderation policy or making a copy with your own moderation policy so as to avoid confusion.
3737

3838
*Adapted from the [Node.js Policy on Trolling](http://blog.izs.me/post/30036893703/policy-on-trolling) as well as the [Contributor Covenant v1.3.0](http://contributor-covenant.org/version/1/3/0/).*
39+
40+
[mod_team]: https://www.rust-lang.org/team.html#Moderation-team

src/etc/platform-intrinsics/x86/avx2.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
"intrinsic": "256_sad_epu8",
175175
"width": [256],
176176
"llvm": "psad.bw",
177-
"ret": "u8",
177+
"ret": "u64",
178178
"args": ["0", "0"]
179179
},
180180
{

src/liballoc/slice.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ impl<T> [T] {
699699
core_slice::SliceExt::split_at(self, mid)
700700
}
701701

702-
/// Divides one `&mut` into two at an index.
702+
/// Divides one mutable slice into two at an index.
703703
///
704704
/// The first will contain all indices from `[0, mid)` (excluding
705705
/// the index `mid` itself) and the second will contain all

src/libcore/num/f32.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! Operations and constants for 32-bits floats (`f32` type)
11+
//! This module provides constants which are specific to the implementation
12+
//! of the `f32` floating point data type.
13+
//!
14+
//! Mathematically significant numbers are provided in the `consts` sub-module.
15+
//!
16+
//! *[See also the `f32` primitive type](../../std/primitive.f32.html).*
1217
1318
#![stable(feature = "rust1", since = "1.0.0")]
1419

src/libcore/num/f64.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! Operations and constants for 64-bits floats (`f64` type)
11+
//! This module provides constants which are specific to the implementation
12+
//! of the `f64` floating point data type.
13+
//!
14+
//! Mathematically significant numbers are provided in the `consts` sub-module.
15+
//!
16+
//! *[See also the `f64` primitive type](../../std/primitive.f64.html).*
1217
1318
#![stable(feature = "rust1", since = "1.0.0")]
1419

src/libcore/num/mod.rs

+8
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ macro_rules! int_impl {
103103
///
104104
/// # Examples
105105
///
106+
/// Basic usage:
107+
///
106108
/// ```
107109
/// assert_eq!(i8::min_value(), -128);
108110
/// ```
@@ -116,6 +118,8 @@ macro_rules! int_impl {
116118
///
117119
/// # Examples
118120
///
121+
/// Basic usage:
122+
///
119123
/// ```
120124
/// assert_eq!(i8::max_value(), 127);
121125
/// ```
@@ -1252,6 +1256,8 @@ macro_rules! uint_impl {
12521256
///
12531257
/// # Examples
12541258
///
1259+
/// Basic usage:
1260+
///
12551261
/// ```
12561262
/// assert_eq!(u8::min_value(), 0);
12571263
/// ```
@@ -1263,6 +1269,8 @@ macro_rules! uint_impl {
12631269
///
12641270
/// # Examples
12651271
///
1272+
/// Basic usage:
1273+
///
12661274
/// ```
12671275
/// assert_eq!(u8::max_value(), 255);
12681276
/// ```

src/librustc/mir/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1896,7 +1896,7 @@ pub struct GeneratorLayout<'tcx> {
18961896
///
18971897
/// Example: If type check produces a closure with the closure substs:
18981898
///
1899-
/// ```
1899+
/// ```text
19001900
/// ClosureSubsts = [
19011901
/// i8, // the "closure kind"
19021902
/// for<'x> fn(&'a &'x u32) -> &'x u32, // the "closure signature"
@@ -1907,7 +1907,7 @@ pub struct GeneratorLayout<'tcx> {
19071907
/// here, there is one unique free region (`'a`) but it appears
19081908
/// twice. We would "renumber" each occurence to a unique vid, as follows:
19091909
///
1910-
/// ```
1910+
/// ```text
19111911
/// ClosureSubsts = [
19121912
/// i8, // the "closure kind"
19131913
/// for<'x> fn(&'1 &'x u32) -> &'x u32, // the "closure signature"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
use LinkerFlavor;
12+
use target::{Target, TargetResult};
13+
14+
pub fn target() -> TargetResult {
15+
let mut base = super::cloudabi_base::opts();
16+
base.max_atomic_width = Some(128);
17+
base.abi_blacklist = super::arm_base::abi_blacklist();
18+
19+
Ok(Target {
20+
llvm_target: "aarch64-unknown-cloudabi".to_string(),
21+
target_endian: "little".to_string(),
22+
target_pointer_width: "64".to_string(),
23+
target_c_int_width: "32".to_string(),
24+
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
25+
arch: "aarch64".to_string(),
26+
target_os: "cloudabi".to_string(),
27+
target_env: "".to_string(),
28+
target_vendor: "unknown".to_string(),
29+
linker_flavor: LinkerFlavor::Gcc,
30+
options: base,
31+
})
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
use LinkerFlavor;
12+
use target::{Target, TargetResult};
13+
14+
pub fn target() -> TargetResult {
15+
let mut base = super::cloudabi_base::opts();
16+
base.cpu = "cortex-a8".to_string();
17+
base.max_atomic_width = Some(64);
18+
base.features = "+v7,+vfp3,+neon".to_string();
19+
base.abi_blacklist = super::arm_base::abi_blacklist();
20+
21+
Ok(Target {
22+
llvm_target: "armv7-unknown-cloudabi-eabihf".to_string(),
23+
target_endian: "little".to_string(),
24+
target_pointer_width: "32".to_string(),
25+
target_c_int_width: "32".to_string(),
26+
data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
27+
arch: "arm".to_string(),
28+
target_os: "cloudabi".to_string(),
29+
target_env: "".to_string(),
30+
target_vendor: "unknown".to_string(),
31+
linker_flavor: LinkerFlavor::Gcc,
32+
options: base,
33+
})
34+
}
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
use LinkerFlavor;
12+
use target::{LinkArgs, TargetOptions, RelroLevel};
13+
use std::default::Default;
14+
15+
pub fn opts() -> TargetOptions {
16+
let mut args = LinkArgs::new();
17+
args.insert(LinkerFlavor::Gcc, vec![
18+
"-Wl,-Bstatic".to_string(),
19+
"-Wl,--no-dynamic-linker".to_string(),
20+
"-Wl,--eh-frame-hdr".to_string(),
21+
"-Wl,--gc-sections".to_string(),
22+
]);
23+
24+
TargetOptions {
25+
executables: true,
26+
target_family: Some("unix".to_string()),
27+
linker_is_gnu: true,
28+
pre_link_args: args,
29+
position_independent_executables: true,
30+
relro_level: RelroLevel::Full,
31+
exe_allocation_crate: super::maybe_jemalloc(),
32+
.. Default::default()
33+
}
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
use LinkerFlavor;
12+
use target::{Target, TargetResult};
13+
14+
pub fn target() -> TargetResult {
15+
let mut base = super::cloudabi_base::opts();
16+
base.cpu = "pentium4".to_string();
17+
base.max_atomic_width = Some(64);
18+
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m32".to_string());
19+
base.stack_probes = true;
20+
21+
Ok(Target {
22+
llvm_target: "i686-unknown-cloudabi".to_string(),
23+
target_endian: "little".to_string(),
24+
target_pointer_width: "32".to_string(),
25+
target_c_int_width: "32".to_string(),
26+
data_layout: "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128".to_string(),
27+
arch: "x86".to_string(),
28+
target_os: "cloudabi".to_string(),
29+
target_env: "".to_string(),
30+
target_vendor: "unknown".to_string(),
31+
linker_flavor: LinkerFlavor::Gcc,
32+
options: base,
33+
})
34+
}

src/librustc_back/target/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ mod apple_base;
5757
mod apple_ios_base;
5858
mod arm_base;
5959
mod bitrig_base;
60+
mod cloudabi_base;
6061
mod dragonfly_base;
6162
mod emscripten_base;
6263
mod freebsd_base;
@@ -227,6 +228,11 @@ supported_targets! {
227228
("thumbv7em-none-eabihf", thumbv7em_none_eabihf),
228229

229230
("msp430-none-elf", msp430_none_elf),
231+
232+
("aarch64-unknown-cloudabi", aarch64_unknown_cloudabi),
233+
("armv7-unknown-cloudabi-eabihf", armv7_unknown_cloudabi_eabihf),
234+
("i686-unknown-cloudabi", i686_unknown_cloudabi),
235+
("x86_64-unknown-cloudabi", x86_64_unknown_cloudabi),
230236
}
231237

232238
/// Everything `rustc` knows about how to compile for a specific target.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
use LinkerFlavor;
12+
use target::{Target, TargetResult};
13+
14+
pub fn target() -> TargetResult {
15+
let mut base = super::cloudabi_base::opts();
16+
base.cpu = "x86-64".to_string();
17+
base.max_atomic_width = Some(64);
18+
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
19+
base.stack_probes = true;
20+
21+
Ok(Target {
22+
llvm_target: "x86_64-unknown-cloudabi".to_string(),
23+
target_endian: "little".to_string(),
24+
target_pointer_width: "64".to_string(),
25+
target_c_int_width: "32".to_string(),
26+
data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
27+
arch: "x86_64".to_string(),
28+
target_os: "cloudabi".to_string(),
29+
target_env: "".to_string(),
30+
target_vendor: "unknown".to_string(),
31+
linker_flavor: LinkerFlavor::Gcc,
32+
options: base,
33+
})
34+
}

src/librustc_platform_intrinsics/x86.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ pub fn find(name: &str) -> Option<Intrinsic> {
354354
},
355355
"_mm256_sad_epu8" => Intrinsic {
356356
inputs: { static INPUTS: [&'static Type; 2] = [&::U8x32, &::U8x32]; &INPUTS },
357-
output: &::U8x32,
357+
output: &::U64x4,
358358
definition: Named("llvm.x86.avx2.psad.bw")
359359
},
360360
"_mm256_shuffle_epi8" => Intrinsic {

src/libstd/f32.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//!
1414
//! Mathematically significant numbers are provided in the `consts` sub-module.
1515
//!
16-
//! *[See also the `f32` primitive type](../primitive.f32.html).*
16+
//! *[See also the `f32` primitive type](../../std/primitive.f32.html).*
1717
1818
#![stable(feature = "rust1", since = "1.0.0")]
1919
#![allow(missing_docs)]

src/libstd/f64.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//!
1414
//! Mathematically significant numbers are provided in the `consts` sub-module.
1515
//!
16-
//! *[See also the `f64` primitive type](../primitive.f64.html).*
16+
//! *[See also the `f64` primitive type](../../std/primitive.f64.html).*
1717
1818
#![stable(feature = "rust1", since = "1.0.0")]
1919
#![allow(missing_docs)]

src/libstd/process.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1584,7 +1584,7 @@ mod tests {
15841584
= if cfg!(target_os = "windows") {
15851585
Command::new("cmd").args(&["/C", "mkdir ."]).output().unwrap()
15861586
} else {
1587-
Command::new("mkdir").arg(".").output().unwrap()
1587+
Command::new("mkdir").arg("./").output().unwrap()
15881588
};
15891589

15901590
assert!(status.code() == Some(1));

src/tools/build-manifest/src/main.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ static HOSTS: &'static [&'static str] = &[
4646

4747
static TARGETS: &'static [&'static str] = &[
4848
"aarch64-apple-ios",
49-
"aarch64-unknown-fuchsia",
5049
"aarch64-linux-android",
50+
"aarch64-unknown-cloudabi",
51+
"aarch64-unknown-fuchsia",
5152
"aarch64-unknown-linux-gnu",
5253
"aarch64-unknown-linux-musl",
5354
"arm-linux-androideabi",
@@ -58,6 +59,7 @@ static TARGETS: &'static [&'static str] = &[
5859
"armv5te-unknown-linux-gnueabi",
5960
"armv7-apple-ios",
6061
"armv7-linux-androideabi",
62+
"armv7-unknown-cloudabi-eabihf",
6163
"armv7-unknown-linux-gnueabihf",
6264
"armv7-unknown-linux-musleabihf",
6365
"armv7s-apple-ios",
@@ -69,6 +71,7 @@ static TARGETS: &'static [&'static str] = &[
6971
"i686-linux-android",
7072
"i686-pc-windows-gnu",
7173
"i686-pc-windows-msvc",
74+
"i686-unknown-cloudabi",
7275
"i686-unknown-freebsd",
7376
"i686-unknown-linux-gnu",
7477
"i686-unknown-linux-musl",
@@ -86,13 +89,14 @@ static TARGETS: &'static [&'static str] = &[
8689
"sparcv9-sun-solaris",
8790
"wasm32-unknown-emscripten",
8891
"wasm32-unknown-unknown",
89-
"x86_64-linux-android",
9092
"x86_64-apple-darwin",
9193
"x86_64-apple-ios",
94+
"x86_64-linux-android",
9295
"x86_64-pc-windows-gnu",
9396
"x86_64-pc-windows-msvc",
9497
"x86_64-rumprun-netbsd",
9598
"x86_64-sun-solaris",
99+
"x86_64-unknown-cloudabi",
96100
"x86_64-unknown-freebsd",
97101
"x86_64-unknown-fuchsia",
98102
"x86_64-unknown-linux-gnu",

0 commit comments

Comments
 (0)