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 11 pull requests #82359

Merged
merged 29 commits into from
Feb 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6d2247e
BTreeMap/BTreeSet: separate off code supporting tests
ssomers Jan 23, 2021
3e1d602
BTreeMap: share panicky test code & test panic during clear, clone
ssomers Jan 23, 2021
c5b43aa
Update RELEASES.md 1.50 to include methods stabilized in #79342
CDirkx Feb 15, 2021
f52caa7
Do not delete bootstrap.exe on Windows during clean
rylev Feb 16, 2021
e18c79a
Work around various issues cleaning up bootstrap on Windows
rylev Feb 16, 2021
5b0ed02
Delete symlinked directories
rylev Feb 16, 2021
fcf6e6e
Add check for ES5 in CI
GuillaumeGomez Feb 15, 2021
8ae05df
try-back-block-type test: Use TryFromSliceError for From test
ijackson Feb 17, 2021
2380090
Remove unsafe impl Send for CompletedTest & TestResult
tmiasko Feb 19, 2021
f10fbbb
added aarch64_apple_ios_sim as a rustc target
Feb 4, 2021
9b4e612
Document BinaryHeap unsafe functions
SkiFire13 Feb 3, 2021
3ec1a28
Add FIXME for safety comments that are invalid when T is a ZST
SkiFire13 Feb 12, 2021
8d6ad11
iOS simulator: pick the target based on the environment variable
badboy Feb 14, 2021
211d49c
parallelize x.py test tidy
the8472 Feb 6, 2021
6dc948e
limit rustfmt parallelism by taking -j into account
the8472 Feb 20, 2021
c071970
remove redundant box wrapper
the8472 Feb 12, 2021
8ead8f5
Add A-diagnostics bug report template
estebank Feb 17, 2021
88753ce
test: Print test name only once on timeout
tmiasko Feb 21, 2021
3219a10
Rollup merge of #81300 - ssomers:btree_cleanup_leak_tests, r=Mark-Sim…
JohnTitor Feb 21, 2021
56ae3fb
Rollup merge of #81706 - SkiFire13:document-binaryheap-unsafe, r=Mark…
JohnTitor Feb 21, 2021
4c1f195
Rollup merge of #81833 - the8472:parallel-bootstrap-rustfmt, r=Mark-S…
JohnTitor Feb 21, 2021
882fd69
Rollup merge of #81966 - deg4uss3r:degausser/aarch64_apple_ios_sim, r…
JohnTitor Feb 21, 2021
0fd78ed
Rollup merge of #82154 - CDirkx:ip-changelog, r=Mark-Simulacrum
JohnTitor Feb 21, 2021
13a3c6e
Rollup merge of #82177 - rylev:no-delete-bootstrap-windows, r=Mark-Si…
JohnTitor Feb 21, 2021
2a57acf
Rollup merge of #82181 - GuillaumeGomez:es5-checks-ci, r=Mark-Simulacrum
JohnTitor Feb 21, 2021
b9040c7
Rollup merge of #82229 - estebank:issue-templace, r=Mark-Simulacrum
JohnTitor Feb 21, 2021
2793859
Rollup merge of #82233 - ijackson:try-block-type-test, r=Mark-Simulacrum
JohnTitor Feb 21, 2021
01e1d2d
Rollup merge of #82302 - tmiasko:test-unsafe-send, r=Mark-Simulacrum
JohnTitor Feb 21, 2021
d7fb4de
Rollup merge of #82349 - tmiasko:pretty-test-timeout, r=Mark-Simulacrum
JohnTitor Feb 21, 2021
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
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/diagnostics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Diagnostic issue
about: Create a bug report or feature request for a change to `rustc`'s error output
labels: A-diagnostics, T-compiler
---
<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur.
-->

Given the following code: <!-- Please provide a link to play.rust-lang.org -->

```rust
<code>
```

The current output is:

```
<rustc output>
```

<!-- The following is not always necessary. -->
Ideally the output should look like:

```
<proposed output>
```

<!--
If the problem is not self-explanatory, please provide a rationale for the
change.
-->

<!--
If dramatically different output is caused by small changes, consider also
adding them here.

If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions. The output might also be
different depending on the Edition.
-->
34 changes: 34 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,23 @@ The following previously stable methods are now `const`.

- [`IpAddr::is_ipv4`]
- [`IpAddr::is_ipv6`]
- [`IpAddr::is_unspecified`]
- [`IpAddr::is_loopback`]
- [`IpAddr::is_multicast`]
- [`Ipv4Addr::octets`]
- [`Ipv4Addr::is_loopback`]
- [`Ipv4Addr::is_private`]
- [`Ipv4Addr::is_link_local`]
- [`Ipv4Addr::is_multicast`]
- [`Ipv4Addr::is_broadcast`]
- [`Ipv4Addr::is_documentation`]
- [`Ipv4Addr::to_ipv6_compatible`]
- [`Ipv4Addr::to_ipv6_mapped`]
- [`Ipv6Addr::segments`]
- [`Ipv6Addr::is_unspecified`]
- [`Ipv6Addr::is_loopback`]
- [`Ipv6Addr::is_multicast`]
- [`Ipv6Addr::to_ipv4`]
- [`Layout::size`]
- [`Layout::align`]
- [`Layout::from_size_align`]
Expand Down Expand Up @@ -104,6 +121,23 @@ Compatibility Notes
[cargo/8725]: https://github.com/rust-lang/cargo/pull/8725
[`IpAddr::is_ipv4`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_ipv4
[`IpAddr::is_ipv6`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_ipv6
[`IpAddr::is_unspecified`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_unspecified
[`IpAddr::is_loopback`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_loopback
[`IpAddr::is_multicast`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_multicast
[`Ipv4Addr::octets`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.octets
[`Ipv4Addr::is_loopback`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_loopback
[`Ipv4Addr::is_private`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_private
[`Ipv4Addr::is_link_local`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_link_local
[`Ipv4Addr::is_multicast`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_multicast
[`Ipv4Addr::is_broadcast`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_broadcast
[`Ipv4Addr::is_documentation`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_documentation
[`Ipv4Addr::to_ipv6_compatible`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.to_ipv6_compatible
[`Ipv4Addr::to_ipv6_mapped`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.to_ipv6_mapped
[`Ipv6Addr::segments`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.segments
[`Ipv6Addr::is_unspecified`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.is_unspecified
[`Ipv6Addr::is_loopback`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.is_loopback
[`Ipv6Addr::is_multicast`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.is_multicast
[`Ipv6Addr::to_ipv4`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.to_ipv4
[`Layout::align`]: https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.align
[`Layout::from_size_align`]: https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.from_size_align
[`Layout::size`]: https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.size
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_codegen_ssa/src/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2193,6 +2193,7 @@ fn add_apple_sdk(cmd: &mut dyn Linker, sess: &Session, flavor: LinkerFlavor) {
("x86_64", "tvos") => "appletvsimulator",
("arm", "ios") => "iphoneos",
("aarch64", "ios") if llvm_target.contains("macabi") => "macosx",
("aarch64", "ios") if llvm_target.contains("sim") => "iphonesimulator",
("aarch64", "ios") => "iphoneos",
("x86", "ios") => "iphonesimulator",
("x86_64", "ios") if llvm_target.contains("macabi") => "macosx",
Expand Down
39 changes: 39 additions & 0 deletions compiler/rustc_target/src/spec/aarch64_apple_ios_sim.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
use super::apple_sdk_base::{opts, Arch};
use crate::spec::{Target, TargetOptions};

pub fn target() -> Target {
let base = opts("ios", Arch::Arm64_sim);

// Clang automatically chooses a more specific target based on
// IPHONEOS_DEPLOYMENT_TARGET.
// This is required for the simulator target to pick the right
// MACH-O commands, so we do too.
let arch = "arm64";
let llvm_target = super::apple_base::ios_sim_llvm_target(arch);

Target {
llvm_target: llvm_target,
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
options: TargetOptions {
features: "+neon,+fp-armv8,+apple-a7".to_string(),
eliminate_frame_pointer: false,
max_atomic_width: Some(128),
unsupported_abis: super::arm_base::unsupported_abis(),
forces_embed_bitcode: true,
// Taken from a clang build on Xcode 11.4.1.
// These arguments are not actually invoked - they just have
// to look right to pass App Store validation.
bitcode_llvm_cmdline: "-triple\0\
arm64-apple-ios14.0-simulator\0\
-emit-obj\0\
-disable-llvm-passes\0\
-target-abi\0\
darwinpcs\0\
-Os\0"
.to_string(),
..base
},
}
}
21 changes: 16 additions & 5 deletions compiler/rustc_target/src/spec/apple_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,16 @@ pub fn opts(os: &str) -> TargetOptions {
}
}

fn macos_deployment_target() -> (u32, u32) {
let deployment_target = env::var("MACOSX_DEPLOYMENT_TARGET").ok();
let version = deployment_target
fn deployment_target(var_name: &str) -> Option<(u32, u32)> {
let deployment_target = env::var(var_name).ok();
deployment_target
.as_ref()
.and_then(|s| s.split_once('.'))
.and_then(|(a, b)| a.parse::<u32>().and_then(|a| b.parse::<u32>().map(|b| (a, b))).ok());
.and_then(|(a, b)| a.parse::<u32>().and_then(|a| b.parse::<u32>().map(|b| (a, b))).ok())
}

version.unwrap_or((10, 7))
fn macos_deployment_target() -> (u32, u32) {
deployment_target("MACOSX_DEPLOYMENT_TARGET").unwrap_or((10, 7))
}

pub fn macos_llvm_target(arch: &str) -> String {
Expand All @@ -84,3 +86,12 @@ pub fn macos_link_env_remove() -> Vec<String> {
env_remove.push("IPHONEOS_DEPLOYMENT_TARGET".to_string());
env_remove
}

fn ios_deployment_target() -> (u32, u32) {
deployment_target("IPHONEOS_DEPLOYMENT_TARGET").unwrap_or((7, 0))
}

pub fn ios_sim_llvm_target(arch: &str) -> String {
let (major, minor) = ios_deployment_target();
format!("{}-apple-ios{}.{}.0-simulator", arch, major, minor)
}
6 changes: 5 additions & 1 deletion compiler/rustc_target/src/spec/apple_sdk_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub enum Arch {
X86_64,
X86_64_macabi,
Arm64_macabi,
Arm64_sim,
}

fn target_cpu(arch: Arch) -> String {
Expand All @@ -22,13 +23,16 @@ fn target_cpu(arch: Arch) -> String {
X86_64 => "core2",
X86_64_macabi => "core2",
Arm64_macabi => "apple-a12",
Arm64_sim => "apple-a12",
}
.to_string()
}

fn link_env_remove(arch: Arch) -> Vec<String> {
match arch {
Armv7 | Armv7s | Arm64 | I386 | X86_64 => vec!["MACOSX_DEPLOYMENT_TARGET".to_string()],
Armv7 | Armv7s | Arm64 | I386 | X86_64 | Arm64_sim => {
vec!["MACOSX_DEPLOYMENT_TARGET".to_string()]
}
X86_64_macabi | Arm64_macabi => vec!["IPHONEOS_DEPLOYMENT_TARGET".to_string()],
}
}
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,7 @@ supported_targets! {
("armv7s-apple-ios", armv7s_apple_ios),
("x86_64-apple-ios-macabi", x86_64_apple_ios_macabi),
("aarch64-apple-ios-macabi", aarch64_apple_ios_macabi),
("aarch64-apple-ios-sim", aarch64_apple_ios_sim),
("aarch64-apple-tvos", aarch64_apple_tvos),
("x86_64-apple-tvos", x86_64_apple_tvos),

Expand Down
Loading