about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorJohannes Oertel <johannes.oertel@uni-due.de>2015-04-30 12:24:56 +0200
committerJohannes Oertel <johannes.oertel@uni-due.de>2015-04-30 12:24:56 +0200
commit3e83f2bc789a8efeed3bb25a0044b8d829c0ae0a (patch)
tree0418e2bd93cfbf84ecd39b798d7a07780b807227 /src/test
parentb59403606953d01391c1faa38d96062e3dfafa3d (diff)
downloadrust-3e83f2bc789a8efeed3bb25a0044b8d829c0ae0a.tar.gz
rust-3e83f2bc789a8efeed3bb25a0044b8d829c0ae0a.zip
Add regression test for #22468
Closes #22468.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/issue-22468.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/compile-fail/issue-22468.rs b/src/test/compile-fail/issue-22468.rs
new file mode 100644
index 00000000000..50e5dd2955d
--- /dev/null
+++ b/src/test/compile-fail/issue-22468.rs
@@ -0,0 +1,19 @@
+// 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.
+
+fn main() {
+    let foo = "bar";
+    let x = foo("baz");
+    //~^ ERROR: expected function, found `&str`
+}
+
+fn foo(file: &str) -> bool {
+    true
+}