Skip to content

Commit 60798d6

Browse files
authored
Unrolled build for #144151
Rollup merge of #144151 - Kivooeo:issue1, r=jieyouxu `tests/ui/issues/`: The Issues Strike Back [1/N] I believe I’ve finally brought [my program](https://github.com/Kivooeo/test-manager) to life -- it now handles multiple test moves in one go: plain moves first, then a gentle touch on each file depends on given options. The process should be much smoother now. Of course, I won’t rush through everything in a few days -- that would be unkind to `@Oneirical.` I’ll pace myself. And also I can't have more than one such PR because `issues.txt` will conflict with previous parts after merging them which is not fun as well. This PR is just that: first commit - moves; second - regression comments and the occasional .stderr reblesses, also issue.txt and tidy changes. Nothing special, but progress nonetheless. This is for the purpose of preserving test file history during restructuring Part of #133895. r? `@jieyouxu`
2 parents d242a8b + e9959aa commit 60798d6

File tree

40 files changed

+152
-32
lines changed

40 files changed

+152
-32
lines changed

tests/ui/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,10 @@ These tests revolve around command-line flags which change the way error/warning
412412

413413
Exercises `#[diagnostic::*]` namespaced attributes. See [RFC 3368 Diagnostic attribute namespace](https://github.com/rust-lang/rfcs/blob/master/text/3368-diagnostic-attribute-namespace.md).
414414

415+
## `tests/ui/diagnostics-infra`
416+
417+
This directory contains tests and infrastructure related to the diagnostics system, including support for translatable diagnostics
418+
415419
## `tests/ui/diagnostic-width/`: `--diagnostic-width`
416420

417421
Everything to do with `--diagnostic-width`.

tests/ui/issues/issue-11192.rs renamed to tests/ui/borrowck/closure-borrow-conflict-11192.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/11192
2+
13
struct Foo {
24
x: isize
35
}

tests/ui/issues/issue-11192.stderr renamed to tests/ui/borrowck/closure-borrow-conflict-11192.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0502]: cannot borrow `*ptr` as immutable because it is also borrowed as mutable
2-
--> $DIR/issue-11192.rs:20:10
2+
--> $DIR/closure-borrow-conflict-11192.rs:22:10
33
|
44
LL | let mut test = |foo: &Foo| {
55
| ----------- mutable borrow occurs here

tests/ui/issues/issue-11085.rs renamed to tests/ui/cfg/conditional-compilation-struct-11085.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/11085
2+
13
//@ run-pass
24

35
#![allow(dead_code)]

tests/ui/issues/issue-11205.rs renamed to tests/ui/coercion/trait-object-arrays-11205.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/11205
2+
13
//@ run-pass
24

35
#![allow(dead_code)]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/106755
2+
3+
//@ compile-flags:-Ztranslate-lang=en_US
4+
5+
#![feature(negative_impls)]
6+
#![feature(marker_trait_attr)]
7+
8+
#[marker]
9+
trait MyTrait {}
10+
11+
struct TestType<T>(::std::marker::PhantomData<T>);
12+
13+
unsafe impl<T: MyTrait + 'static> Send for TestType<T> {}
14+
15+
impl<T: MyTrait> !Send for TestType<T> {}
16+
//~^ ERROR found both positive and negative implementation
17+
//~| ERROR `!Send` impl requires `T: MyTrait` but the struct it is implemented for does not
18+
19+
unsafe impl<T: 'static> Send for TestType<T> {} //~ ERROR conflicting implementations
20+
21+
impl !Send for TestType<i32> {}
22+
//~^ ERROR `!Send` impls cannot be specialized
23+
24+
fn main() {}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
error[E0751]: found both positive and negative implementation of trait `Send` for type `TestType<_>`:
2+
--> $DIR/primary-fluent-bundle-missing.rs:15:1
3+
|
4+
LL | unsafe impl<T: MyTrait + 'static> Send for TestType<T> {}
5+
| ------------------------------------------------------ positive implementation here
6+
LL |
7+
LL | impl<T: MyTrait> !Send for TestType<T> {}
8+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ negative implementation here
9+
10+
error[E0119]: conflicting implementations of trait `Send` for type `TestType<_>`
11+
--> $DIR/primary-fluent-bundle-missing.rs:19:1
12+
|
13+
LL | unsafe impl<T: MyTrait + 'static> Send for TestType<T> {}
14+
| ------------------------------------------------------ first implementation here
15+
...
16+
LL | unsafe impl<T: 'static> Send for TestType<T> {}
17+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `TestType<_>`
18+
19+
error[E0367]: `!Send` impl requires `T: MyTrait` but the struct it is implemented for does not
20+
--> $DIR/primary-fluent-bundle-missing.rs:15:9
21+
|
22+
LL | impl<T: MyTrait> !Send for TestType<T> {}
23+
| ^^^^^^^
24+
|
25+
note: the implementor must specify the same requirement
26+
--> $DIR/primary-fluent-bundle-missing.rs:11:1
27+
|
28+
LL | struct TestType<T>(::std::marker::PhantomData<T>);
29+
| ^^^^^^^^^^^^^^^^^^
30+
31+
error[E0366]: `!Send` impls cannot be specialized
32+
--> $DIR/primary-fluent-bundle-missing.rs:21:1
33+
|
34+
LL | impl !Send for TestType<i32> {}
35+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36+
|
37+
= note: `i32` is not a generic parameter
38+
note: use the same sequence of generic lifetime, type and const parameters as the struct definition
39+
--> $DIR/primary-fluent-bundle-missing.rs:11:1
40+
|
41+
LL | struct TestType<T>(::std::marker::PhantomData<T>);
42+
| ^^^^^^^^^^^^^^^^^^
43+
44+
error: aborting due to 4 previous errors
45+
46+
Some errors have detailed explanations: E0119, E0366, E0367, E0751.
47+
For more information about an error, try `rustc --explain E0119`.

tests/ui/issues/issue-10734.rs renamed to tests/ui/drop/conditional-drop-10734.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/10734
2+
13
//@ run-pass
24
#![allow(non_upper_case_globals)]
35

tests/ui/issues/issue-10802.rs renamed to tests/ui/drop/trait-object-drop-10802.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/10802
2+
13
//@ run-pass
24
#![allow(dead_code)]
35

tests/ui/issues/issue-10764.rs renamed to tests/ui/extern/extern-rust-fn-type-error-10764.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/10764
2+
13
fn f(_: extern "Rust" fn()) {}
24
extern "C" fn bar() {}
35

0 commit comments

Comments
 (0)