// Copyright 2015 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 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. #![feature(optin_builtin_traits)] use std::marker::Send; struct Outer(T); struct TestType; impl !Send for TestType {} struct Outer2(T); unsafe impl Sync for Outer2 {} fn is_send(_: T) {} fn is_sync(_: T) {} fn main() { Outer(TestType); //~^ ERROR the trait `core::marker::Send` is not implemented for the type `TestType` is_send(TestType); //~^ ERROR the trait `core::marker::Send` is not implemented for the type `TestType` // This will complain about a missing Send impl because `Sync` is implement *just* // for T that are `Send`. Look at #20366 and #19950 is_sync(Outer2(TestType)); //~^ ERROR the trait `core::marker::Send` is not implemented for the type `TestType` }