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.
|
|
|
|
|
2013-10-23 03:49:18 -05:00
|
|
|
|
2014-10-02 00:10:09 -05:00
|
|
|
use std::rc::Rc;
|
2014-06-11 21:33:52 -05:00
|
|
|
|
2015-01-08 05:02:42 -06:00
|
|
|
fn foo(_x: Rc<usize>) {}
|
2012-05-07 13:31:57 -05:00
|
|
|
|
2014-11-26 07:12:18 -06:00
|
|
|
fn bar<F:FnOnce() + Send>(_: F) { }
|
2014-11-07 19:23:33 -06:00
|
|
|
|
2014-11-26 07:12:18 -06:00
|
|
|
fn main() {
|
2015-03-03 02:42:26 -06:00
|
|
|
let x = Rc::new(3);
|
2014-12-23 03:57:44 -06:00
|
|
|
bar(move|| foo(x));
|
2015-01-06 16:33:42 -06:00
|
|
|
//~^ ERROR `core::marker::Send` is not implemented
|
2013-02-14 13:47:00 -06:00
|
|
|
}
|
2014-11-07 19:23:33 -06:00
|
|
|
|