Skip to content

Commit a99bd4d

Browse files
committed
---
yaml --- r: 187630 b: refs/heads/tmp c: bd511f7 h: refs/heads/master v: v3
1 parent e4999da commit a99bd4d

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 522d09dfecbeca1595f25ac58c6d0178bbd21d7d
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: ad3e748128dc52d55820acc07aa034f61f90006d
37+
refs/heads/tmp: bd511f73be526640ae98012d302201a019f9b458
3838
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/tmp/src/libcore/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
#![feature(staged_api)]
6969
#![feature(unboxed_closures)]
7070
#![feature(rustc_attrs)]
71+
#![feature(optin_builtin_traits)]
7172

7273
#[macro_use]
7374
mod macros;

branches/tmp/src/libcore/marker.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ pub unsafe trait Send : MarkerTrait {
4949
// empty.
5050
}
5151

52+
impl<T> !Send for *const T { }
53+
impl<T> !Send for *mut T { }
54+
5255
/// Types with a constant size known at compile-time.
5356
#[stable(feature = "rust1", since = "1.0.0")]
5457
#[lang="sized"]
@@ -214,6 +217,9 @@ pub unsafe trait Sync : MarkerTrait {
214217
// Empty
215218
}
216219

220+
impl<T> !Sync for *const T { }
221+
impl<T> !Sync for *mut T { }
222+
217223
/// A type which is considered "not POD", meaning that it is not
218224
/// implicitly copyable. This is typically embedded in other types to
219225
/// ensure that they are never copied, even if they lack a destructor.

branches/tmp/src/librustc/middle/traits/select.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,8 +1377,10 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
13771377

13781378
ty::BoundSync |
13791379
ty::BoundSend => {
1380-
// sync and send are not implemented for *const, *mut
1381-
Err(Unimplemented)
1380+
self.tcx().sess.bug(
1381+
&format!(
1382+
"raw pointers should have a negative \
1383+
impl for `Send` and `Sync`")[]);
13821384
}
13831385
}
13841386
}

0 commit comments

Comments
 (0)