diff options
| author | Caio <c410.f3r@gmail.com> | 2021-09-15 14:03:27 -0300 |
|---|---|---|
| committer | Caio <c410.f3r@gmail.com> | 2021-09-15 14:03:27 -0300 |
| commit | 1b0186e9ecdaa6fd00f1beea7d877b5a4fbd762d (patch) | |
| tree | b7ee76eff04de2e2b50d74c71a7c87bc0c6f4f36 /src/test/ui/issues | |
| parent | 8c2b6ea37d7719a0370bd404030eef9702c1752c (diff) | |
| download | rust-1b0186e9ecdaa6fd00f1beea7d877b5a4fbd762d.tar.gz rust-1b0186e9ecdaa6fd00f1beea7d877b5a4fbd762d.zip | |
Move some tests to more reasonable directories
Diffstat (limited to 'src/test/ui/issues')
39 files changed, 0 insertions, 1022 deletions
diff --git a/src/test/ui/issues/issue-19883.rs b/src/test/ui/issues/issue-19883.rs deleted file mode 100644 index 5cf422043a5..00000000000 --- a/src/test/ui/issues/issue-19883.rs +++ /dev/null @@ -1,16 +0,0 @@ -trait From<Src> { - type Output; - - fn from(src: Src) -> <Self as From<Src>>::Output; -} - -trait To: Sized { - fn to<Dst: From<Self>>(self) -> - <Dst as From<Self>>::Dst - //~^ ERROR cannot find associated type `Dst` in trait `From` - { - From::from(self) - } -} - -fn main() {} diff --git a/src/test/ui/issues/issue-19883.stderr b/src/test/ui/issues/issue-19883.stderr deleted file mode 100644 index bd6a86b7420..00000000000 --- a/src/test/ui/issues/issue-19883.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0576]: cannot find associated type `Dst` in trait `From` - --> $DIR/issue-19883.rs:9:30 - | -LL | type Output; - | ------------ associated type `Output` defined here -... -LL | <Dst as From<Self>>::Dst - | ^^^ - | | - | not found in `From` - | help: maybe you meant this associated type: `Output` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0576`. diff --git a/src/test/ui/issues/issue-20692.rs b/src/test/ui/issues/issue-20692.rs deleted file mode 100644 index 1cb2d8c7302..00000000000 --- a/src/test/ui/issues/issue-20692.rs +++ /dev/null @@ -1,11 +0,0 @@ -trait Array: Sized + Copy {} - -fn f<T: Array>(x: &T) { - let _ = x - //~^ ERROR `Array` cannot be made into an object - as - &dyn Array; - //~^ ERROR `Array` cannot be made into an object -} - -fn main() {} diff --git a/src/test/ui/issues/issue-20692.stderr b/src/test/ui/issues/issue-20692.stderr deleted file mode 100644 index 1d7f252e556..00000000000 --- a/src/test/ui/issues/issue-20692.stderr +++ /dev/null @@ -1,35 +0,0 @@ -error[E0038]: the trait `Array` cannot be made into an object - --> $DIR/issue-20692.rs:7:5 - | -LL | &dyn Array; - | ^^^^^^^^^^ `Array` cannot be made into an object - | -note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety> - --> $DIR/issue-20692.rs:1:14 - | -LL | trait Array: Sized + Copy {} - | ----- ^^^^^ ^^^^ ...because it requires `Self: Sized` - | | | - | | ...because it requires `Self: Sized` - | this trait cannot be made into an object... - -error[E0038]: the trait `Array` cannot be made into an object - --> $DIR/issue-20692.rs:4:13 - | -LL | let _ = x - | ^ `Array` cannot be made into an object - | -note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety> - --> $DIR/issue-20692.rs:1:14 - | -LL | trait Array: Sized + Copy {} - | ----- ^^^^^ ^^^^ ...because it requires `Self: Sized` - | | | - | | ...because it requires `Self: Sized` - | this trait cannot be made into an object... - = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Array>` for `&T` - = note: required by cast to type `&dyn Array` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0038`. diff --git a/src/test/ui/issues/issue-21363.rs b/src/test/ui/issues/issue-21363.rs deleted file mode 100644 index acc28cb430b..00000000000 --- a/src/test/ui/issues/issue-21363.rs +++ /dev/null @@ -1,15 +0,0 @@ -// check-pass -// pretty-expanded FIXME #23616 - -#![no_implicit_prelude] - -trait Iterator { - type Item; - fn dummy(&self) { } -} - -impl<'a, T> Iterator for &'a mut (dyn Iterator<Item=T> + 'a) { - type Item = T; -} - -fn main() {} diff --git a/src/test/ui/issues/issue-23825.rs b/src/test/ui/issues/issue-23825.rs deleted file mode 100644 index a9f0095d2e2..00000000000 --- a/src/test/ui/issues/issue-23825.rs +++ /dev/null @@ -1,21 +0,0 @@ -// run-pass -trait Stringify { - fn to_string(&self) -> String; -} - -impl Stringify for u32 { - fn to_string(&self) -> String { format!("u32: {}", *self) } -} - -impl Stringify for f32 { - fn to_string(&self) -> String { format!("f32: {}", *self) } -} - -fn print<T: Stringify>(x: T) -> String { - x.to_string() -} - -fn main() { - assert_eq!(&print(5), "u32: 5"); - assert_eq!(&print(5.0), "f32: 5"); -} diff --git a/src/test/ui/issues/issue-23833.rs b/src/test/ui/issues/issue-23833.rs deleted file mode 100644 index d4128fa54e3..00000000000 --- a/src/test/ui/issues/issue-23833.rs +++ /dev/null @@ -1,15 +0,0 @@ -// run-pass -#![allow(unused_imports)] -use std::fmt; - -const A_I8_T - : [u32; (i8::MAX as i8 - 1i8) as usize] - = [0; (i8::MAX as usize) - 1]; - -fn main() { - foo(&A_I8_T[..]); -} - -fn foo<T:fmt::Debug>(x: T) { - println!("{:?}", x); -} diff --git a/src/test/ui/issues/issue-33498.rs b/src/test/ui/issues/issue-33498.rs deleted file mode 100644 index 9c8a97e7e6b..00000000000 --- a/src/test/ui/issues/issue-33498.rs +++ /dev/null @@ -1,11 +0,0 @@ -// run-pass -#![allow(unused_variables)] -pub fn main() { - let x = (0, 2); - - match x { - (0, ref y) => {} - (y, 0) => {} - _ => (), - } -} diff --git a/src/test/ui/issues/issue-34194.rs b/src/test/ui/issues/issue-34194.rs deleted file mode 100644 index 6dce556e9e3..00000000000 --- a/src/test/ui/issues/issue-34194.rs +++ /dev/null @@ -1,11 +0,0 @@ -// build-pass -#![allow(dead_code)] - -struct A { - a: &'static (), -} - -static B: &'static A = &A { a: &() }; -static C: &'static A = &B; - -fn main() {} diff --git a/src/test/ui/issues/issue-34784.rs b/src/test/ui/issues/issue-34784.rs deleted file mode 100644 index 98d943470a7..00000000000 --- a/src/test/ui/issues/issue-34784.rs +++ /dev/null @@ -1,21 +0,0 @@ -// run-pass - -#![warn(pointer_structural_match)] -#![allow(dead_code)] -const C: *const u8 = &0; - -fn foo(x: *const u8) { - match x { - C => {} - _ => {} - } -} - -const D: *const [u8; 4] = b"abcd"; - -fn main() { - match D { - D => {} - _ => {} - } -} diff --git a/src/test/ui/issues/issue-35376.rs b/src/test/ui/issues/issue-35376.rs deleted file mode 100644 index cc35213b93d..00000000000 --- a/src/test/ui/issues/issue-35376.rs +++ /dev/null @@ -1,43 +0,0 @@ -// check-pass -#![feature(specialization)] -//~^ WARN the feature `specialization` is incomplete - -fn main() {} - -pub trait Alpha<T> { } - -pub trait Beta { - type Event; -} - -pub trait Delta { - type Handle; - fn process(&self); -} - -pub struct Parent<A, T>(A, T); - -impl<A, T> Delta for Parent<A, T> -where A: Alpha<T::Handle>, - T: Delta, - T::Handle: Beta<Event = <Handle as Beta>::Event> { - type Handle = Handle; - default fn process(&self) { - unimplemented!() - } -} - -impl<A, T> Delta for Parent<A, T> -where A: Alpha<T::Handle> + Alpha<Handle>, - T: Delta, - T::Handle: Beta<Event = <Handle as Beta>::Event> { - fn process(&self) { - unimplemented!() - } -} - -pub struct Handle; - -impl Beta for Handle { - type Event = (); -} diff --git a/src/test/ui/issues/issue-35376.stderr b/src/test/ui/issues/issue-35376.stderr deleted file mode 100644 index 835277d408e..00000000000 --- a/src/test/ui/issues/issue-35376.stderr +++ /dev/null @@ -1,12 +0,0 @@ -warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-35376.rs:2:12 - | -LL | #![feature(specialization)] - | ^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information - = help: consider using `min_specialization` instead, which is more stable and complete - -warning: 1 warning emitted - diff --git a/src/test/ui/issues/issue-36768.rs b/src/test/ui/issues/issue-36768.rs deleted file mode 100644 index f671cbc8205..00000000000 --- a/src/test/ui/issues/issue-36768.rs +++ /dev/null @@ -1,9 +0,0 @@ -// run-pass -// compile-flags:--test -#![deny(private_in_public)] - -#[test] fn foo() {} -mod foo {} - -#[test] fn core() {} -extern crate core; diff --git a/src/test/ui/issues/issue-37433.rs b/src/test/ui/issues/issue-37433.rs deleted file mode 100644 index 1c362e8aba0..00000000000 --- a/src/test/ui/issues/issue-37433.rs +++ /dev/null @@ -1,12 +0,0 @@ -// build-fail -// ignore-emscripten no llvm_asm! support - -#![feature(llvm_asm)] -#![allow(deprecated)] // llvm_asm! - -fn main() { - unsafe { - llvm_asm!("" :: "r"("")); - //~^ ERROR: invalid value for constraint in inline assembly - } -} diff --git a/src/test/ui/issues/issue-37433.stderr b/src/test/ui/issues/issue-37433.stderr deleted file mode 100644 index 44a8eb32b7c..00000000000 --- a/src/test/ui/issues/issue-37433.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0669]: invalid value for constraint in inline assembly - --> $DIR/issue-37433.rs:9:29 - | -LL | llvm_asm!("" :: "r"("")); - | ^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0669`. diff --git a/src/test/ui/issues/issue-38002.rs b/src/test/ui/issues/issue-38002.rs deleted file mode 100644 index fdb31fc44a1..00000000000 --- a/src/test/ui/issues/issue-38002.rs +++ /dev/null @@ -1,35 +0,0 @@ -// run-pass -#![allow(dead_code)] -// Check that constant ADTs are codegened OK, part k of N. - -enum Bar { - C -} - -enum Foo { - A {}, - B { - y: usize, - z: Bar - }, -} - -const LIST: [(usize, Foo); 2] = [ - (51, Foo::B { y: 42, z: Bar::C }), - (52, Foo::B { y: 45, z: Bar::C }), -]; - -pub fn main() { - match LIST { - [ - (51, Foo::B { y: 42, z: Bar::C }), - (52, Foo::B { y: 45, z: Bar::C }) - ] => {} - _ => { - // I would want to print the enum here, but if - // the discriminant is garbage this causes an - // `unreachable` and silent process exit. - panic!("trivial match failed") - } - } -} diff --git a/src/test/ui/issues/issue-3935.rs b/src/test/ui/issues/issue-3935.rs deleted file mode 100644 index e98d68e0eb2..00000000000 --- a/src/test/ui/issues/issue-3935.rs +++ /dev/null @@ -1,13 +0,0 @@ -// run-pass - -#[derive(PartialEq)] -struct Bike { - name: String, -} - -pub fn main() { - let town_bike = Bike { name: "schwinn".to_string() }; - let my_bike = Bike { name: "surly".to_string() }; - - assert!(town_bike != my_bike); -} diff --git a/src/test/ui/issues/issue-41255.rs b/src/test/ui/issues/issue-41255.rs deleted file mode 100644 index 9d7072f1665..00000000000 --- a/src/test/ui/issues/issue-41255.rs +++ /dev/null @@ -1,51 +0,0 @@ -// Matching against float literals should result in a linter error - -#![feature(exclusive_range_pattern)] -#![feature(half_open_range_patterns)] -#![allow(unused)] -#![forbid(illegal_floating_point_literal_pattern)] - -fn main() { - let x = 42.0; - match x { - 5.0 => {}, //~ ERROR floating-point types cannot be used in patterns - //~| WARNING hard error - 5.0f32 => {}, //~ ERROR floating-point types cannot be used in patterns - //~| WARNING hard error - -5.0 => {}, //~ ERROR floating-point types cannot be used in patterns - //~| WARNING hard error - 1.0 .. 33.0 => {}, //~ ERROR floating-point types cannot be used in patterns - //~| WARNING hard error - //~| ERROR floating-point types cannot be used in patterns - //~| WARNING hard error - 39.0 ..= 70.0 => {}, //~ ERROR floating-point types cannot be used in patterns - //~| ERROR floating-point types cannot be used in patterns - //~| WARNING hard error - //~| WARNING hard error - - ..71.0 => {} - //~^ ERROR floating-point types cannot be used in patterns - //~| WARNING this was previously accepted by the compiler - ..=72.0 => {} - //~^ ERROR floating-point types cannot be used in patterns - //~| WARNING this was previously accepted by the compiler - 71.0.. => {} - //~^ ERROR floating-point types cannot be used in patterns - //~| WARNING this was previously accepted by the compiler - _ => {}, - }; - let y = 5.0; - // Same for tuples - match (x, 5) { - (3.14, 1) => {}, //~ ERROR floating-point types cannot be used - //~| WARNING hard error - _ => {}, - } - // Or structs - struct Foo { x: f32 }; - match (Foo { x }) { - Foo { x: 2.0 } => {}, //~ ERROR floating-point types cannot be used - //~| WARNING hard error - _ => {}, - } -} diff --git a/src/test/ui/issues/issue-41255.stderr b/src/test/ui/issues/issue-41255.stderr deleted file mode 100644 index bf81c8d371c..00000000000 --- a/src/test/ui/issues/issue-41255.stderr +++ /dev/null @@ -1,115 +0,0 @@ -error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:11:9 - | -LL | 5.0 => {}, - | ^^^ - | -note: the lint level is defined here - --> $DIR/issue-41255.rs:6:11 - | -LL | #![forbid(illegal_floating_point_literal_pattern)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620> - -error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:13:9 - | -LL | 5.0f32 => {}, - | ^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620> - -error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:15:10 - | -LL | -5.0 => {}, - | ^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620> - -error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:17:9 - | -LL | 1.0 .. 33.0 => {}, - | ^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620> - -error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:17:16 - | -LL | 1.0 .. 33.0 => {}, - | ^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620> - -error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:21:9 - | -LL | 39.0 ..= 70.0 => {}, - | ^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620> - -error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:21:18 - | -LL | 39.0 ..= 70.0 => {}, - | ^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620> - -error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:26:11 - | -LL | ..71.0 => {} - | ^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620> - -error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:29:12 - | -LL | ..=72.0 => {} - | ^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620> - -error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:32:9 - | -LL | 71.0.. => {} - | ^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620> - -error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:40:10 - | -LL | (3.14, 1) => {}, - | ^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620> - -error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:47:18 - | -LL | Foo { x: 2.0 } => {}, - | ^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620> - -error: aborting due to 12 previous errors - diff --git a/src/test/ui/issues/issue-42944.rs b/src/test/ui/issues/issue-42944.rs deleted file mode 100644 index a4404857a56..00000000000 --- a/src/test/ui/issues/issue-42944.rs +++ /dev/null @@ -1,21 +0,0 @@ -mod foo { - pub struct Bx(()); -} - -mod bar { - use foo::Bx; - - fn foo() { - Bx(()); - //~^ ERROR cannot initialize a tuple struct which contains private fields [E0423] - } -} - -mod baz { - fn foo() { - Bx(()); - //~^ ERROR cannot find function, tuple struct or tuple variant `Bx` in this scope [E0425] - } -} - -fn main() {} diff --git a/src/test/ui/issues/issue-42944.stderr b/src/test/ui/issues/issue-42944.stderr deleted file mode 100644 index 008492529d1..00000000000 --- a/src/test/ui/issues/issue-42944.stderr +++ /dev/null @@ -1,27 +0,0 @@ -error[E0423]: cannot initialize a tuple struct which contains private fields - --> $DIR/issue-42944.rs:9:9 - | -LL | Bx(()); - | ^^ - | -note: constructor is not visible here due to private fields - --> $DIR/issue-42944.rs:2:19 - | -LL | pub struct Bx(()); - | ^^ private field - -error[E0425]: cannot find function, tuple struct or tuple variant `Bx` in this scope - --> $DIR/issue-42944.rs:16:9 - | -LL | Bx(()); - | ^^ not found in this scope - | -help: consider importing this tuple struct - | -LL | use foo::Bx; - | - -error: aborting due to 2 previous errors - -Some errors have detailed explanations: E0423, E0425. -For more information about an error, try `rustc --explain E0423`. diff --git a/src/test/ui/issues/issue-45107-unnecessary-unsafe-in-closure.mir.stderr b/src/test/ui/issues/issue-45107-unnecessary-unsafe-in-closure.mir.stderr deleted file mode 100644 index 9e9cbcf33ae..00000000000 --- a/src/test/ui/issues/issue-45107-unnecessary-unsafe-in-closure.mir.stderr +++ /dev/null @@ -1,35 +0,0 @@ -error: unnecessary `unsafe` block - --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:10:13 - | -LL | unsafe { - | ------ because it's nested under this `unsafe` block -LL | let f = |v: &mut Vec<_>| { -LL | unsafe { - | ^^^^^^ unnecessary `unsafe` block - | -note: the lint level is defined here - --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:4:8 - | -LL | #[deny(unused_unsafe)] - | ^^^^^^^^^^^^^ - -error: unnecessary `unsafe` block - --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:12:38 - | -LL | unsafe { - | ------ because it's nested under this `unsafe` block -... -LL | |w: &mut Vec<u32>| { unsafe { - | ^^^^^^ unnecessary `unsafe` block - -error: unnecessary `unsafe` block - --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:16:34 - | -LL | unsafe { - | ------ because it's nested under this `unsafe` block -... -LL | |x: &mut Vec<u32>| { unsafe { - | ^^^^^^ unnecessary `unsafe` block - -error: aborting due to 3 previous errors - diff --git a/src/test/ui/issues/issue-45107-unnecessary-unsafe-in-closure.rs b/src/test/ui/issues/issue-45107-unnecessary-unsafe-in-closure.rs deleted file mode 100644 index ac1cfd62a05..00000000000 --- a/src/test/ui/issues/issue-45107-unnecessary-unsafe-in-closure.rs +++ /dev/null @@ -1,28 +0,0 @@ -// revisions: mir thir -// [thir]compile-flags: -Zthir-unsafeck - -#[deny(unused_unsafe)] -fn main() { - let mut v = Vec::<i32>::with_capacity(24); - - unsafe { - let f = |v: &mut Vec<_>| { - unsafe { //~ ERROR unnecessary `unsafe` - v.set_len(24); - |w: &mut Vec<u32>| { unsafe { //~ ERROR unnecessary `unsafe` - w.set_len(32); - } }; - } - |x: &mut Vec<u32>| { unsafe { //~ ERROR unnecessary `unsafe` - x.set_len(40); - } }; - }; - - v.set_len(0); - f(&mut v); - } - - |y: &mut Vec<u32>| { unsafe { - y.set_len(48); - } }; -} diff --git a/src/test/ui/issues/issue-45107-unnecessary-unsafe-in-closure.thir.stderr b/src/test/ui/issues/issue-45107-unnecessary-unsafe-in-closure.thir.stderr deleted file mode 100644 index 9e9cbcf33ae..00000000000 --- a/src/test/ui/issues/issue-45107-unnecessary-unsafe-in-closure.thir.stderr +++ /dev/null @@ -1,35 +0,0 @@ -error: unnecessary `unsafe` block - --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:10:13 - | -LL | unsafe { - | ------ because it's nested under this `unsafe` block -LL | let f = |v: &mut Vec<_>| { -LL | unsafe { - | ^^^^^^ unnecessary `unsafe` block - | -note: the lint level is defined here - --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:4:8 - | -LL | #[deny(unused_unsafe)] - | ^^^^^^^^^^^^^ - -error: unnecessary `unsafe` block - --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:12:38 - | -LL | unsafe { - | ------ because it's nested under this `unsafe` block -... -LL | |w: &mut Vec<u32>| { unsafe { - | ^^^^^^ unnecessary `unsafe` block - -error: unnecessary `unsafe` block - --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:16:34 - | -LL | unsafe { - | ------ because it's nested under this `unsafe` block -... -LL | |x: &mut Vec<u32>| { unsafe { - | ^^^^^^ unnecessary `unsafe` block - -error: aborting due to 3 previous errors - diff --git a/src/test/ui/issues/issue-53912.rs b/src/test/ui/issues/issue-53912.rs deleted file mode 100644 index 65b6825a832..00000000000 --- a/src/test/ui/issues/issue-53912.rs +++ /dev/null @@ -1,37 +0,0 @@ -// build-pass - -// This test is the same code as in ui/symbol-names/issue-60925.rs but this checks that the -// reproduction compiles successfully and doesn't segfault, whereas that test just checks that the -// symbol mangling fix produces the correct result. - -fn dummy() {} - -mod llvm { - pub(crate) struct Foo; -} -mod foo { - pub(crate) struct Foo<T>(T); - - impl Foo<::llvm::Foo> { - pub(crate) fn foo() { - for _ in 0..0 { - for _ in &[::dummy()] { - ::dummy(); - ::dummy(); - ::dummy(); - } - } - } - } - - pub(crate) fn foo() { - Foo::foo(); - Foo::foo(); - } -} - -pub fn foo() { - foo::foo(); -} - -fn main() {} diff --git a/src/test/ui/issues/issue-56685.rs b/src/test/ui/issues/issue-56685.rs deleted file mode 100644 index f320c99ed15..00000000000 --- a/src/test/ui/issues/issue-56685.rs +++ /dev/null @@ -1,44 +0,0 @@ -#![allow(dead_code)] -#![deny(unused_variables)] - -// This test aims to check that unused variable suggestions update bindings in all -// match arms. - -fn main() { - enum E { - A(i32,), - B(i32,), - } - - match E::A(1) { - E::A(x) | E::B(x) => {} - //~^ ERROR unused variable: `x` - } - - enum F { - A(i32, i32,), - B(i32, i32,), - C(i32, i32,), - } - - let _ = match F::A(1, 2) { - F::A(x, y) | F::B(x, y) => { y }, - //~^ ERROR unused variable: `x` - F::C(a, b) => { 3 } - //~^ ERROR unused variable: `a` - //~^^ ERROR unused variable: `b` - }; - - let _ = if let F::A(x, y) | F::B(x, y) = F::A(1, 2) { - //~^ ERROR unused variable: `x` - y - } else { - 3 - }; - - while let F::A(x, y) | F::B(x, y) = F::A(1, 2) { - //~^ ERROR unused variable: `x` - let _ = y; - break; - } -} diff --git a/src/test/ui/issues/issue-56685.stderr b/src/test/ui/issues/issue-56685.stderr deleted file mode 100644 index ccf357d4aa0..00000000000 --- a/src/test/ui/issues/issue-56685.stderr +++ /dev/null @@ -1,63 +0,0 @@ -error: unused variable: `x` - --> $DIR/issue-56685.rs:14:14 - | -LL | E::A(x) | E::B(x) => {} - | ^ ^ - | -note: the lint level is defined here - --> $DIR/issue-56685.rs:2:9 - | -LL | #![deny(unused_variables)] - | ^^^^^^^^^^^^^^^^ -help: if this is intentional, prefix it with an underscore - | -LL | E::A(_x) | E::B(_x) => {} - | ~~ ~~ - -error: unused variable: `x` - --> $DIR/issue-56685.rs:25:14 - | -LL | F::A(x, y) | F::B(x, y) => { y }, - | ^ ^ - | -help: if this is intentional, prefix it with an underscore - | -LL | F::A(_x, y) | F::B(_x, y) => { y }, - | ~~ ~~ - -error: unused variable: `a` - --> $DIR/issue-56685.rs:27:14 - | -LL | F::C(a, b) => { 3 } - | ^ help: if this is intentional, prefix it with an underscore: `_a` - -error: unused variable: `b` - --> $DIR/issue-56685.rs:27:17 - | -LL | F::C(a, b) => { 3 } - | ^ help: if this is intentional, prefix it with an underscore: `_b` - -error: unused variable: `x` - --> $DIR/issue-56685.rs:32:25 - | -LL | let _ = if let F::A(x, y) | F::B(x, y) = F::A(1, 2) { - | ^ ^ - | -help: if this is intentional, prefix it with an underscore - | -LL | let _ = if let F::A(_x, y) | F::B(_x, y) = F::A(1, 2) { - | ~~ ~~ - -error: unused variable: `x` - --> $DIR/issue-56685.rs:39:20 - | -LL | while let F::A(x, y) | F::B(x, y) = F::A(1, 2) { - | ^ ^ - | -help: if this is intentional, prefix it with an underscore - | -LL | while let F::A(_x, y) | F::B(_x, y) = F::A(1, 2) { - | ~~ ~~ - -error: aborting due to 6 previous errors - diff --git a/src/test/ui/issues/issue-57410.rs b/src/test/ui/issues/issue-57410.rs deleted file mode 100644 index 0cf4b8068e4..00000000000 --- a/src/test/ui/issues/issue-57410.rs +++ /dev/null @@ -1,17 +0,0 @@ -// check-pass - -// Tests that the `unreachable_pub` lint doesn't fire for `pub self::imp::f`. - -#![deny(unreachable_pub)] - -mod m { - mod imp { - pub fn f() {} - } - - pub use self::imp::f; -} - -pub use self::m::f; - -fn main() {} diff --git a/src/test/ui/issues/issue-5791.rs b/src/test/ui/issues/issue-5791.rs deleted file mode 100644 index 3544160f094..00000000000 --- a/src/test/ui/issues/issue-5791.rs +++ /dev/null @@ -1,14 +0,0 @@ -// run-pass -#![allow(dead_code)] -#![warn(clashing_extern_declarations)] -// pretty-expanded FIXME #23616 - -extern "C" { - #[link_name = "malloc"] - fn malloc1(len: i32) -> *const u8; - #[link_name = "malloc"] - //~^ WARN `malloc2` redeclares `malloc` with a different signature - fn malloc2(len: i32, foo: i32) -> *const u8; -} - -pub fn main() {} diff --git a/src/test/ui/issues/issue-5791.stderr b/src/test/ui/issues/issue-5791.stderr deleted file mode 100644 index cf60e609deb..00000000000 --- a/src/test/ui/issues/issue-5791.stderr +++ /dev/null @@ -1,21 +0,0 @@ -warning: `malloc2` redeclares `malloc` with a different signature - --> $DIR/issue-5791.rs:9:5 - | -LL | / #[link_name = "malloc"] -LL | | fn malloc1(len: i32) -> *const u8; - | |______________________________________- `malloc` previously declared here -LL | / #[link_name = "malloc"] -LL | | -LL | | fn malloc2(len: i32, foo: i32) -> *const u8; - | |________________________________________________^ this signature doesn't match the previous declaration - | -note: the lint level is defined here - --> $DIR/issue-5791.rs:3:9 - | -LL | #![warn(clashing_extern_declarations)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: expected `unsafe extern "C" fn(i32) -> *const u8` - found `unsafe extern "C" fn(i32, i32) -> *const u8` - -warning: 1 warning emitted - diff --git a/src/test/ui/issues/issue-74614.rs b/src/test/ui/issues/issue-74614.rs deleted file mode 100644 index 8b0c00b1355..00000000000 --- a/src/test/ui/issues/issue-74614.rs +++ /dev/null @@ -1,18 +0,0 @@ -// compile-flags:-Zpolymorphize=on -// build-pass - -fn test<T>() { - std::mem::size_of::<T>(); -} - -pub fn foo<T>(_: T) -> &'static fn() { - &(test::<T> as fn()) -} - -fn outer<T>() { - foo(|| ()); -} - -fn main() { - outer::<u8>(); -} diff --git a/src/test/ui/issues/issue-78720.rs b/src/test/ui/issues/issue-78720.rs deleted file mode 100644 index 4cdb9f49113..00000000000 --- a/src/test/ui/issues/issue-78720.rs +++ /dev/null @@ -1,19 +0,0 @@ -fn server() -> impl { -//~^ ERROR at least one trait must be specified - ().map2(|| "") -} - -trait FilterBase2 { - fn map2<F>(self, f: F) -> Map2<F> {} - //~^ ERROR mismatched types - //~^^ ERROR the size for values of type `Self` cannot be known at compilation time -} - -struct Map2<Segment2> { - _func: F, - //~^ ERROR cannot find type `F` in this scope -} - -impl<F> FilterBase2 for F {} - -fn main() {} diff --git a/src/test/ui/issues/issue-78720.stderr b/src/test/ui/issues/issue-78720.stderr deleted file mode 100644 index 3dd13877298..00000000000 --- a/src/test/ui/issues/issue-78720.stderr +++ /dev/null @@ -1,55 +0,0 @@ -error: at least one trait must be specified - --> $DIR/issue-78720.rs:1:16 - | -LL | fn server() -> impl { - | ^^^^ - -error[E0412]: cannot find type `F` in this scope - --> $DIR/issue-78720.rs:13:12 - | -LL | _func: F, - | ^ - | - ::: $SRC_DIR/core/src/ops/function.rs:LL:COL - | -LL | pub trait Fn<Args>: FnMut<Args> { - | ------------------------------- similarly named trait `Fn` defined here - | -help: a trait with a similar name exists - | -LL | _func: Fn, - | ~~ -help: you might be missing a type parameter - | -LL | struct Map2<Segment2, F> { - | +++ - -error[E0308]: mismatched types - --> $DIR/issue-78720.rs:7:39 - | -LL | fn map2<F>(self, f: F) -> Map2<F> {} - | ^^ expected struct `Map2`, found `()` - | - = note: expected struct `Map2<F>` - found unit type `()` - -error[E0277]: the size for values of type `Self` cannot be known at compilation time - --> $DIR/issue-78720.rs:7:16 - | -LL | fn map2<F>(self, f: F) -> Map2<F> {} - | ^^^^ doesn't have a size known at compile-time - | - = help: unsized fn params are gated as an unstable feature -help: consider further restricting `Self` - | -LL | fn map2<F>(self, f: F) -> Map2<F> where Self: Sized {} - | +++++++++++++++++ -help: function arguments must have a statically known size, borrowed types always have a known size - | -LL | fn map2<F>(&self, f: F) -> Map2<F> {} - | + - -error: aborting due to 4 previous errors - -Some errors have detailed explanations: E0277, E0308, E0412. -For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/issues/issue-79593.rs b/src/test/ui/issues/issue-79593.rs deleted file mode 100644 index b94278bfdd2..00000000000 --- a/src/test/ui/issues/issue-79593.rs +++ /dev/null @@ -1,29 +0,0 @@ -mod foo { - pub struct Pub { private: () } - - pub enum Enum { - Variant { x: (), y: () }, - Other - } - - fn correct() { - Pub {}; - //~^ ERROR missing field `private` in initializer of `Pub` - Enum::Variant { x: () }; - //~^ ERROR missing field `y` in initializer of `Enum` - } -} - -fn correct() { - foo::Pub {}; - //~^ ERROR cannot construct `Pub` with struct literal syntax due to inaccessible fields -} - -fn wrong() { - foo::Enum::Variant { x: () }; - //~^ ERROR missing field `y` in initializer of `Enum` - foo::Enum::Variant { }; - //~^ ERROR missing fields `x` and `y` in initializer of `Enum` -} - -fn main() {} diff --git a/src/test/ui/issues/issue-79593.stderr b/src/test/ui/issues/issue-79593.stderr deleted file mode 100644 index b8c7d4f23a2..00000000000 --- a/src/test/ui/issues/issue-79593.stderr +++ /dev/null @@ -1,33 +0,0 @@ -error[E0063]: missing field `private` in initializer of `Pub` - --> $DIR/issue-79593.rs:10:9 - | -LL | Pub {}; - | ^^^ missing `private` - -error[E0063]: missing field `y` in initializer of `Enum` - --> $DIR/issue-79593.rs:12:9 - | -LL | Enum::Variant { x: () }; - | ^^^^^^^^^^^^^ missing `y` - -error: cannot construct `Pub` with struct literal syntax due to inaccessible fields - --> $DIR/issue-79593.rs:18:5 - | -LL | foo::Pub {}; - | ^^^^^^^^ - -error[E0063]: missing field `y` in initializer of `Enum` - --> $DIR/issue-79593.rs:23:5 - | -LL | foo::Enum::Variant { x: () }; - | ^^^^^^^^^^^^^^^^^^ missing `y` - -error[E0063]: missing fields `x` and `y` in initializer of `Enum` - --> $DIR/issue-79593.rs:25:5 - | -LL | foo::Enum::Variant { }; - | ^^^^^^^^^^^^^^^^^^ missing `x` and `y` - -error: aborting due to 5 previous errors - -For more information about this error, try `rustc --explain E0063`. diff --git a/src/test/ui/issues/issue-79744.rs b/src/test/ui/issues/issue-79744.rs deleted file mode 100644 index e9725a027d3..00000000000 --- a/src/test/ui/issues/issue-79744.rs +++ /dev/null @@ -1,13 +0,0 @@ -fn main() { - let elem = 6i8; - let e2 = 230; - //~^ ERROR literal out of range for `i8` - //~| HELP consider using the type `u8` instead - - let mut vec = Vec::new(); - - vec.push(e2); - vec.push(elem); - - println!("{:?}", vec); -} diff --git a/src/test/ui/issues/issue-79744.stderr b/src/test/ui/issues/issue-79744.stderr deleted file mode 100644 index 6f6dd44d236..00000000000 --- a/src/test/ui/issues/issue-79744.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: literal out of range for `i8` - --> $DIR/issue-79744.rs:3:14 - | -LL | let e2 = 230; - | ^^^ - | - = note: `#[deny(overflowing_literals)]` on by default - = note: the literal `230` does not fit into the type `i8` whose range is `-128..=127` - = help: consider using the type `u8` instead - -error: aborting due to previous error - diff --git a/src/test/ui/issues/type-arg-mismatch-due-to-impl-trait.rs b/src/test/ui/issues/type-arg-mismatch-due-to-impl-trait.rs deleted file mode 100644 index ecfa5c69e2f..00000000000 --- a/src/test/ui/issues/type-arg-mismatch-due-to-impl-trait.rs +++ /dev/null @@ -1,16 +0,0 @@ -trait Foo { - type T; - fn foo(&self, t: Self::T); -//~^ NOTE expected 0 type parameters -} - -impl Foo for u32 { - type T = (); - - fn foo(&self, t: impl Clone) {} -//~^ ERROR method `foo` has 1 type parameter but its trait declaration has 0 type parameters -//~| NOTE found 1 type parameter -//~| NOTE `impl Trait` introduces an implicit type parameter -} - -fn main() {} diff --git a/src/test/ui/issues/type-arg-mismatch-due-to-impl-trait.stderr b/src/test/ui/issues/type-arg-mismatch-due-to-impl-trait.stderr deleted file mode 100644 index 30322f88cca..00000000000 --- a/src/test/ui/issues/type-arg-mismatch-due-to-impl-trait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0049]: method `foo` has 1 type parameter but its trait declaration has 0 type parameters - --> $DIR/type-arg-mismatch-due-to-impl-trait.rs:10:22 - | -LL | fn foo(&self, t: Self::T); - | - expected 0 type parameters -... -LL | fn foo(&self, t: impl Clone) {} - | ^^^^^^^^^^ - | | - | found 1 type parameter - | `impl Trait` introduces an implicit type parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0049`. |
