diff options
| author | Oneirical <manchot@videotron.ca> | 2025-07-13 15:56:27 -0400 |
|---|---|---|
| committer | Oneirical <manchot@videotron.ca> | 2025-07-24 17:01:44 -0400 |
| commit | a924d44115b632775ef0d2e12382e285953b0c2c (patch) | |
| tree | 4cb6005288fc4a7407006094892fcf577f3f30cf /tests/ui/issues | |
| parent | 246733a3d978de41c5b77b8120ba8f41592df9f1 (diff) | |
| download | rust-a924d44115b632775ef0d2e12382e285953b0c2c.tar.gz rust-a924d44115b632775ef0d2e12382e285953b0c2c.zip | |
Rehome tests/ui/issues/ tests [1/?]
Diffstat (limited to 'tests/ui/issues')
44 files changed, 0 insertions, 735 deletions
diff --git a/tests/ui/issues/auxiliary/issue-18514.rs b/tests/ui/issues/auxiliary/issue-18514.rs deleted file mode 100644 index 20c8e60ee45..00000000000 --- a/tests/ui/issues/auxiliary/issue-18514.rs +++ /dev/null @@ -1,17 +0,0 @@ -#![crate_type = "rlib"] - -pub trait Tr { - fn tr(&self); -} - -pub struct St<V>(pub Vec<V>); - -impl<V> Tr for St<V> { - fn tr(&self) { - match self { - &St(ref v) => { - v.iter(); - } - } - } -} diff --git a/tests/ui/issues/auxiliary/issue-2472-b.rs b/tests/ui/issues/auxiliary/issue-2472-b.rs deleted file mode 100644 index 0d151520fe0..00000000000 --- a/tests/ui/issues/auxiliary/issue-2472-b.rs +++ /dev/null @@ -1,13 +0,0 @@ -pub struct S(pub ()); - -impl S { - pub fn foo(&self) { } -} - -pub trait T { - fn bar(&self); -} - -impl T for S { - fn bar(&self) { } -} diff --git a/tests/ui/issues/auxiliary/issue-49544.rs b/tests/ui/issues/auxiliary/issue-49544.rs deleted file mode 100644 index f8b3a3fba1e..00000000000 --- a/tests/ui/issues/auxiliary/issue-49544.rs +++ /dev/null @@ -1,7 +0,0 @@ -#![crate_type = "lib"] - -pub fn foo() -> Vec<String> { - std::env::args() - .skip(1) - .collect() -} diff --git a/tests/ui/issues/issue-106755.rs b/tests/ui/issues/issue-106755.rs deleted file mode 100644 index d7e7122ebda..00000000000 --- a/tests/ui/issues/issue-106755.rs +++ /dev/null @@ -1,22 +0,0 @@ -//@ compile-flags:-Ztranslate-lang=en_US - -#![feature(negative_impls)] -#![feature(marker_trait_attr)] - -#[marker] -trait MyTrait {} - -struct TestType<T>(::std::marker::PhantomData<T>); - -unsafe impl<T: MyTrait + 'static> Send for TestType<T> {} - -impl<T: MyTrait> !Send for TestType<T> {} -//~^ ERROR found both positive and negative implementation -//~| ERROR `!Send` impl requires `T: MyTrait` but the struct it is implemented for does not - -unsafe impl<T: 'static> Send for TestType<T> {} //~ ERROR conflicting implementations - -impl !Send for TestType<i32> {} -//~^ ERROR `!Send` impls cannot be specialized - -fn main() {} diff --git a/tests/ui/issues/issue-106755.stderr b/tests/ui/issues/issue-106755.stderr deleted file mode 100644 index da6b8c5c563..00000000000 --- a/tests/ui/issues/issue-106755.stderr +++ /dev/null @@ -1,47 +0,0 @@ -error[E0751]: found both positive and negative implementation of trait `Send` for type `TestType<_>`: - --> $DIR/issue-106755.rs:13:1 - | -LL | unsafe impl<T: MyTrait + 'static> Send for TestType<T> {} - | ------------------------------------------------------ positive implementation here -LL | -LL | impl<T: MyTrait> !Send for TestType<T> {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ negative implementation here - -error[E0119]: conflicting implementations of trait `Send` for type `TestType<_>` - --> $DIR/issue-106755.rs:17:1 - | -LL | unsafe impl<T: MyTrait + 'static> Send for TestType<T> {} - | ------------------------------------------------------ first implementation here -... -LL | unsafe impl<T: 'static> Send for TestType<T> {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `TestType<_>` - -error[E0367]: `!Send` impl requires `T: MyTrait` but the struct it is implemented for does not - --> $DIR/issue-106755.rs:13:9 - | -LL | impl<T: MyTrait> !Send for TestType<T> {} - | ^^^^^^^ - | -note: the implementor must specify the same requirement - --> $DIR/issue-106755.rs:9:1 - | -LL | struct TestType<T>(::std::marker::PhantomData<T>); - | ^^^^^^^^^^^^^^^^^^ - -error[E0366]: `!Send` impls cannot be specialized - --> $DIR/issue-106755.rs:19:1 - | -LL | impl !Send for TestType<i32> {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: `i32` is not a generic parameter -note: use the same sequence of generic lifetime, type and const parameters as the struct definition - --> $DIR/issue-106755.rs:9:1 - | -LL | struct TestType<T>(::std::marker::PhantomData<T>); - | ^^^^^^^^^^^^^^^^^^ - -error: aborting due to 4 previous errors - -Some errors have detailed explanations: E0119, E0366, E0367, E0751. -For more information about an error, try `rustc --explain E0119`. diff --git a/tests/ui/issues/issue-14382.rs b/tests/ui/issues/issue-14382.rs deleted file mode 100644 index 74d938783ae..00000000000 --- a/tests/ui/issues/issue-14382.rs +++ /dev/null @@ -1,15 +0,0 @@ -//@ run-pass -#[derive(Debug)] -struct Matrix4<S>(#[allow(dead_code)] S); -trait POrd<S> {} - -fn translate<S: POrd<S>>(s: S) -> Matrix4<S> { Matrix4(s) } - -impl POrd<f32> for f32 {} -impl POrd<f64> for f64 {} - -fn main() { - let x = 1.0; - let m : Matrix4<f32> = translate(x); - println!("m: {:?}", m); -} diff --git a/tests/ui/issues/issue-18514.rs b/tests/ui/issues/issue-18514.rs deleted file mode 100644 index 89f58d3988d..00000000000 --- a/tests/ui/issues/issue-18514.rs +++ /dev/null @@ -1,16 +0,0 @@ -//@ run-pass -// Test that we don't ICE when codegenning a generic impl method from -// an extern crate that contains a match expression on a local -// variable place where one of the match case bodies contains an -// expression that autoderefs through an overloaded generic deref -// impl. - -//@ aux-build:issue-18514.rs - -extern crate issue_18514 as ice; -use ice::{Tr, St}; - -fn main() { - let st: St<()> = St(vec![]); - st.tr(); -} diff --git a/tests/ui/issues/issue-18952.rs b/tests/ui/issues/issue-18952.rs deleted file mode 100644 index 9fdafb1ff4a..00000000000 --- a/tests/ui/issues/issue-18952.rs +++ /dev/null @@ -1,56 +0,0 @@ -// This issue tests fn_traits overloading on arity. -//@ run-pass - -#![feature(fn_traits)] -#![feature(unboxed_closures)] - -struct Foo; - -impl Fn<(isize, isize)> for Foo { - extern "rust-call" fn call(&self, args: (isize, isize)) -> Self::Output { - println!("{:?}", args); - (args.0 + 1, args.1 + 1) - } -} - -impl FnMut<(isize, isize)> for Foo { - extern "rust-call" fn call_mut(&mut self, args: (isize, isize)) -> Self::Output { - println!("{:?}", args); - (args.0 + 1, args.1 + 1) - } -} - -impl FnOnce<(isize, isize)> for Foo { - type Output = (isize, isize); - extern "rust-call" fn call_once(self, args: (isize, isize)) -> Self::Output { - println!("{:?}", args); - (args.0 + 1, args.1 + 1) - } -} - -impl Fn<(isize, isize, isize)> for Foo { - extern "rust-call" fn call(&self, args: (isize, isize, isize)) -> Self::Output { - println!("{:?}", args); - (args.0 + 3, args.1 + 3, args.2 + 3) - } -} - -impl FnMut<(isize, isize, isize)> for Foo { - extern "rust-call" fn call_mut(&mut self, args: (isize, isize, isize)) -> Self::Output { - println!("{:?}", args); - (args.0 + 3, args.1 + 3, args.2 + 3) - } -} -impl FnOnce<(isize, isize, isize)> for Foo { - type Output = (isize, isize, isize); - extern "rust-call" fn call_once(self, args: (isize, isize, isize)) -> Self::Output { - println!("{:?}", args); - (args.0 + 3, args.1 + 3, args.2 + 3) - } -} - -fn main() { - let foo = Foo; - assert_eq!(foo(1, 1), (2, 2)); - assert_eq!(foo(1, 1, 1), (4, 4, 4)); -} diff --git a/tests/ui/issues/issue-21174.rs b/tests/ui/issues/issue-21174.rs deleted file mode 100644 index 07827425116..00000000000 --- a/tests/ui/issues/issue-21174.rs +++ /dev/null @@ -1,11 +0,0 @@ -trait Trait<'a> { - type A; - type B; -} - -fn foo<'a, T: Trait<'a>>(value: T::A) { - let new: T::B = unsafe { std::mem::transmute(value) }; -//~^ ERROR: cannot transmute between types of different sizes, or dependently-sized types -} - -fn main() { } diff --git a/tests/ui/issues/issue-21174.stderr b/tests/ui/issues/issue-21174.stderr deleted file mode 100644 index a6b75c91352..00000000000 --- a/tests/ui/issues/issue-21174.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/issue-21174.rs:7:30 - | -LL | let new: T::B = unsafe { std::mem::transmute(value) }; - | ^^^^^^^^^^^^^^^^^^^ - | - = note: source type: `<T as Trait<'_>>::A` (this type does not have a fixed size) - = note: target type: `<T as Trait<'_>>::B` (this type does not have a fixed size) - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0512`. diff --git a/tests/ui/issues/issue-22789.rs b/tests/ui/issues/issue-22789.rs deleted file mode 100644 index 95ebe6baaa3..00000000000 --- a/tests/ui/issues/issue-22789.rs +++ /dev/null @@ -1,8 +0,0 @@ -//@ check-pass - -#![feature(unboxed_closures, fn_traits)] - -fn main() { - let k = |x: i32| { x + 1 }; - Fn::call(&k, (0,)); -} diff --git a/tests/ui/issues/issue-23281.rs b/tests/ui/issues/issue-23281.rs deleted file mode 100644 index 72716896426..00000000000 --- a/tests/ui/issues/issue-23281.rs +++ /dev/null @@ -1,12 +0,0 @@ -pub struct Struct; - -impl Struct { - pub fn function(funs: Vec<dyn Fn() -> ()>) {} - //~^ ERROR the size for values of type -} - -struct Vec<T> { - t: T, -} - -fn main() {} diff --git a/tests/ui/issues/issue-23281.stderr b/tests/ui/issues/issue-23281.stderr deleted file mode 100644 index ee079f2deec..00000000000 --- a/tests/ui/issues/issue-23281.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0277]: the size for values of type `(dyn Fn() + 'static)` cannot be known at compilation time - --> $DIR/issue-23281.rs:4:27 - | -LL | pub fn function(funs: Vec<dyn Fn() -> ()>) {} - | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time - | - = help: the trait `Sized` is not implemented for `(dyn Fn() + 'static)` -note: required by an implicit `Sized` bound in `Vec` - --> $DIR/issue-23281.rs:8:12 - | -LL | struct Vec<T> { - | ^ required by the implicit `Sized` requirement on this type parameter in `Vec` -help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>` - --> $DIR/issue-23281.rs:8:12 - | -LL | struct Vec<T> { - | ^ this could be changed to `T: ?Sized`... -LL | t: T, - | - ...if indirection were used here: `Box<T>` - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/issues/issue-24353.rs b/tests/ui/issues/issue-24353.rs deleted file mode 100644 index 369fc238d11..00000000000 --- a/tests/ui/issues/issue-24353.rs +++ /dev/null @@ -1,8 +0,0 @@ -//@ run-pass -#![allow(unreachable_code)] -fn main() { - return (); - - let x = (); - x -} diff --git a/tests/ui/issues/issue-2472.rs b/tests/ui/issues/issue-2472.rs deleted file mode 100644 index f8f539ed1d1..00000000000 --- a/tests/ui/issues/issue-2472.rs +++ /dev/null @@ -1,13 +0,0 @@ -//@ run-pass -//@ aux-build:issue-2472-b.rs - - -extern crate issue_2472_b; - -use issue_2472_b::{S, T}; - -pub fn main() { - let s = S(()); - s.foo(); - s.bar(); -} diff --git a/tests/ui/issues/issue-32326.rs b/tests/ui/issues/issue-32326.rs deleted file mode 100644 index e928c66e2cc..00000000000 --- a/tests/ui/issues/issue-32326.rs +++ /dev/null @@ -1,10 +0,0 @@ -// Regression test for #32326. We ran out of memory because we -// attempted to expand this case up to the recursion limit, and 2^N is -// too big. - -enum Expr { //~ ERROR E0072 - Plus(Expr, Expr), - Literal(i64), -} - -fn main() { } diff --git a/tests/ui/issues/issue-32326.stderr b/tests/ui/issues/issue-32326.stderr deleted file mode 100644 index 1989a915cc1..00000000000 --- a/tests/ui/issues/issue-32326.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0072]: recursive type `Expr` has infinite size - --> $DIR/issue-32326.rs:5:1 - | -LL | enum Expr { - | ^^^^^^^^^ -LL | Plus(Expr, Expr), - | ---- recursive without indirection - | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle - | -LL | Plus(Box<Expr>, Expr), - | ++++ + - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0072`. diff --git a/tests/ui/issues/issue-3389.rs b/tests/ui/issues/issue-3389.rs deleted file mode 100644 index 4e73a2cf001..00000000000 --- a/tests/ui/issues/issue-3389.rs +++ /dev/null @@ -1,26 +0,0 @@ -//@ run-pass -#![allow(dead_code)] -#![allow(non_camel_case_types)] - -struct trie_node { - content: Vec<String> , - children: Vec<trie_node> , -} - -fn print_str_vector(vector: Vec<String> ) { - for string in &vector { - println!("{}", *string); - } -} - -pub fn main() { - let mut node: trie_node = trie_node { - content: Vec::new(), - children: Vec::new() - }; - let v = vec!["123".to_string(), "abc".to_string()]; - node.content = vec!["123".to_string(), "abc".to_string()]; - print_str_vector(v); - print_str_vector(node.content.clone()); - -} diff --git a/tests/ui/issues/issue-34229.rs b/tests/ui/issues/issue-34229.rs deleted file mode 100644 index 13e627a492f..00000000000 --- a/tests/ui/issues/issue-34229.rs +++ /dev/null @@ -1,5 +0,0 @@ -#[derive(PartialEq)] struct Comparable; -#[derive(PartialEq, PartialOrd)] struct Nope(Comparable); -//~^ ERROR can't compare `Comparable` - -fn main() {} diff --git a/tests/ui/issues/issue-34229.stderr b/tests/ui/issues/issue-34229.stderr deleted file mode 100644 index 2385284de0b..00000000000 --- a/tests/ui/issues/issue-34229.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0277]: can't compare `Comparable` with `Comparable` - --> $DIR/issue-34229.rs:2:46 - | -LL | #[derive(PartialEq, PartialOrd)] struct Nope(Comparable); - | ---------- ^^^^^^^^^^ no implementation for `Comparable < Comparable` and `Comparable > Comparable` - | | - | in this derive macro expansion - | - = help: the trait `PartialOrd` is not implemented for `Comparable` -help: consider annotating `Comparable` with `#[derive(PartialOrd)]` - | -LL | #[derive(PartialEq)] #[derive(PartialOrd)] - | +++++++++++++++++++++ - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/issues/issue-34418.rs b/tests/ui/issues/issue-34418.rs deleted file mode 100644 index 0dcefb01935..00000000000 --- a/tests/ui/issues/issue-34418.rs +++ /dev/null @@ -1,19 +0,0 @@ -//@ check-pass - -macro_rules! make_item { - () => { fn f() {} } -} - -macro_rules! make_stmt { - () => { let x = 0; } -} - -fn f() { - make_item! {} -} - -fn g() { - make_stmt! {} -} - -fn main() {} diff --git a/tests/ui/issues/issue-36278-prefix-nesting.rs b/tests/ui/issues/issue-36278-prefix-nesting.rs deleted file mode 100644 index 3f2ca7a2460..00000000000 --- a/tests/ui/issues/issue-36278-prefix-nesting.rs +++ /dev/null @@ -1,20 +0,0 @@ -//@ run-pass -// Issue 36278: On an unsized struct with >1 level of nontrivial -// nesting, ensure we are computing dynamic size of prefix correctly. - -use std::mem; - -const SZ: usize = 100; -#[allow(dead_code)] -struct P<T: ?Sized>([u8; SZ], T); - -type Ack<T> = P<P<T>>; - -fn main() { - let size_of_sized; let size_of_unsized; - let x: Box<Ack<[u8; 0]>> = Box::new(P([0; SZ], P([0; SZ], [0; 0]))); - size_of_sized = mem::size_of_val::<Ack<_>>(&x); - let y: Box<Ack<[u8 ]>> = x; - size_of_unsized = mem::size_of_val::<Ack<_>>(&y); - assert_eq!(size_of_sized, size_of_unsized); -} diff --git a/tests/ui/issues/issue-36839.rs b/tests/ui/issues/issue-36839.rs deleted file mode 100644 index 654c0f6e4b5..00000000000 --- a/tests/ui/issues/issue-36839.rs +++ /dev/null @@ -1,21 +0,0 @@ -//@ check-pass - -pub trait Foo { - type Bar; -} - -pub trait Broken { - type Assoc; - fn broken(&self) where Self::Assoc: Foo; -} - -impl<T> Broken for T { - type Assoc = (); - fn broken(&self) where Self::Assoc: Foo { - let _x: <Self::Assoc as Foo>::Bar; - } -} - -fn main() { - let _m: &dyn Broken<Assoc=()> = &(); -} diff --git a/tests/ui/issues/issue-37534.rs b/tests/ui/issues/issue-37534.rs deleted file mode 100644 index 63f6479ae2e..00000000000 --- a/tests/ui/issues/issue-37534.rs +++ /dev/null @@ -1,5 +0,0 @@ -struct Foo<T: ?Hash> {} -//~^ ERROR expected trait, found derive macro `Hash` -//~| ERROR bound modifier `?` can only be applied to `Sized` - -fn main() {} diff --git a/tests/ui/issues/issue-37534.stderr b/tests/ui/issues/issue-37534.stderr deleted file mode 100644 index 08607354203..00000000000 --- a/tests/ui/issues/issue-37534.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0404]: expected trait, found derive macro `Hash` - --> $DIR/issue-37534.rs:1:16 - | -LL | struct Foo<T: ?Hash> {} - | ^^^^ not a trait - | -help: consider importing this trait instead - | -LL + use std::hash::Hash; - | - -error: bound modifier `?` can only be applied to `Sized` - --> $DIR/issue-37534.rs:1:15 - | -LL | struct Foo<T: ?Hash> {} - | ^^^^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0404`. diff --git a/tests/ui/issues/issue-39089.rs b/tests/ui/issues/issue-39089.rs deleted file mode 100644 index 822c47503af..00000000000 --- a/tests/ui/issues/issue-39089.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn f<T: ?for<'a> Sized>() {} -//~^ ERROR `for<...>` binder should be placed before trait bound modifiers - -fn main() {} diff --git a/tests/ui/issues/issue-39089.stderr b/tests/ui/issues/issue-39089.stderr deleted file mode 100644 index a81010aedff..00000000000 --- a/tests/ui/issues/issue-39089.stderr +++ /dev/null @@ -1,10 +0,0 @@ -error: `for<...>` binder should be placed before trait bound modifiers - --> $DIR/issue-39089.rs:1:13 - | -LL | fn f<T: ?for<'a> Sized>() {} - | - ^^^^ - | | - | place the `for<...>` binder before any modifiers - -error: aborting due to 1 previous error - diff --git a/tests/ui/issues/issue-39211.rs b/tests/ui/issues/issue-39211.rs deleted file mode 100644 index ab86afc3410..00000000000 --- a/tests/ui/issues/issue-39211.rs +++ /dev/null @@ -1,14 +0,0 @@ -trait VecN { - const DIM: usize; -} -trait Mat { - type Row: VecN; -} - -fn m<M: Mat>() { - let a = [3; M::Row::DIM]; - //~^ ERROR constant expression depends on a generic parameter - //~| ERROR constant expression depends on a generic parameter -} -fn main() { -} diff --git a/tests/ui/issues/issue-39211.stderr b/tests/ui/issues/issue-39211.stderr deleted file mode 100644 index 2124bc667ff..00000000000 --- a/tests/ui/issues/issue-39211.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error: constant expression depends on a generic parameter - --> $DIR/issue-39211.rs:9:17 - | -LL | let a = [3; M::Row::DIM]; - | ^^^^^^^^^^^ - | - = note: this may fail depending on what value the parameter takes - -error: constant expression depends on a generic parameter - --> $DIR/issue-39211.rs:9:13 - | -LL | let a = [3; M::Row::DIM]; - | ^^^^^^^^^^^^^^^^ - | - = note: this may fail depending on what value the parameter takes - -error: aborting due to 2 previous errors - diff --git a/tests/ui/issues/issue-41229-ref-str.rs b/tests/ui/issues/issue-41229-ref-str.rs deleted file mode 100644 index fe5e6cd6ec5..00000000000 --- a/tests/ui/issues/issue-41229-ref-str.rs +++ /dev/null @@ -1,4 +0,0 @@ -pub fn example(ref s: str) {} -//~^ ERROR the size for values of type - -fn main() {} diff --git a/tests/ui/issues/issue-41229-ref-str.stderr b/tests/ui/issues/issue-41229-ref-str.stderr deleted file mode 100644 index d4ef2a77725..00000000000 --- a/tests/ui/issues/issue-41229-ref-str.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0277]: the size for values of type `str` cannot be known at compilation time - --> $DIR/issue-41229-ref-str.rs:1:23 - | -LL | pub fn example(ref s: str) {} - | ^^^ doesn't have a size known at compile-time - | - = help: the trait `Sized` is not implemented for `str` - = help: unsized fn params are gated as an unstable feature -help: function arguments must have a statically known size, borrowed types always have a known size - | -LL | pub fn example(ref s: &str) {} - | + - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/issues/issue-4333.rs b/tests/ui/issues/issue-4333.rs deleted file mode 100644 index dccaa6f68bd..00000000000 --- a/tests/ui/issues/issue-4333.rs +++ /dev/null @@ -1,9 +0,0 @@ -//@ run-pass -#![allow(unused_must_use)] - -use std::io; - -pub fn main() { - let stdout = &mut io::stdout() as &mut dyn io::Write; - stdout.write(b"Hello!"); -} diff --git a/tests/ui/issues/issue-46964.rs b/tests/ui/issues/issue-46964.rs deleted file mode 100644 index 6a29d91df73..00000000000 --- a/tests/ui/issues/issue-46964.rs +++ /dev/null @@ -1,19 +0,0 @@ -//@ check-pass -mod my_mod { - #[derive(Clone, Copy, Eq, PartialEq, PartialOrd, Ord, Hash)] - pub struct Name<'a> { - source: &'a str, - } - - pub const JSON: Name = Name { source: "JSON" }; -} - -pub fn crash() -> bool { - match (my_mod::JSON, None) { - (_, Some(my_mod::JSON)) => true, - (my_mod::JSON, None) => true, - _ => false, - } -} - -fn main() {} diff --git a/tests/ui/issues/issue-49544.rs b/tests/ui/issues/issue-49544.rs deleted file mode 100644 index bb052501f8b..00000000000 --- a/tests/ui/issues/issue-49544.rs +++ /dev/null @@ -1,9 +0,0 @@ -//@ aux-build:issue-49544.rs -//@ check-pass - -extern crate issue_49544; -use issue_49544::foo; - -fn main() { - let _ = foo(); -} diff --git a/tests/ui/issues/issue-5280.rs b/tests/ui/issues/issue-5280.rs deleted file mode 100644 index 66452c36776..00000000000 --- a/tests/ui/issues/issue-5280.rs +++ /dev/null @@ -1,18 +0,0 @@ -//@ run-pass -#![allow(dead_code)] - -type FontTableTag = u32; - -trait FontTableTagConversions { - fn tag_to_string(self); -} - -impl FontTableTagConversions for FontTableTag { - fn tag_to_string(self) { - let _ = &self; - } -} - -pub fn main() { - 5.tag_to_string(); -} diff --git a/tests/ui/issues/issue-5321-immediates-with-bare-self.rs b/tests/ui/issues/issue-5321-immediates-with-bare-self.rs deleted file mode 100644 index cb35a641c5e..00000000000 --- a/tests/ui/issues/issue-5321-immediates-with-bare-self.rs +++ /dev/null @@ -1,15 +0,0 @@ -//@ run-pass - -trait Fooable { - fn yes(self); -} - -impl Fooable for usize { - fn yes(self) { - for _ in 0..self { println!("yes"); } - } -} - -pub fn main() { - 2.yes(); -} diff --git a/tests/ui/issues/issue-53843.rs b/tests/ui/issues/issue-53843.rs deleted file mode 100644 index d4b0b1e332b..00000000000 --- a/tests/ui/issues/issue-53843.rs +++ /dev/null @@ -1,26 +0,0 @@ -//@ run-pass - -use std::ops::Deref; - -pub struct Pin<P>(P); - -impl<P, T> Deref for Pin<P> -where - P: Deref<Target=T>, -{ - type Target = T; - - fn deref(&self) -> &T { - &*self.0 - } -} - -impl<P> Pin<P> { - fn poll(self) {} -} - -fn main() { - let mut unit = (); - let pin = Pin(&mut unit); - pin.poll(); -} diff --git a/tests/ui/issues/issue-54062.rs b/tests/ui/issues/issue-54062.rs deleted file mode 100644 index 093d6601d4e..00000000000 --- a/tests/ui/issues/issue-54062.rs +++ /dev/null @@ -1,12 +0,0 @@ -use std::sync::Mutex; - -struct Test { - comps: Mutex<String>, -} - -fn main() {} - -fn testing(test: Test) { - let _ = test.comps.inner.try_lock(); - //~^ ERROR: field `inner` of struct `Mutex` is private -} diff --git a/tests/ui/issues/issue-54062.stderr b/tests/ui/issues/issue-54062.stderr deleted file mode 100644 index 75eef543f27..00000000000 --- a/tests/ui/issues/issue-54062.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0616]: field `inner` of struct `Mutex` is private - --> $DIR/issue-54062.rs:10:24 - | -LL | let _ = test.comps.inner.try_lock(); - | ^^^^^ private field - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0616`. diff --git a/tests/ui/issues/issue-67552.rs b/tests/ui/issues/issue-67552.rs deleted file mode 100644 index 53f0e931d60..00000000000 --- a/tests/ui/issues/issue-67552.rs +++ /dev/null @@ -1,31 +0,0 @@ -//@ build-fail -//@ compile-flags: -Copt-level=0 - -fn main() { - rec(Empty); -} - -struct Empty; - -impl Iterator for Empty { - type Item = (); - fn next<'a>(&'a mut self) -> core::option::Option<()> { - None - } -} - -fn identity<T>(x: T) -> T { - x -} - -fn rec<T>(mut it: T) -where - T: Iterator, -{ - if () == () { - T::count(it); - } else { - rec(identity(&mut it)) - //~^ ERROR reached the recursion limit while instantiating - } -} diff --git a/tests/ui/issues/issue-67552.stderr b/tests/ui/issues/issue-67552.stderr deleted file mode 100644 index def0a29f3e5..00000000000 --- a/tests/ui/issues/issue-67552.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error: reached the recursion limit while instantiating `rec::<&mut &mut &mut &mut &mut ...>` - --> $DIR/issue-67552.rs:28:9 - | -LL | rec(identity(&mut it)) - | ^^^^^^^^^^^^^^^^^^^^^^ - | -note: `rec` defined here - --> $DIR/issue-67552.rs:21:1 - | -LL | / fn rec<T>(mut it: T) -LL | | where -LL | | T: Iterator, - | |________________^ - = note: the full type name has been written to '$TEST_BUILD_DIR/issue-67552.long-type.txt' - -error: aborting due to 1 previous error - diff --git a/tests/ui/issues/issue-7246.rs b/tests/ui/issues/issue-7246.rs deleted file mode 100644 index 7b16fa024f8..00000000000 --- a/tests/ui/issues/issue-7246.rs +++ /dev/null @@ -1,11 +0,0 @@ -#![deny(unreachable_code)] -#![allow(dead_code)] - -use std::ptr; -pub unsafe fn g() { - return; - if *ptr::null() {}; //~ ERROR unreachable - //~| WARNING dereferencing a null pointer -} - -pub fn main() {} diff --git a/tests/ui/issues/issue-7246.stderr b/tests/ui/issues/issue-7246.stderr deleted file mode 100644 index 1fb6ab14e64..00000000000 --- a/tests/ui/issues/issue-7246.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error: unreachable statement - --> $DIR/issue-7246.rs:7:5 - | -LL | return; - | ------ any code following this expression is unreachable -LL | if *ptr::null() {}; - | ^^^^^^^^^^^^^^^^^^^ unreachable statement - | -note: the lint level is defined here - --> $DIR/issue-7246.rs:1:9 - | -LL | #![deny(unreachable_code)] - | ^^^^^^^^^^^^^^^^ - -warning: dereferencing a null pointer - --> $DIR/issue-7246.rs:7:8 - | -LL | if *ptr::null() {}; - | ^^^^^^^^^^^^ this code causes undefined behavior when executed - | - = note: `#[warn(deref_nullptr)]` on by default - -error: aborting due to 1 previous error; 1 warning emitted - diff --git a/tests/ui/issues/issue-9446.rs b/tests/ui/issues/issue-9446.rs deleted file mode 100644 index a6ea91e8785..00000000000 --- a/tests/ui/issues/issue-9446.rs +++ /dev/null @@ -1,30 +0,0 @@ -//@ run-pass -struct Wrapper(String); - -impl Wrapper { - pub fn new(wrapped: String) -> Wrapper { - Wrapper(wrapped) - } - - pub fn say_hi(&self) { - let Wrapper(ref s) = *self; - println!("hello {}", *s); - } -} - -impl Drop for Wrapper { - fn drop(&mut self) {} -} - -pub fn main() { - { - // This runs without complaint. - let x = Wrapper::new("Bob".to_string()); - x.say_hi(); - } - { - // This fails to compile, circa 0.8-89-gc635fba. - // error: internal compiler error: drop_ty_immediate: non-box ty - Wrapper::new("Bob".to_string()).say_hi(); - } -} |
