-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b4c77b0
commit 95f326a
Showing
3 changed files
with
23 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// See https://github.com/andrewhickman/fn-error-context | ||
#![deny(dead_code)] | ||
|
||
use fn_error_context::context; | ||
|
||
#[context("context")] | ||
fn do_stuff() -> anyhow::Result<()> { | ||
anyhow::bail!("error") | ||
} | ||
|
||
fn main() {} |
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,11 @@ | ||
error: function is never used: `do_stuff` | ||
--> $DIR/preserve_lint.rs:7:4 | ||
| | ||
7 | fn do_stuff() -> anyhow::Result<()> { | ||
| ^^^^^^^^ | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/preserve_lint.rs:2:9 | ||
| | ||
2 | #![deny(dead_code)] | ||
| ^^^^^^^^^ |
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