diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2023-02-25 08:39:05 +0000 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2023-02-25 10:12:20 +0000 |
| commit | ed34354bfa4f98da2883fdbba4453c571dde1ef7 (patch) | |
| tree | 31efc301ffb740635abc3c90d47b3e7cad0d3643 /tests | |
| parent | bd4a96a12d0bf6dc12edf20a45df3a33052c9d7d (diff) | |
| download | rust-ed34354bfa4f98da2883fdbba4453c571dde1ef7.tar.gz rust-ed34354bfa4f98da2883fdbba4453c571dde1ef7.zip | |
Do not lint unresolved trait for ineffective unstable trait impl
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/stability-attribute/unresolved_stability_lint.rs | 8 | ||||
| -rw-r--r-- | tests/ui/stability-attribute/unresolved_stability_lint.stderr | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/stability-attribute/unresolved_stability_lint.rs b/tests/ui/stability-attribute/unresolved_stability_lint.rs new file mode 100644 index 00000000000..818d228bc91 --- /dev/null +++ b/tests/ui/stability-attribute/unresolved_stability_lint.rs @@ -0,0 +1,8 @@ +#![feature(staged_api)] +#![stable(feature = "uwu", since = "1.0.0")] + +#[unstable(feature = "foo", issue = "none")] +impl Foo for () {} +//~^ ERROR cannot find trait `Foo` in this scope + +fn main() {} diff --git a/tests/ui/stability-attribute/unresolved_stability_lint.stderr b/tests/ui/stability-attribute/unresolved_stability_lint.stderr new file mode 100644 index 00000000000..11d6abcaf36 --- /dev/null +++ b/tests/ui/stability-attribute/unresolved_stability_lint.stderr @@ -0,0 +1,9 @@ +error[E0405]: cannot find trait `Foo` in this scope + --> $DIR/unresolved_stability_lint.rs:5:6 + | +LL | impl Foo for () {} + | ^^^ not found in this scope + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0405`. |
