diff options
| author | bors <bors@rust-lang.org> | 2015-05-02 06:22:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-05-02 06:22:41 +0000 |
| commit | f0af2ec99c42a2e49af455c404c3ba92d75b271d (patch) | |
| tree | 9c51311e2a89ec3373f5edf62d85d40732c7a06f | |
| parent | 700b4c160bebb812951387074331a71d54805db0 (diff) | |
| parent | 3e83f2bc789a8efeed3bb25a0044b8d829c0ae0a (diff) | |
| download | rust-f0af2ec99c42a2e49af455c404c3ba92d75b271d.tar.gz rust-f0af2ec99c42a2e49af455c404c3ba92d75b271d.zip | |
Auto merge of #24980 - jooert:test-22468, r=pnkfelix
Closes #22468.
| -rw-r--r-- | src/test/compile-fail/issue-22468.rs | 19 |
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 +} |
