@@ -19,9 +19,6 @@ use std::marker::Send;
1919
2020struct Outer < T : Send > ( T ) ;
2121
22- struct TestType ;
23- impl !Send for TestType { }
24-
2522struct Outer2 < T > ( T ) ;
2623
2724unsafe impl < T : Send > Sync for Outer2 < T > { }
@@ -30,29 +27,41 @@ fn is_send<T: Send>(_: T) {}
3027fn is_sync < T : Sync > ( _: T ) { }
3128
3229fn dummy ( ) {
30+ struct TestType ;
31+ impl !Send for TestType { }
32+
3333 Outer ( TestType ) ;
34- //~^ ERROR the trait `core::marker::Send` is not implemented for the type `TestType`
34+ //~^ ERROR the trait `core::marker::Send` is not implemented for the type `dummy:: TestType`
3535
3636 is_send ( TestType ) ;
37- //~^ ERROR the trait `core::marker::Send` is not implemented for the type `TestType`
37+ //~^ ERROR the trait `core::marker::Send` is not implemented for the type `dummy:: TestType`
3838
3939 is_send ( ( 8 , TestType ) ) ;
40- //~^ ERROR the trait `core::marker::Send` is not implemented for the type `TestType`
40+ //~^ ERROR the trait `core::marker::Send` is not implemented for the type `dummy:: TestType`
4141}
4242
4343fn dummy2 ( ) {
44+ struct TestType ;
45+ impl !Send for TestType { }
46+
4447 is_send ( Box :: new ( TestType ) ) ;
45- //~^ ERROR the trait `core::marker::Send` is not implemented for the type `TestType`
48+ //~^ ERROR the trait `core::marker::Send` is not implemented for the type `dummy2:: TestType`
4649}
4750
4851fn dummy3 ( ) {
52+ struct TestType ;
53+ impl !Send for TestType { }
54+
4955 is_send ( Box :: new ( Outer2 ( TestType ) ) ) ;
50- //~^ ERROR the trait `core::marker::Send` is not implemented for the type `TestType`
56+ //~^ ERROR the trait `core::marker::Send` is not implemented for the type `dummy3:: TestType`
5157}
5258
5359fn main ( ) {
60+ struct TestType ;
61+ impl !Send for TestType { }
62+
5463 // This will complain about a missing Send impl because `Sync` is implement *just*
5564 // for T that are `Send`. Look at #20366 and #19950
5665 is_sync ( Outer2 ( TestType ) ) ;
57- //~^ ERROR the trait `core::marker::Send` is not implemented for the type `TestType`
66+ //~^ ERROR the trait `core::marker::Send` is not implemented for the type `main:: TestType`
5867}
0 commit comments