Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions tests/ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -697,12 +697,6 @@ Tests on type inference.

Tests for diagnostics on infinitely recursive types without indirection.

## `tests/ui/inherent-impls-overlap-check/`

Checks that repeating the same function names across separate `impl` blocks triggers an informative error, but not if the `impl` are for different types, such as `Bar<u8>` and `Bar<u16>`.

NOTE: This should maybe be a subdirectory within another related to duplicate definitions, such as `tests/ui/duplicate/`.

## `tests/ui/inline-const/`

These tests revolve around the inline `const` block that forces the compiler to const-eval its content.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! regression test for <https://github.com/rust-lang/rust/issues/34074>
//@ edition: 2015
//@ check-pass
// Make sure several unnamed function parameters don't conflict with each other
Expand All @@ -7,5 +8,4 @@ trait Tr {
fn f(u8, u8) {}
}

fn main() {
}
fn main() {}
10 changes: 10 additions & 0 deletions tests/ui/autoref-autoderef/autoderef-arc-boxed-closure-call.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//! regression test for <https://github.com/rust-lang/rust/issues/21306>
//@ run-pass

use std::sync::Arc;

fn main() {
let x = 5;
let command = Arc::new(Box::new(|| x * 2));
assert_eq!(command(), 10);
}
5 changes: 5 additions & 0 deletions tests/ui/consts/const-closure-fn-trait-object.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//! regression test for <https://github.com/rust-lang/rust/issues/27268>
//@ run-pass
fn main() {
const _C: &'static dyn Fn() = &|| {};
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! regression test for <https://github.com/rust-lang/rust/issues/19097>
//@ check-pass
#![allow(dead_code)]
// regression test for #19097

struct Foo<T>(T);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
//! regression test for <https://github.com/rust-lang/rust/issues/24161>
//@ check-pass
#![allow(dead_code)]
#[derive(Copy,Clone)]
#[derive(Copy, Clone)]
struct Functions {
a: fn(u32) -> u32,
b: extern "C" fn(u32) -> u32,
c: unsafe fn(u32) -> u32,
d: unsafe extern "C" fn(u32) -> u32
d: unsafe extern "C" fn(u32) -> u32,
}

pub fn main() {}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! regression test for <https://github.com/rust-lang/rust/issues/23036>
//@ run-pass

use std::collections::HashMap;
Expand Down
16 changes: 16 additions & 0 deletions tests/ui/inference/inference-thread-loop-closure.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//! regression test for <https://github.com/rust-lang/rust/issues/20454>
//@ check-pass
#![allow(unused_must_use)]
use std::thread;

fn _foo() {
thread::spawn(move || {
// no need for -> ()
loop {
println!("hello");
}
})
.join();
}

fn main() {}
13 changes: 0 additions & 13 deletions tests/ui/issues/issue-20454.rs

This file was deleted.

9 changes: 0 additions & 9 deletions tests/ui/issues/issue-21306.rs

This file was deleted.

11 changes: 0 additions & 11 deletions tests/ui/issues/issue-21891.rs

This file was deleted.

4 changes: 0 additions & 4 deletions tests/ui/issues/issue-27268.rs

This file was deleted.

9 changes: 0 additions & 9 deletions tests/ui/issues/issue-50471.rs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! regression test for <https://github.com/rust-lang/rust/issues/29540>
//@ build-pass
#[derive(Debug)]
pub struct Config {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! regression test for <https://github.com/rust-lang/rust/issues/26646>
//@ check-pass
#![deny(unused_attributes)]

Expand All @@ -9,4 +10,4 @@ pub struct Foo;
#[repr(C)]
pub struct Bar;

fn main() { }
fn main() {}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! regression test for <https://github.com/rust-lang/rust/issues/37686>
//@ run-pass
fn main() {
match (0, 0) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! regression test for <https://github.com/rust-lang/rust/issues/38987>
//@ run-pass
fn main() {
let _ = -0x8000_0000_0000_0000_0000_0000_0000_0000i128;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
//! regression test for <https://github.com/rust-lang/rust/issues/18352>
//@ run-pass

const X: &'static str = "12345";

fn test(s: String) -> bool {
match &*s {
X => true,
_ => false
_ => false,
}
}

Expand Down
10 changes: 10 additions & 0 deletions tests/ui/static/static-array-shared-slice-references.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//! regression test for <https://github.com/rust-lang/rust/issues/21891>
//@ build-pass
#![allow(dead_code)]

static FOO: [usize; 3] = [1, 2, 3];

static SLICE_1: &'static [usize] = &FOO;
static SLICE_2: &'static [usize] = &FOO;

fn main() {}
10 changes: 10 additions & 0 deletions tests/ui/str/raw-string-literal-unescaped-unicode.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//! regression test for <https://github.com/rust-lang/rust/issues/50471>
//@ check-pass

fn main() {
assert!({ false });

Comment on lines +4 to +6
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put it in the str directory because of the two assert! statements below, but this assert!({ false }) seems a bit out of place. 🤔 Would somewhere else be better?

assert!(r"\u{41}" == "A");

assert!(r"\u{".is_empty());
}
Loading