Skip to content

Commit 22cc06c

Browse files
committed
---
yaml --- r: 185743 b: refs/heads/auto c: 7ae8889 h: refs/heads/master i: 185741: 94d5ada 185739: 365a9a1 185735: 1067e41 185727: b7d67c9 v: v3
1 parent a358176 commit 22cc06c

File tree

4 files changed

+10
-18
lines changed

4 files changed

+10
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: bd511f73be526640ae98012d302201a019f9b458
13+
refs/heads/auto: 7ae8889286535446f9a7c0d4c3e214b55d7063e6
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/libcore/cell.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
use clone::Clone;
145145
use cmp::PartialEq;
146146
use default::Default;
147-
use marker::{Copy, Send};
147+
use marker::{Copy, Send, Sync};
148148
use ops::{Deref, DerefMut, Drop};
149149
use option::Option;
150150
use option::Option::{None, Some};
@@ -660,6 +660,8 @@ pub struct UnsafeCell<T> {
660660
pub value: T,
661661
}
662662

663+
impl<T> !Sync for UnsafeCell<T> {}
664+
663665
impl<T> UnsafeCell<T> {
664666
/// Construct a new instance of `UnsafeCell` which will wrap the specified
665667
/// value.

branches/auto/src/libcore/marker.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ pub unsafe trait Send : MarkerTrait {
5151

5252
impl<T> !Send for *const T { }
5353
impl<T> !Send for *mut T { }
54+
impl !Send for Managed { }
5455

5556
/// Types with a constant size known at compile-time.
5657
#[stable(feature = "rust1", since = "1.0.0")]
@@ -219,6 +220,7 @@ pub unsafe trait Sync : MarkerTrait {
219220

220221
impl<T> !Sync for *const T { }
221222
impl<T> !Sync for *mut T { }
223+
impl !Sync for Managed { }
222224

223225
/// A type which is considered "not POD", meaning that it is not
224226
/// implicitly copyable. This is typically embedded in other types to

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

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
826826
}
827827
Some(bound @ ty::BoundSend) |
828828
Some(bound @ ty::BoundSync) => {
829+
// Ideally, we shouldn't sepcial case Send/Sync. This will be unified
830+
// as soon as default trait implementations for these traits land.
829831
try!(self.assemble_candidates_from_impls(obligation, &mut candidates));
830832

831833
// No explicit impls were declared for this type, consider the fallback rules.
@@ -1599,27 +1601,13 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
15991601
-> Result<BuiltinBoundConditions<'tcx>,SelectionError<'tcx>>
16001602
{
16011603
// First check for markers and other nonsense.
1602-
let tcx = this.tcx();
16031604
match bound {
1604-
ty::BoundSend => {
1605-
if Some(def_id) == tcx.lang_items.managed_bound() {
1606-
return Err(Unimplemented)
1607-
}
1608-
}
1609-
16101605
ty::BoundCopy => {
16111606
return Ok(ParameterBuiltin)
16121607
}
16131608

1614-
ty::BoundSync => {
1615-
if
1616-
Some(def_id) == tcx.lang_items.managed_bound() ||
1617-
Some(def_id) == tcx.lang_items.unsafe_cell_type()
1618-
{
1619-
return Err(Unimplemented)
1620-
}
1621-
}
1622-
1609+
ty::BoundSend |
1610+
ty::BoundSync |
16231611
ty::BoundSized => { }
16241612
}
16251613

0 commit comments

Comments
 (0)