diff options
| author | Michael Howell <michael@notriddle.com> | 2022-11-23 17:57:11 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2022-11-23 17:57:11 -0700 |
| commit | 97d95d48e2ef72d9ededeb5821f0bfcbd8fcf7c6 (patch) | |
| tree | 51f811f73608b003a16d803f24ac0a1f86dcf674 /src/test | |
| parent | 80b3c6dbde3ff89a44f8eaa63e08054398b30ecd (diff) | |
| download | rust-97d95d48e2ef72d9ededeb5821f0bfcbd8fcf7c6.tar.gz rust-97d95d48e2ef72d9ededeb5821f0bfcbd8fcf7c6.zip | |
lint: do not warn unused parens around higher-ranked function pointers
Fixes #104397
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/lint/unused/issue-104397.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/lint/unused/issue-104397.rs b/src/test/ui/lint/unused/issue-104397.rs new file mode 100644 index 00000000000..94e15cd96bc --- /dev/null +++ b/src/test/ui/lint/unused/issue-104397.rs @@ -0,0 +1,18 @@ +// check-pass + +#![warn(unused)] +#![deny(warnings)] + +struct Inv<'a>(&'a mut &'a ()); + +trait Trait {} +impl Trait for for<'a> fn(Inv<'a>) {} + +fn with_bound() +where + (for<'a> fn(Inv<'a>)): Trait, +{} + +fn main() { + with_bound(); +} |
