Auto merge of #53354 - kennytm:rollup, r=kennytm
Rollup of 11 pull requests Successful merges: - #53112 (pretty print BTreeSet) - #53208 (Don't panic on std::env::vars() when env is null.) - #53226 (driver: set the syntax edition in phase 1) - #53229 (Make sure rlimit is only ever increased) - #53233 (targets: aarch64: Add bare-metal aarch64 target) - #53239 (rustc_codegen_llvm: Restore the closure env alloca hack for LLVM 5.) - #53246 (A few cleanups) - #53257 (Idiomatic improvements to IP method) - #53274 (Remove statics field from CodegenCx) - #53290 (Make LLVM emit assembly comments with -Z asm-comments) - #53317 (Mark prior failure to avoid ICE)
This commit is contained in:
commit
a5733050de
32 changed files with 486 additions and 229 deletions
50
src/test/debuginfo/pretty-std-collections.rs
Normal file
50
src/test/debuginfo/pretty-std-collections.rs
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// ignore-windows failing on win32 bot
|
||||
// ignore-freebsd: gdb package too new
|
||||
// ignore-android: FIXME(#10381)
|
||||
// compile-flags:-g
|
||||
// min-gdb-version 7.7
|
||||
// min-lldb-version: 310
|
||||
|
||||
// === GDB TESTS ===================================================================================
|
||||
|
||||
// gdb-command: run
|
||||
|
||||
// gdb-command: print btree_set
|
||||
// gdb-check:$1 = BTreeSet<i32>(len: 3) = {3, 5, 7}
|
||||
|
||||
// gdb-command: print vec_deque
|
||||
// gdb-check:$2 = VecDeque<i32>(len: 3, cap: 8) = {5, 3, 7}
|
||||
|
||||
#![allow(unused_variables)]
|
||||
use std::collections::BTreeSet;
|
||||
use std::collections::VecDeque;
|
||||
|
||||
|
||||
fn main() {
|
||||
|
||||
// BTreeSet
|
||||
let mut btree_set = BTreeSet::new();
|
||||
btree_set.insert(5);
|
||||
btree_set.insert(3);
|
||||
btree_set.insert(7);
|
||||
|
||||
// VecDeque
|
||||
let mut vec_deque = VecDeque::new();
|
||||
vec_deque.push_back(5);
|
||||
vec_deque.push_back(3);
|
||||
vec_deque.push_back(7);
|
||||
|
||||
zzz(); // #break
|
||||
}
|
||||
|
||||
fn zzz() { () }
|
||||
29
src/test/run-pass/env-null-vars.rs
Normal file
29
src/test/run-pass/env-null-vars.rs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// ignore-windows
|
||||
// ignore-wasm32-bare no libc to test ffi with
|
||||
|
||||
// issue-53200
|
||||
|
||||
#![feature(libc)]
|
||||
extern crate libc;
|
||||
|
||||
use std::env;
|
||||
|
||||
// FIXME: more platforms?
|
||||
#[cfg(target_os = "linux")]
|
||||
fn main() {
|
||||
unsafe { libc::clearenv(); }
|
||||
assert_eq!(env::vars().count(), 0);
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
fn main() {}
|
||||
24
src/test/rustdoc/async-fn.rs
Normal file
24
src/test/rustdoc/async-fn.rs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// edition:2018
|
||||
// compile-flags:-Z unstable-options
|
||||
|
||||
// FIXME: once `--edition` is stable in rustdoc, remove that `compile-flags` directive
|
||||
|
||||
#![feature(rust_2018_preview, async_await, futures_api)]
|
||||
|
||||
// @has async_fn/struct.S.html
|
||||
// @has - '//code' 'pub async fn f()'
|
||||
pub struct S;
|
||||
|
||||
impl S {
|
||||
pub async fn f() {}
|
||||
}
|
||||
28
src/test/ui/issue-53251.rs
Normal file
28
src/test/ui/issue-53251.rs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
struct S;
|
||||
|
||||
impl S {
|
||||
fn f() {}
|
||||
}
|
||||
|
||||
macro_rules! impl_add {
|
||||
($($n:ident)*) => {
|
||||
$(
|
||||
fn $n() {
|
||||
S::f::<i64>();
|
||||
//~^ ERROR too many type parameters provided
|
||||
}
|
||||
)*
|
||||
}
|
||||
}
|
||||
|
||||
impl_add!(a b);
|
||||
17
src/test/ui/issue-53251.stderr
Normal file
17
src/test/ui/issue-53251.stderr
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
error[E0601]: `main` function not found in crate `issue_53251`
|
||||
|
|
||||
= note: consider adding a `main` function to `$DIR/issue-53251.rs`
|
||||
|
||||
error[E0087]: too many type parameters provided: expected at most 0 type parameters, found 1 type parameter
|
||||
--> $DIR/issue-53251.rs:21:24
|
||||
|
|
||||
LL | S::f::<i64>();
|
||||
| ^^^ expected 0 type parameters
|
||||
...
|
||||
LL | impl_add!(a b);
|
||||
| --------------- in this macro invocation
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
Some errors occurred: E0087, E0601.
|
||||
For more information about an error, try `rustc --explain E0087`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue