mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 14:31:55 +00:00
tests: Move run-pass tests without naming conflicts to ui
This commit is contained in:
parent
ca9faa52f5
commit
9be35f82c1
1
src/test/run-pass/.gitattributes
vendored
1
src/test/run-pass/.gitattributes
vendored
@ -1 +0,0 @@
|
||||
lexer-crlf-line-endings-string-literal-doc-comment.rs -text
|
@ -1,8 +0,0 @@
|
||||
warning: unreachable block in `if` expression
|
||||
--> $DIR/if-ret.rs:6:24
|
||||
|
|
||||
LL | fn foo() { if (return) { } }
|
||||
| ^^^
|
||||
|
|
||||
= note: `#[warn(unreachable_code)]` on by default
|
||||
|
@ -1,8 +0,0 @@
|
||||
warning: unused attribute
|
||||
--> $DIR/macro-use-all-and-none.rs:5:1
|
||||
|
|
||||
LL | #[macro_use()]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(unused_attributes)]` on by default
|
||||
|
@ -1,42 +0,0 @@
|
||||
// run-pass
|
||||
#![feature(crate_in_paths)]
|
||||
#![allow(dead_code)]
|
||||
use crate::m::f;
|
||||
use crate as root;
|
||||
|
||||
mod m {
|
||||
pub fn f() -> u8 { 1 }
|
||||
pub fn g() -> u8 { 2 }
|
||||
pub fn h() -> u8 { 3 }
|
||||
|
||||
// OK, visibilities are implicitly absolute like imports
|
||||
pub(in crate::m) struct S;
|
||||
}
|
||||
|
||||
mod n {
|
||||
use crate::m::f;
|
||||
use crate as root;
|
||||
pub fn check() {
|
||||
assert_eq!(f(), 1);
|
||||
assert_eq!(crate::m::g(), 2);
|
||||
assert_eq!(root::m::h(), 3);
|
||||
}
|
||||
}
|
||||
|
||||
mod p {
|
||||
use {super::f, crate::m::g, self::root::m::h};
|
||||
use crate as root;
|
||||
pub fn check() {
|
||||
assert_eq!(f(), 1);
|
||||
assert_eq!(g(), 2);
|
||||
assert_eq!(h(), 3);
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
assert_eq!(f(), 1);
|
||||
assert_eq!(crate::m::g(), 2);
|
||||
assert_eq!(root::m::h(), 3);
|
||||
n::check();
|
||||
p::check();
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
warning: the feature `crate_in_paths` has been stable since 1.30.0 and no longer requires an attribute to enable
|
||||
--> $DIR/crate-path-absolute.rs:2:12
|
||||
|
|
||||
LL | #![feature(crate_in_paths)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(stable_features)]` on by default
|
||||
|
@ -1,15 +0,0 @@
|
||||
// run-pass
|
||||
#![feature(crate_in_paths)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![allow(dead_code)]
|
||||
mod m {
|
||||
pub struct Z;
|
||||
pub struct S1(crate (::m::Z)); // OK
|
||||
pub struct S2((crate ::m::Z)); // OK
|
||||
pub struct S3(crate ::m::Z); // OK
|
||||
pub struct S4(crate crate::m::Z); // OK
|
||||
}
|
||||
|
||||
fn main() {
|
||||
crate struct S; // OK (item in statement position)
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
warning: the feature `crate_in_paths` has been stable since 1.30.0 and no longer requires an attribute to enable
|
||||
--> $DIR/crate-path-visibility-ambiguity.rs:2:12
|
||||
|
|
||||
LL | #![feature(crate_in_paths)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(stable_features)]` on by default
|
||||
|
@ -1,7 +0,0 @@
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub struct S;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Z;
|
||||
|
||||
pub trait Tr<'a> {}
|
@ -1,25 +0,0 @@
|
||||
// run-pass
|
||||
#![allow(dead_code)]
|
||||
// aux-build:xcrate.rs
|
||||
// compile-flags:--extern xcrate
|
||||
// edition:2018
|
||||
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use xcrate::Z;
|
||||
|
||||
fn f() {
|
||||
use xcrate;
|
||||
use xcrate as ycrate;
|
||||
let s = xcrate::S;
|
||||
assert_eq!(format!("{:?}", s), "S");
|
||||
let z = ycrate::Z;
|
||||
assert_eq!(format!("{:?}", z), "Z");
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let s = ::xcrate::S;
|
||||
assert_eq!(format!("{:?}", s), "S");
|
||||
let z = Z;
|
||||
assert_eq!(format!("{:?}", z), "Z");
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
// run-pass
|
||||
// Check that `#[test]` works with extern-absolute-paths enabled.
|
||||
//
|
||||
// Regression test for #47075.
|
||||
|
||||
// edition:2018
|
||||
// compile-flags: --test
|
||||
|
||||
#[test]
|
||||
fn test() {}
|
@ -1,14 +0,0 @@
|
||||
// run-pass
|
||||
// edition:2018
|
||||
|
||||
// Tests that `core` and `std` are always available.
|
||||
use core::iter;
|
||||
use std::io;
|
||||
// FIXME(eddyb) Add a `meta` crate to the distribution.
|
||||
// use meta;
|
||||
|
||||
fn main() {
|
||||
for _ in iter::once(()) {
|
||||
io::stdout();
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
// run-pass
|
||||
// aux-build:lint-for-crate.rs
|
||||
// aux-build:lint-for-crate-rpass.rs
|
||||
// ignore-stage1
|
||||
// compile-flags: -D crate-not-okay
|
||||
|
||||
#![feature(plugin, custom_attribute, custom_inner_attributes, rustc_attrs)]
|
||||
|
||||
#![plugin(lint_for_crate)]
|
||||
#![plugin(lint_for_crate_rpass)]
|
||||
#![rustc_crate_okay]
|
||||
#![rustc_crate_blue]
|
||||
#![rustc_crate_red]
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user