2012-12-10 19:32:48 -06:00
|
|
|
// Copyright 2012 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.
|
|
|
|
|
2014-10-14 20:07:11 -05:00
|
|
|
fn send<T:Send + std::fmt::Show>(ch: _chan<T>, data: T) {
|
2014-12-20 02:09:35 -06:00
|
|
|
println!("{:?}", ch);
|
|
|
|
println!("{:?}", data);
|
2014-10-09 14:17:22 -05:00
|
|
|
panic!();
|
2011-12-22 16:42:52 -06:00
|
|
|
}
|
2012-04-30 12:37:58 -05:00
|
|
|
|
2014-12-30 22:32:49 -06:00
|
|
|
#[derive(Show)]
|
2013-03-07 18:36:30 -06:00
|
|
|
struct _chan<T>(int);
|
2011-08-17 18:58:00 -05:00
|
|
|
|
2011-12-22 19:53:53 -06:00
|
|
|
// Tests that "log(debug, message);" is flagged as using
|
2011-08-17 18:58:00 -05:00
|
|
|
// message after the send deinitializes it
|
2014-05-05 20:56:44 -05:00
|
|
|
fn test00_start(ch: _chan<Box<int>>, message: Box<int>, _count: Box<int>) {
|
2013-01-10 12:59:58 -06:00
|
|
|
send(ch, message);
|
2014-10-14 20:07:11 -05:00
|
|
|
println!("{}", message); //~ ERROR use of moved value: `message`
|
2011-08-17 18:58:00 -05:00
|
|
|
}
|
|
|
|
|
2014-10-09 14:17:22 -05:00
|
|
|
fn main() { panic!(); }
|