about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@gmail.com>2015-03-15 13:14:15 -0700
committerTamir Duberstein <tamird@gmail.com>2015-03-16 07:35:22 -0700
commitb9f5711a8a5dc4bf813ecf8d1c92e7e0512081dc (patch)
treec1f9417810cac861fb5d2086b418e7c7829eec80
parenta4fa901dab3d07e344004eceb789d779efe949fd (diff)
downloadrust-b9f5711a8a5dc4bf813ecf8d1c92e7e0512081dc.tar.gz
rust-b9f5711a8a5dc4bf813ecf8d1c92e7e0512081dc.zip
Regression test for #18919
Closes #18919.
-rw-r--r--src/test/compile-fail/issue-18919.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/compile-fail/issue-18919.rs b/src/test/compile-fail/issue-18919.rs
new file mode 100644
index 00000000000..8c2c52e6fad
--- /dev/null
+++ b/src/test/compile-fail/issue-18919.rs
@@ -0,0 +1,17 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// 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.
+
+type FuncType<'f> = Fn(&isize) -> isize + 'f;
+
+fn ho_func(f: Option<FuncType>) {
+    //~^ ERROR: the trait `core::marker::Sized` is not implemented for the type
+}
+
+fn main() {}