diff options
| author | Mark Nieweglowski <muth@exego.ca> | 2018-12-22 01:06:02 -0500 |
|---|---|---|
| committer | Mark Nieweglowski <muth@exego.ca> | 2018-12-22 01:06:02 -0500 |
| commit | d395d45ca753099c2ff952604169a1602eae898a (patch) | |
| tree | 51c825d8fbcce2dd1df8264de4afc7f29a38045b | |
| parent | a24853709a44c4e4f4e811c315ace8ef082a4ec0 (diff) | |
| download | rust-d395d45ca753099c2ff952604169a1602eae898a.tar.gz rust-d395d45ca753099c2ff952604169a1602eae898a.zip | |
test: panic at map_unit_fn.rs:202 for map() without args
| -rw-r--r-- | tests/ui/map_unit_fn.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/map_unit_fn.rs b/tests/ui/map_unit_fn.rs new file mode 100644 index 00000000000..1d203a147ba --- /dev/null +++ b/tests/ui/map_unit_fn.rs @@ -0,0 +1,20 @@ +// Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![allow(unused)] +struct Mappable {} + +impl Mappable { + pub fn map(&self) {} +} + +fn main() { + let m = Mappable {}; + m.map(); +} |
