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