diff options
| author | est31 <MTest31@outlook.com> | 2016-12-20 03:34:36 +0100 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2016-12-20 03:34:36 +0100 |
| commit | 54f75c95722c12da32ca63301fe8548322018a97 (patch) | |
| tree | 9a521ecd2cc70fbafa1dc408c5dc3ef222e49d53 | |
| parent | 94ae2a2e6791e0c4ab6fba836b2b09a07f2d3c8a (diff) | |
| download | rust-54f75c95722c12da32ca63301fe8548322018a97.tar.gz rust-54f75c95722c12da32ca63301fe8548322018a97.zip | |
Add regression test for #38458
| -rw-r--r-- | src/test/compile-fail/issue-38458.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/compile-fail/issue-38458.rs b/src/test/compile-fail/issue-38458.rs new file mode 100644 index 00000000000..56eb5f874cd --- /dev/null +++ b/src/test/compile-fail/issue-38458.rs @@ -0,0 +1,15 @@ +// Copyright 2016 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. + +const x: () = { + return; //~ ERROR return statement outside of function body +}; + +fn main() {} |
