diff options
Diffstat (limited to 'tests/ui/binding/underscore-prefixed-function-argument.rs')
| -rw-r--r-- | tests/ui/binding/underscore-prefixed-function-argument.rs | 15 | 
1 files changed, 15 insertions, 0 deletions
| diff --git a/tests/ui/binding/underscore-prefixed-function-argument.rs b/tests/ui/binding/underscore-prefixed-function-argument.rs new file mode 100644 index 00000000000..e5b2ec1b5f0 --- /dev/null +++ b/tests/ui/binding/underscore-prefixed-function-argument.rs @@ -0,0 +1,15 @@ +//! Test that argument names starting with `_` are usable. + +//@ run-pass + +fn good(_a: &isize) {} + +fn called<F>(_f: F) +where + F: FnOnce(&isize), +{ +} + +pub fn main() { + called(good); +} | 
