mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
Rollup merge of #90837 - c410-f3r:testsssssss, r=petrochenkov
Move some tests to more reasonable directories - 9 cc #73494 r? `@petrochenkov`
This commit is contained in:
commit
12d5297418
@ -1,15 +0,0 @@
|
||||
// run-pass
|
||||
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
enum option<T> { some(T), none, }
|
||||
|
||||
struct R<T> {v: Vec<option<T>> }
|
||||
|
||||
fn f<T>() -> Vec<T> { return Vec::new(); }
|
||||
|
||||
pub fn main() { let mut r: R<isize> = R {v: Vec::new()}; r.v = f(); }
|
@ -1,15 +0,0 @@
|
||||
// run-pass
|
||||
|
||||
use std::ops::AddAssign;
|
||||
|
||||
struct Int(i32);
|
||||
|
||||
impl AddAssign<i32> for Int {
|
||||
fn add_assign(&mut self, _: i32) {
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let mut x = Int(0);
|
||||
x += 1;
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
// run-pass
|
||||
|
||||
#![allow(unused_assignments)]
|
||||
#![allow(unknown_lints)]
|
||||
|
||||
#![allow(dead_assignment)]
|
||||
|
||||
pub fn main() {
|
||||
let x : String = "hello".to_string();
|
||||
let _y : String = "there".to_string();
|
||||
let mut z = "thing".to_string();
|
||||
z = x;
|
||||
assert_eq!(z.as_bytes()[0], ('h' as u8));
|
||||
assert_eq!(z.as_bytes()[4], ('o' as u8));
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
use m::unexported;
|
||||
//~^ ERROR: is private
|
||||
|
||||
mod m {
|
||||
pub fn exported() { }
|
||||
|
||||
fn unexported() { }
|
||||
}
|
||||
|
||||
|
||||
fn main() { unexported(); }
|
@ -1,15 +0,0 @@
|
||||
error[E0603]: function `unexported` is private
|
||||
--> $DIR/export-import.rs:1:8
|
||||
|
|
||||
LL | use m::unexported;
|
||||
| ^^^^^^^^^^ private function
|
||||
|
|
||||
note: the function `unexported` is defined here
|
||||
--> $DIR/export-import.rs:7:5
|
||||
|
|
||||
LL | fn unexported() { }
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0603`.
|
@ -1,11 +0,0 @@
|
||||
// run-pass
|
||||
|
||||
mod foo {
|
||||
pub mod bar {
|
||||
pub fn y() { super::super::foo::x(); }
|
||||
}
|
||||
|
||||
pub fn x() { println!("x"); }
|
||||
}
|
||||
|
||||
pub fn main() { self::foo::bar::y(); }
|
@ -1,11 +0,0 @@
|
||||
// run-pass
|
||||
|
||||
pub mod foo {
|
||||
pub fn x() { ::bar::x(); }
|
||||
}
|
||||
|
||||
pub mod bar {
|
||||
pub fn x() { println!("x"); }
|
||||
}
|
||||
|
||||
pub fn main() { foo::x(); }
|
@ -1,11 +0,0 @@
|
||||
mod foo {
|
||||
pub fn x() { bar::x(); } //~ ERROR failed to resolve: use of undeclared crate or module `bar`
|
||||
}
|
||||
|
||||
mod bar {
|
||||
fn x() { println!("x"); }
|
||||
|
||||
pub fn y() { }
|
||||
}
|
||||
|
||||
fn main() { foo::x(); }
|
@ -1,9 +0,0 @@
|
||||
error[E0433]: failed to resolve: use of undeclared crate or module `bar`
|
||||
--> $DIR/export2.rs:2:18
|
||||
|
|
||||
LL | pub fn x() { bar::x(); }
|
||||
| ^^^ use of undeclared crate or module `bar`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0433`.
|
@ -1,4 +0,0 @@
|
||||
// run-pass
|
||||
#![allow(unused_braces)]
|
||||
|
||||
pub fn main() { let x: Box<_> = { Box::new(100) }; assert_eq!(*x, 100); }
|
@ -1,5 +1,5 @@
|
||||
warning: irrefutable `while let` pattern
|
||||
--> $DIR/while-let.rs:7:19
|
||||
--> $DIR/while-let-2.rs:7:19
|
||||
|
|
||||
LL | while let $p = $e $b
|
||||
| ^^^
|
||||
@ -15,7 +15,7 @@ LL | | });
|
||||
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
warning: irrefutable `while let` pattern
|
||||
--> $DIR/while-let.rs:7:19
|
||||
--> $DIR/while-let-2.rs:7:19
|
||||
|
|
||||
LL | while let $p = $e $b
|
||||
| ^^^
|
||||
@ -30,7 +30,7 @@ LL | | });
|
||||
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
warning: irrefutable `while let` pattern
|
||||
--> $DIR/while-let.rs:27:11
|
||||
--> $DIR/while-let-2.rs:27:11
|
||||
|
|
||||
LL | while let _a = 1 {
|
||||
| ^^^^^^^^^^
|
@ -1,20 +0,0 @@
|
||||
// run-pass
|
||||
|
||||
#![allow(dead_code)]
|
||||
// return -> return
|
||||
// mod -> module
|
||||
// match -> match
|
||||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
pub fn main() {
|
||||
}
|
||||
|
||||
mod foo {
|
||||
}
|
||||
|
||||
fn bar() -> isize {
|
||||
match 0 {
|
||||
_ => { 0 }
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user