Skip to content

Commit

Permalink
Fold test_deprecated into test_lints
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Dec 7, 2024
1 parent 70a1261 commit 2096b11
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
10 changes: 0 additions & 10 deletions tests/test_deprecated.rs

This file was deleted.

15 changes: 15 additions & 0 deletions tests/test_lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,18 @@ fn test_needless_lifetimes() {

let _: MyError;
}

#[test]
fn test_deprecated() {
#![deny(deprecated)]

#[derive(Error, Debug)]
pub enum MyError {
#[deprecated]
#[error("...")]
Deprecated,
}

#[allow(deprecated)]
let _ = MyError::Deprecated;
}

0 comments on commit 2096b11

Please sign in to comment.