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

[WIP] migrate more of src/test/run-pass to src/test/ui/run-pass #54139

Closed
  •  
  •  
  •  
1 change: 0 additions & 1 deletion src/test/run-pass/.gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
lexer-crlf-line-endings-string-literal-doc-comment.rs -text
issue-16278.rs -text
2 changes: 2 additions & 0 deletions src/test/run-pass/lib-defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

// ignore-wasm32-bare no libc to test ffi with

// compile-flags: -lrust_test_helpers
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/rustc-rust-log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

// rustc-env:RUST_LOG=debug

fn main() {}
1 change: 1 addition & 0 deletions src/test/ui/run-pass/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lexer-crlf-line-endings-string-literal-doc-comment.rs -text
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.


// run-pass
#![allow(non_camel_case_types)]

// Regression test for issue #374

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass
#![allow(non_camel_case_types)]

#![feature(box_syntax)]

struct pair<A,B> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass
#![allow(non_camel_case_types)]


// pretty-expanded FIXME #23616

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass
#![allow(stable_features)]

#![feature(allocator_api, nonnull)]

use std::alloc::{Alloc, Global, Layout, handle_alloc_error};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

fn main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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!(Some(Box::new(())).is_some());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

// alloc::heap::reallocate test.
//
// Ideally this would be revised to use no_std, but for now it serves
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass


fn f() -> isize { { return 3; } }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass


fn main() {
assert_eq!(3 as usize * 3, 9);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
// ignore-emscripten no asm

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

// revisions: ast mir
//[mir]compile-flags: -Z borrowck=mir

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

#![feature(asm)]

#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

#![feature(asm)]

#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

// revisions ast mir
//[mir]compile-flags: -Z borrowck=mir

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

fn main() {
assert_eq!(1, 1,);
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

fn main() {
assert!(r#"☃\backslash"#.contains("\\"));
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

fn main() {
assert_ne!(1, 2,);
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

// Issue 483 - Assignment expressions result in nil

fn test_assign() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

fn that_odd_parse(c: bool, n: usize) -> u32 {
let x = 2;
let a = [1, 2, 3, 4];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

// The main point of this test is to ensure that we can parse and resolve
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

// edition:2018

#![feature(arbitrary_self_types, async_await, await_macro, futures_api, pin)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass
#![allow(stable_features)]

#![feature(atomic_access)]
use std::sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT};
use std::sync::atomic::Ordering::*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass
#![allow(stable_features)]
#![feature(extended_compare_and_swap)]
use std::sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT};
use std::sync::atomic::Ordering::*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass
#![allow(deprecated)]

// ignore-cloudabi no process support
// ignore-emscripten no threads support

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(custom_attribute, test)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(custom_attribute, test)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass


#![feature(main)]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(main)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
// <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.

// run-pass
#![allow(unknown_lints)]
// pretty-expanded FIXME #23616

#![allow(unused_attribute)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

// This test ensures we can attach attributes to the formals in all
// places where generic parameter lists occur, assuming appropriate
// feature gates are enabled.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
#![feature(rust1)]
pub fn main() { }
// ignore-license
// run-pass
Original file line number Diff line number Diff line change
Expand Up @@ -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(start)]
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/attr.rs → src/test/ui/run-pass/attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(main)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

// aux-build:augmented_assignments.rs

extern crate augmented_assignments;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

use std::ops::AddAssign;

struct Int(i32);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

#![deny(unused_assignments)]

use std::mem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

#[derive(Debug)]
struct Pair<T, U> { a: T, b: U }
struct Triple { x: isize, y: isize, z: isize }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

macro_rules! auto {
() => (struct S;)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass



fn f<T>(x: Vec<T>) -> T { return x.into_iter().next().unwrap(); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// run-pass

// We disable tail merging here because it can't preserve debuginfo and thus
// potentially breaks the backtraces. Also, subtle changes can decide whether
// tail merging succeeds, so the test might work today but fail tomorrow due to a
Expand Down
Loading