forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#114514 - matthiaskrgr:rollup-1rv4f3h, r=matth…
…iaskrgr Rollup of 3 pull requests Successful merges: - rust-lang#114029 (Explain more clearly why `fn() -> T` can't be `#[derive(Clone)]`) - rust-lang#114248 (Make lint missing-copy-implementations honor negative `Copy` impls) - rust-lang#114498 (Print tidy command with bless tidy check failure) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
4 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
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
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
15 changes: 15 additions & 0 deletions
15
tests/ui/lint/missing-copy-implementations-negative-copy.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Regression test for issue #101980. | ||
// Ensure that we don't suggest impl'ing `Copy` for a type if it already impl's `!Copy`. | ||
|
||
// check-pass | ||
|
||
#![feature(negative_impls)] | ||
#![deny(missing_copy_implementations)] | ||
|
||
pub struct Struct { | ||
pub field: i32, | ||
} | ||
|
||
impl !Copy for Struct {} | ||
|
||
fn main() {} |