Skip to content

Commit 0f9af7e

Browse files
committed
cleaned up some tests
1 parent 8072811 commit 0f9af7e

17 files changed

+83
-74
lines changed

tests/ui/empty-allocation-non-null.rs renamed to tests/ui/allocator/empty-alloc-nonnull-guarantee.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
//! Check that the default global Rust allocator produces non-null Box allocations for ZSTs.
2+
//!
3+
//! See https://github.com/rust-lang/rust/issues/11998
4+
15
//@ run-pass
26

37
pub fn main() {

tests/ui/diverging-fn-tail-35849.rs

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/ui/early-ret-binop-add.rs

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/ui/elide-errors-on-mismatched-tuple.rs

Lines changed: 0 additions & 18 deletions
This file was deleted.

tests/ui/elided-test.rs

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/ui/elided-test.stderr

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/ui/else-if.rs

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//! Test early return within binary operation expressions
2+
3+
//@ run-pass
4+
5+
#![allow(dead_code)]
6+
#![allow(unreachable_code)]
7+
8+
use std::ops::Add;
9+
10+
/// Function that performs addition with an early return in the right operand
11+
fn add_with_early_return<T: Add<Output = T> + Copy>(n: T) -> T {
12+
n + { return n }
13+
}
14+
15+
pub fn main() {
16+
// Test with different numeric types to ensure generic behavior works
17+
let _result1 = add_with_early_return(42i32);
18+
let _result2 = add_with_early_return(3.14f64);
19+
}

tests/ui/double-type-import.rs renamed to tests/ui/imports/duplicate-use-bindings.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Test that duplicate use bindings in same namespace produce error
2+
13
mod foo {
24
pub use self::bar::X;
35
use self::bar::X;

tests/ui/double-type-import.stderr renamed to tests/ui/imports/duplicate-use-bindings.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0252]: the name `X` is defined multiple times
2-
--> $DIR/double-type-import.rs:3:9
2+
--> $DIR/duplicate-use-bindings.rs:5:9
33
|
44
LL | pub use self::bar::X;
55
| ------------ previous import of the type `X` here

0 commit comments

Comments
 (0)