Merge branch 'master' into drop
This commit is contained in:
commit
43cc32fbb2
3017 changed files with 7141 additions and 3254 deletions
|
|
@ -48,6 +48,16 @@ pub fn align64(i : i32) -> Align64 {
|
|||
a64
|
||||
}
|
||||
|
||||
// For issue 54028: make sure that we are specifying the correct alignment for fields of aligned
|
||||
// structs
|
||||
// CHECK-LABEL: @align64_load
|
||||
#[no_mangle]
|
||||
pub fn align64_load(a: Align64) -> i32 {
|
||||
// CHECK: [[FIELD:%.*]] = bitcast %Align64* %{{.*}} to i32*
|
||||
// CHECK: {{%.*}} = load i32, i32* [[FIELD]], align 64
|
||||
a.0
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @nested64
|
||||
#[no_mangle]
|
||||
pub fn nested64(a: Align64, b: i32, c: i32, d: i8) -> Nested64 {
|
||||
|
|
|
|||
|
|
@ -8,8 +8,9 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// ignore-arm
|
||||
// ignore-aarch64
|
||||
// Test that `extern "stdcall"` is properly translated.
|
||||
|
||||
// only-x86
|
||||
|
||||
// compile-flags: -C no-prepopulate-passes
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// NOTE Instantiating an empty enum is UB. This test may break in the future.
|
||||
|
||||
// LLDB can't handle zero-sized values
|
||||
// ignore-lldb
|
||||
|
||||
|
|
@ -27,11 +25,8 @@
|
|||
|
||||
#![allow(unused_variables)]
|
||||
#![feature(omit_gdb_pretty_printer_section)]
|
||||
#![feature(maybe_uninit)]
|
||||
#![omit_gdb_pretty_printer_section]
|
||||
|
||||
use std::mem::MaybeUninit;
|
||||
|
||||
enum ANilEnum {}
|
||||
enum AnotherNilEnum {}
|
||||
|
||||
|
|
@ -40,8 +35,8 @@ enum AnotherNilEnum {}
|
|||
// The error from gdbr is expected since nil enums are not supposed to exist.
|
||||
fn main() {
|
||||
unsafe {
|
||||
let first: ANilEnum = MaybeUninit::uninitialized().into_inner();
|
||||
let second: AnotherNilEnum = MaybeUninit::uninitialized().into_inner();
|
||||
let first: ANilEnum = ::std::mem::zeroed();
|
||||
let second: AnotherNilEnum = ::std::mem::zeroed();
|
||||
|
||||
zzz(); // #break
|
||||
}
|
||||
|
|
|
|||
17
src/test/pretty/issue_12590_a.rs
Normal file
17
src/test/pretty/issue_12590_a.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2012 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.
|
||||
|
||||
// pp-exact
|
||||
|
||||
// The next line should not be expanded
|
||||
|
||||
mod issue_12590_b;
|
||||
|
||||
fn main() { }
|
||||
14
src/test/pretty/issue_12590_b.rs
Normal file
14
src/test/pretty/issue_12590_b.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright 2012 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.
|
||||
|
||||
// Second part of two file test
|
||||
fn b() { }
|
||||
|
||||
fn main() { }
|
||||
|
|
@ -1,4 +1,10 @@
|
|||
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||
#![feature(prelude_import)]
|
||||
#![no_std]
|
||||
#[prelude_import]
|
||||
use ::std::prelude::v1::*;
|
||||
#[macro_use]
|
||||
extern crate std;
|
||||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -8,16 +14,15 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -O
|
||||
#![crate_type="lib"]
|
||||
#![feature(maybe_uninit)]
|
||||
// pretty-compare-only
|
||||
// pretty-mode:expanded
|
||||
// pp-exact:issue_12590_c.pp
|
||||
|
||||
use std::mem::MaybeUninit;
|
||||
// The next line should be expanded
|
||||
|
||||
// Boxing a `MaybeUninit` value should not copy junk from the stack
|
||||
#[no_mangle]
|
||||
pub fn box_uninitialized() -> Box<MaybeUninit<usize>> {
|
||||
// CHECK-LABEL: @box_uninitialized
|
||||
// CHECK-NOT: store
|
||||
Box::new(MaybeUninit::uninitialized())
|
||||
mod issue_12590_b {
|
||||
|
||||
fn b() { }
|
||||
fn main() { }
|
||||
}
|
||||
fn main() { }
|
||||
19
src/test/pretty/issue_12590_c.rs
Normal file
19
src/test/pretty/issue_12590_c.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2012 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.
|
||||
|
||||
// pretty-compare-only
|
||||
// pretty-mode:expanded
|
||||
// pp-exact:issue_12590_c.pp
|
||||
|
||||
// The next line should be expanded
|
||||
|
||||
mod issue_12590_b;
|
||||
|
||||
fn main() { }
|
||||
31
src/test/run-make-fulldeps/emit-stack-sizes/Makefile
Normal file
31
src/test/run-make-fulldeps/emit-stack-sizes/Makefile
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
-include ../tools.mk
|
||||
|
||||
# This feature only works when the output object format is ELF so we ignore
|
||||
# macOS and Windows
|
||||
ifdef IS_WINDOWS
|
||||
# Do nothing on Windows.
|
||||
all:
|
||||
exit 0
|
||||
else ifneq (,$(filter $(TARGET),i686-apple-darwin x86_64-apple-darwin))
|
||||
# Do nothing on macOS.
|
||||
all:
|
||||
exit 0
|
||||
else
|
||||
# check that the .stack_sizes section is generated
|
||||
# this test requires LLVM >= 6.0.0
|
||||
vers = $(shell $(RUSTC) -Vv)
|
||||
ifneq (,$(findstring LLVM version: 3,$(vers)))
|
||||
all:
|
||||
exit 0
|
||||
else ifneq (,$(findstring LLVM version: 4,$(vers)))
|
||||
all:
|
||||
exit 0
|
||||
else ifneq (,$(findstring LLVM version: 5,$(vers)))
|
||||
all:
|
||||
exit 0
|
||||
else
|
||||
all:
|
||||
$(RUSTC) -C opt-level=3 -Z emit-stack-sizes --emit=obj foo.rs
|
||||
size -A $(TMPDIR)/foo.o | $(CGREP) .stack_sizes
|
||||
endif
|
||||
endif
|
||||
13
src/test/run-make-fulldeps/emit-stack-sizes/foo.rs
Normal file
13
src/test/run-make-fulldeps/emit-stack-sizes/foo.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// 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.
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
pub fn foo() {}
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(stable_features)]
|
||||
|
||||
#![feature(const_indexing)]
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
#![allow(dead_code)]
|
||||
|
||||
// Checks that mutable static items can have mutable slices
|
||||
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
#![allow(unused_assignments)]
|
||||
|
||||
pub fn main() {
|
||||
let x : &[isize] = &[1,2,3,4,5];
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
#![allow(unused_variables)]
|
||||
|
||||
// Test slicing sugar.
|
||||
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
#![allow(unused_mut)]
|
||||
|
||||
|
||||
pub fn main() {
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
#![allow(unused_variables)]
|
||||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
#![allow(unused_variables)]
|
||||
|
||||
#![feature(slice_patterns)]
|
||||
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
#![allow(dead_code)]
|
||||
|
||||
struct Foo;
|
||||
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
#![allow(unused_variables)]
|
||||
// aux-build:associated-types-cc-lib.rs
|
||||
|
||||
// Test that we are able to reference cross-crate traits that employ
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue