Skip to content

Commit e1d9080

Browse files
committed
Migrate the issue-149402-no-suggest-unstable test from a run-make test to a UI test
1 parent 50ace25 commit e1d9080

7 files changed

Lines changed: 37 additions & 69 deletions

File tree

‎tests/run-make/issue-149402-suggest-unresolve/foo.rs‎

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

‎tests/run-make/issue-149402-suggest-unresolve/nightly.err‎

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

‎tests/run-make/issue-149402-suggest-unresolve/output.diff‎

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

‎tests/run-make/issue-149402-suggest-unresolve/rmake.rs‎

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
error[E0433]: cannot find type `Complete` in this scope
2+
--> $DIR/dont-suggest-unstable-type.rs:14:12
3+
|
4+
LL | x.push(Complete::Item { name: "hello" });
5+
| ^^^^^^^^ use of undeclared type `Complete`
6+
|
7+
help: there is an enum variant `std::ops::CoroutineState::Complete`; try using the variant's enum
8+
|
9+
LL - x.push(Complete::Item { name: "hello" });
10+
LL + x.push(std::ops::CoroutineState::Item { name: "hello" });
11+
|
12+
13+
error: aborting due to 1 previous error
14+
15+
For more information about this error, try `rustc --explain E0433`.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//! Check that unstable name-resolution suggestions are omitted on stable.
2+
//!
3+
//! Regression test for <https://github.com/rust-lang/rust/issues/149402>.
4+
//!
5+
//@ needs-target-std
6+
//@ ignore-backends: gcc
7+
8+
//@ revisions: stable nightly
9+
//@[stable] act-as-stable
10+
//@[nightly] only-nightly
11+
12+
fn foo() {
13+
let x = Vec::new();
14+
x.push(Complete::Item { name: "hello" });
15+
//~^ ERROR: cannot find type `Complete` in this scope
16+
}
17+
18+
fn main() {}

tests/run-make/issue-149402-suggest-unresolve/stable.err renamed to tests/ui/resolve/suggestions/dont-suggest-unstable-type.stable.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0433]: cannot find type `Complete` in this scope
2-
--> foo.rs:3:12
3-
|
4-
3 | x.push(Complete::Item { name: "hello" });
5-
| ^^^^^^^^ use of undeclared type `Complete`
2+
--> $DIR/dont-suggest-unstable-type.rs:14:12
3+
|
4+
LL | x.push(Complete::Item { name: "hello" });
5+
| ^^^^^^^^ use of undeclared type `Complete`
66

77
error: aborting due to 1 previous error
88

0 commit comments

Comments
 (0)