diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2015-03-24 15:36:59 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2015-03-30 04:59:56 -0400 |
| commit | d6466ff13aef6af45f24f28e23f2f3dd36c96cf0 (patch) | |
| tree | a4f0ffb7eef1074bec8e72219b7b9fb555c82c81 /src/test/compile-fail | |
| parent | d649292e601a47b3b602415a2e9d9b6ebc298d45 (diff) | |
| download | rust-d6466ff13aef6af45f24f28e23f2f3dd36c96cf0.tar.gz rust-d6466ff13aef6af45f24f28e23f2f3dd36c96cf0.zip | |
Driveby cleanup of the impl for negation, which had some kind of
surprising casts. This version more obviously corresponds to the builtin semantics.
Diffstat (limited to 'src/test/compile-fail')
| -rw-r--r-- | src/test/compile-fail/issue-13352.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/test/compile-fail/issue-13352.rs b/src/test/compile-fail/issue-13352.rs new file mode 100644 index 00000000000..a8c8c8b40c1 --- /dev/null +++ b/src/test/compile-fail/issue-13352.rs @@ -0,0 +1,28 @@ +// Copyright 2014 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. + +// pretty-expanded FIXME #23616 + +#![feature(std_misc, libc)] + +extern crate libc; + +use std::thunk::Thunk; + +fn foo(_: Thunk) {} + +fn main() { + foo(loop { + unsafe { libc::exit(0 as libc::c_int); } + }); + 2_usize + (loop {}); + //~^ ERROR E0277 + //~| ERROR E0277 +} |
