Skip to content

Commit c0597fb

Browse files
committed
cleaned up some tests
Reverting file name weird-exprs.rs due to its historical use, recognition in community and references
1 parent b7d024b commit c0597fb

9 files changed

+22
-16
lines changed

tests/ui/diagnostic-flags/deduplicate-diagnostics.deduplicate.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0452]: malformed lint attribute input
2-
--> $DIR/deduplicate-diagnostics.rs:8:8
2+
--> $DIR/deduplicate-diagnostics.rs:10:8
33
|
44
LL | #[deny("literal")]
55
| ^^^^^^^^^ bad attribute argument
66

77
error: cannot find derive macro `Unresolved` in this scope
8-
--> $DIR/deduplicate-diagnostics.rs:4:10
8+
--> $DIR/deduplicate-diagnostics.rs:6:10
99
|
1010
LL | #[derive(Unresolved)]
1111
| ^^^^^^^^^^

tests/ui/diagnostic-flags/deduplicate-diagnostics.duplicate.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
error[E0452]: malformed lint attribute input
2-
--> $DIR/deduplicate-diagnostics.rs:8:8
2+
--> $DIR/deduplicate-diagnostics.rs:10:8
33
|
44
LL | #[deny("literal")]
55
| ^^^^^^^^^ bad attribute argument
66

77
error: cannot find derive macro `Unresolved` in this scope
8-
--> $DIR/deduplicate-diagnostics.rs:4:10
8+
--> $DIR/deduplicate-diagnostics.rs:6:10
99
|
1010
LL | #[derive(Unresolved)]
1111
| ^^^^^^^^^^
1212

1313
error: cannot find derive macro `Unresolved` in this scope
14-
--> $DIR/deduplicate-diagnostics.rs:4:10
14+
--> $DIR/deduplicate-diagnostics.rs:6:10
1515
|
1616
LL | #[derive(Unresolved)]
1717
| ^^^^^^^^^^
1818
|
1919
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2020

2121
error[E0452]: malformed lint attribute input
22-
--> $DIR/deduplicate-diagnostics.rs:8:8
22+
--> $DIR/deduplicate-diagnostics.rs:10:8
2323
|
2424
LL | #[deny("literal")]
2525
| ^^^^^^^^^ bad attribute argument
2626
|
2727
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2828

2929
error[E0452]: malformed lint attribute input
30-
--> $DIR/deduplicate-diagnostics.rs:8:8
30+
--> $DIR/deduplicate-diagnostics.rs:10:8
3131
|
3232
LL | #[deny("literal")]
3333
| ^^^^^^^^^ bad attribute argument

tests/ui/diagnostic-flags/deduplicate-diagnostics.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Test that `-Z deduplicate-diagnostics` flag properly deduplicates diagnostic messages.
2+
13
//@ revisions: duplicate deduplicate
24
//@[deduplicate] compile-flags: -Z deduplicate-diagnostics=yes
35

tests/ui/fmt/println-debug-different-types.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
//! Smoke test for println!() with debug format specifiers.
2+
13
//@ run-pass
24

35
#[derive(Debug)]
46
enum Numbers {
5-
Three
7+
Three,
68
}
79

810
pub fn main() {

tests/ui/linking/ld64-cross-compilation.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
//! This is a regression test for https://github.com/rust-lang/rust/issues/140686.
2+
//! Although this is a ld64(ld-classic) bug, we still need to support it
3+
//! due to cross-compilation and support for older Xcode.
4+
15
//@ compile-flags: -Copt-level=3 -Ccodegen-units=256 -Clink-arg=-ld_classic
26
//@ run-pass
37
//@ only-x86_64-apple-darwin
48

5-
// This is a regression test for https://github.com/rust-lang/rust/issues/140686.
6-
// Although this is a ld64(ld-classic) bug, we still need to support it
7-
// due to cross-compilation and support for older Xcode.
8-
99
fn main() {
1010
let dst: Vec<u8> = Vec::new();
1111
let len = broken_func(std::hint::black_box(2), dst);

tests/ui/shadowed/shadowing-generic-item.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Test that generic parameters shadow structs and modules with the same name.
2+
13
struct T { i: i32 }
24
fn f<T>() {
35
let t = T { i: 0 }; //~ ERROR expected struct, variant or union type, found type parameter `T`

tests/ui/shadowed/shadowing-generic-item.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0574]: expected struct, variant or union type, found type parameter `T`
2-
--> $DIR/lexical-scopes.rs:3:13
2+
--> $DIR/shadowing-generic-item.rs:5:13
33
|
44
LL | struct T { i: i32 }
55
| - you might have meant to refer to this struct
@@ -9,7 +9,7 @@ LL | let t = T { i: 0 };
99
| ^ not a struct, variant or union type
1010

1111
error[E0599]: no function or associated item named `f` found for type parameter `Foo` in the current scope
12-
--> $DIR/lexical-scopes.rs:10:10
12+
--> $DIR/shadowing-generic-item.rs:12:10
1313
|
1414
LL | fn g<Foo>() {
1515
| --- function or associated item `f` not found for this type parameter

tests/ui/symbol-names/struct-constructor-mangling.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Test that the symbol mangling of Foo-the-constructor-function versus Foo-the-type do not collide
2+
13
//@ run-pass
24

35
fn size_of_val<T>(_: &T) -> usize {
@@ -6,8 +8,6 @@ fn size_of_val<T>(_: &T) -> usize {
68

79
struct Foo(#[allow(dead_code)] i64);
810

9-
// Test that the (symbol) mangling of `Foo` (the `struct` type) and that of
10-
// `typeof Foo` (the function type of the `struct` constructor) don't collide.
1111
fn main() {
1212
size_of_val(&Foo(0));
1313
size_of_val(&Foo);

0 commit comments

Comments
 (0)