-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move negative_impls test from run-pass to ui
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
tests/run-pass/negative_impls.rs → tests/ui/unstable-features/negative_impls.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
error: cross-crate traits with a default impl, like `Unpin`, should not be specialized | ||
--> tests/ui/unstable-features/negative_impls.rs:17:1 | ||
| | ||
17 | impl Unpin for Foo<MyPhantomPinned, ()> {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: the lint level is defined here | ||
--> tests/ui/unstable-features/negative_impls.rs:2:9 | ||
| | ||
2 | #![deny(suspicious_auto_trait_impls)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
= warning: this will change its meaning in a future release! | ||
= note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367> | ||
= note: `MyPhantomPinned` is not a generic parameter | ||
note: try using the same sequence of generic parameters as the struct definition | ||
--> tests/ui/unstable-features/negative_impls.rs:8:1 | ||
| | ||
8 | / struct Foo<Pinned, Unpinned> { | ||
9 | | #[pin] | ||
10 | | pinned: Pinned, | ||
11 | | | ||
12 | | unpinned: Unpinned, | ||
13 | | } | ||
| |_^ |