Add `// run-pass` annotations to all the tests under `ui/run-pass/`.

(I may have accidentally added it to some auxilliary crates as well;
my emacs-macro-based methodology was pretty crude.)
This commit is contained in:
Felix S. Klock II 2018-08-30 14:18:55 +02:00
parent 7834c22848
commit 0909e0bf70
2370 changed files with 2466 additions and 15 deletions

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
use std::cell::Cell;
#[derive(Debug)]

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
#![feature(const_indexing)]
fn main() {

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test that we cleanup a fixed size Box<[D; k]> properly when D has a
// destructor.

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test that we cleanup dynamic sized Box<[D]> properly when D has a
// destructor.

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// issues #10618 and #16382
// pretty-expanded FIXME #23616

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Checks that mutable static items can have mutable slices

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Check that the various ways of getting to a reference to a vec (both sized
// and unsized) work properly.

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Ensure that we can copy out of a fixed-size array.
//
// (Compare with compile-fail/move-out-of-array-1.rs)

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Ensure that we can do a destructuring bind of a fixed-size array,
// even when the element type has a destructor.

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// pretty-expanded FIXME #23616
#![allow(unused_mut)]

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
pub fn main() {
let x = "hello";

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
#![allow(dead_assignment)]
pub fn main() {

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
pub fn main() {
let arr = [1,2,3];

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
use std::mem::size_of;

View File

@ -8,5 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
fn f(_a: Vec<isize> ) { }
pub fn main() { f(vec![1, 2, 3, 4, 5]); }

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
fn test1() {
let mut ints = [0; 32];

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
fn grow(v: &mut Vec<isize> ) {
v.push(1);
}

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test that using the `vec!` macro nested within itself works
fn main() {

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test that using the `vec!` macro nested within itself works
// when the contents implement Drop

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// ignore-emscripten no threads support
// Test that using the `vec!` macro nested within itself works when

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
static FOO: [isize; 3] = [1, 2, 3];
pub fn main() {

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
trait sum {
fn sum_(self) -> isize;

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
pub fn main() {
let x = [ [true]; 512 ];
let y = [ 0; 1 ];

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
#[derive(Debug)]
struct Foo(Box<[u8]>);

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test slicing expressions on slices and Vecs.

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// compile-flags: -C debug-assertions
#![feature(iter_to_slice)]

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// ignore-emscripten no threads support
// Test that if a slicing expr[..] fails, the correct cleanups happen.

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// ignore-emscripten no threads support
// Test that if a slicing expr[..] fails, the correct cleanups happen.

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test slicing sugar.
extern crate core;

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test binary_search_by_key lifetime. Issue #34683
#[derive(Debug)]

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test that vec is now covariant in its argument type.
#![allow(dead_code)]

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
use std::vec;
pub fn main() {

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
#![feature(box_syntax)]
pub fn main() {

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
use std::mem::size_of;

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
pub fn main() {

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
pub fn main() {
let mut later: Vec<isize> ;

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// ignore-emscripten no no_std executables
#![feature(lang_items, start, libc, alloc)]

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
pub fn main() {

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
fn one() -> i32 { 1 }

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// pretty-expanded FIXME #23616
macro_rules! vec [

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
pub fn main() {

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
pub fn main() {
let x = [1, 2, 3];
match x {

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
#![feature(slice_patterns)]
fn a() {

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
#![feature(slice_patterns)]
use std::fmt::Debug;

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
#![feature(slice_patterns)]
pub fn main() {

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
#![feature(slice_patterns)]
fn a() {

View File

@ -8,4 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
pub fn main() { let mut v = vec![1, 2, 3]; v.push(1); }

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// pretty-expanded FIXME #23616
pub fn main() { let _a = [0; 1 as usize]; }

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
use std::cell::Cell;
// Make sure that destructors get run on slice literals

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
pub fn main() {
let v = vec![1,2,3,4,5];

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
#![feature(slice_patterns)]
struct Foo {

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
pub fn main() {
assert_eq!(format!("{:?}", vec![0, 1]), "[0, 1]".to_string());

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
pub fn main() {

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
use std::cell::Cell;
#[derive(Debug)]

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
use std::cell::Cell;
#[derive(Debug)]

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// pretty-expanded FIXME #23616
#![feature(box_syntax)]

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
trait Foo {
const NUM: usize;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// aux-build:associated-const-cc-lib.rs

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// aux-build:associated-const-cc-lib.rs

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// aux-build:associated-const-cc-lib.rs

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
struct Foo;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
struct Foo;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
#![deny(dead_code)]

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// aux-build:empty-struct.rs

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
trait Lattice {
const BOTTOM: Self;
}

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
trait Foo {
const ID: i32 = 2;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
mod bar1 {
pub use self::bar2::Foo;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
struct Foo;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
struct MyType;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
trait MyInt {
const ONE: Self;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
trait Foo {
const X: i32;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
trait Foo {
const ID: i32;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
trait Foo {
const ID: i32 = 1;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// The main purpose of this test is to ensure that different impls of the same
// trait can refer to each other without setting off the static recursion check

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
trait Foo {
const ID: i32;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
trait Foo {
type T;
}

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test a case where the associated type binding (to `bool`, in this
// case) is derived from the trait definition. Issue #21636.

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test equality constraints on associated types in a where clause.
// pretty-expanded FIXME #23616

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test equality constrai32s on associated types in a where clause.

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// aux-build:associated-types-cc-lib.rs
// Test that we are able to reference cross-crate traits that employ

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test that we evaluate projection predicates to winnow out
// candidates during trait selection and method resolution (#20296).
// If we don't properly winnow out candidates based on the output type

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
trait SignedUnsigned {
type Opposite;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
#![feature(box_syntax)]
fn pairwise_sub(mut t: Box<DoubleEndedIterator<Item=isize>>) -> isize {

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Check that we do not report ambiguities when equivalent predicates
// (modulo bound lifetime names) appears in the environment
// twice. Issue #21965.

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Check that we do not report ambiguities when the same predicate
// appears in the environment twice. Issue #21965.

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test associated types appearing in struct-like enum variants.

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test associated types appearing in tuple-like enum variants.

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test equality constraints on associated types inside of an object type
// pretty-expanded FIXME #23616

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test how resolving a projection interacts with inference. In this
// case, we were eagerly unifying the type variable for the iterator
// type with `I` from the where clause, ignoring the in-scope `impl`

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test the case where we resolve `C::Result` and the trait bound
// itself includes a `Self::Item` shorthand.
//

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
trait Get {
type Value;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
trait Get {
type Value;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
trait Get {
type Value;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
trait Get {
type Value;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test references to `Self::Item` in the trait. Issue #20220.

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test that we are able to have an impl that defines an associated type
// before the actual trait.

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Regression test for #21212: an overflow occurred during trait
// checking where normalizing `Self::Input` led to normalizing the
// where clauses in the environment which in turn required normalizing

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
fn pairwise_sub<T:DoubleEndedIterator<Item=isize>>(mut t: T) -> isize {
let mut result = 0;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test that methods whose impl-trait-ref contains associated types
// are supported.

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Test that we can resolve nested projection types. Issue #20666.
// pretty-expanded FIXME #23616

Some files were not shown because too many files have changed in this diff Show More