Skip to content

Commit ded22ee

Browse files
committed
---
yaml --- r: 147284 b: refs/heads/try2 c: bfa9064 h: refs/heads/master v: v3
1 parent 13e88a0 commit ded22ee

File tree

21 files changed

+2689
-767
lines changed

21 files changed

+2689
-767
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 2c41a823ccb1e7cea0a29f9048533aaa78c40de6
8+
refs/heads/try2: bfa9064ba2687eb1d95708f72f41ddd9729a6ba1
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/configure

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -559,27 +559,6 @@ then
559559
step_msg "on OS X 10.9, forcing use of clang"
560560
CFG_ENABLE_CLANG=1
561561
putvar CFG_ENABLE_CLANG
562-
else
563-
# on OS X, with xcode 5 and newer, certain developers may have
564-
# cc, gcc and g++ point to a mixture of clang and gcc
565-
# if so, this will create very strange build errors
566-
# this last stanza is to detect some such problems and save the future rust
567-
# contributor some time solving that issue.
568-
# this detection could be generalized to other OSes aside from OS X
569-
# but the issue seems most likely to happen on OS X
570-
571-
chk_cc () {
572-
$1 --version 2> /dev/null | grep -q $2
573-
}
574-
# check that gcc, cc and g++ all point to the same compiler.
575-
# note that for xcode 5, g++ points to clang, not clang++
576-
if !((chk_cc gcc clang && chk_cc g++ clang) ||
577-
(chk_cc gcc gcc &&( chk_cc g++ g++ || chk g++ gcc))) then
578-
err "the gcc and g++ in your path point to different compilers.
579-
Check which versions are in your path with cc --version and g++ --version.
580-
To resolve this problem, either fix your PATH or run configure with --enable-clang"
581-
fi
582-
583562
fi
584563
fi
585564

branches/try2/doc/rust.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3329,12 +3329,6 @@ The kinds are:
33293329
This kind includes scalars, owning pointers, owned closures, and
33303330
structural types containing only other owned types.
33313331
All `Send` types are `'static`.
3332-
`Pod`
3333-
: Types of this kind consist of "Plain Old Data"
3334-
which can be copied by simply moving bits.
3335-
All values of this kind can be implicitly copied.
3336-
This kind includes scalars and immutable references,
3337-
as well as structural types containing other `Pod` types.
33383332
`'static`
33393333
: Types of this kind do not contain any borrowed pointers;
33403334
this can be a useful guarantee for code

branches/try2/src/librustc/metadata/tyencode.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,6 @@ fn enc_bounds(w: @mut MemWriter, cx: @ctxt, bs: &ty::ParamBounds) {
395395
ty::BoundFreeze => mywrite!(w, "K"),
396396
ty::BoundStatic => mywrite!(w, "O"),
397397
ty::BoundSized => mywrite!(w, "Z"),
398-
ty::BoundPod => mywrite!(w, "P"),
399398
}
400399
}
401400

branches/try2/src/librustc/middle/lang_items.rs

Lines changed: 48 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
use driver::session::Session;
2424
use metadata::csearch::each_lang_item;
2525
use metadata::cstore::iter_crate_data;
26-
use middle::ty::{BuiltinBound, BoundFreeze, BoundPod, BoundSend, BoundSized};
26+
use middle::ty::{BuiltinBound, BoundFreeze, BoundSend, BoundSized};
2727
use syntax::ast;
2828
use syntax::ast_util::local_def;
2929
use syntax::attr::AttrMetaMethods;
@@ -83,8 +83,6 @@ impl LanguageItems {
8383
Some(BoundSend)
8484
} else if Some(id) == self.sized_trait() {
8585
Some(BoundSized)
86-
} else if Some(id) == self.pod_trait() {
87-
Some(BoundPod)
8886
} else {
8987
None
9088
}
@@ -208,58 +206,56 @@ pub fn collect_language_items(crate: &ast::Crate,
208206
}
209207

210208
lets_do_this! {
211-
There are 42 lang items.
209+
There are 41 lang items.
212210

213211
// ID, Variant name, Name, Method name;
214212
0, FreezeTraitLangItem, "freeze", freeze_trait;
215213
1, SendTraitLangItem, "send", send_trait;
216214
2, SizedTraitLangItem, "sized", sized_trait;
217-
3, PodTraitLangItem, "pod", pod_trait;
218-
219-
4, DropTraitLangItem, "drop", drop_trait;
220-
221-
5, AddTraitLangItem, "add", add_trait;
222-
6, SubTraitLangItem, "sub", sub_trait;
223-
7, MulTraitLangItem, "mul", mul_trait;
224-
8, DivTraitLangItem, "div", div_trait;
225-
9, RemTraitLangItem, "rem", rem_trait;
226-
10, NegTraitLangItem, "neg", neg_trait;
227-
11, NotTraitLangItem, "not", not_trait;
228-
12, BitXorTraitLangItem, "bitxor", bitxor_trait;
229-
13, BitAndTraitLangItem, "bitand", bitand_trait;
230-
14, BitOrTraitLangItem, "bitor", bitor_trait;
231-
15, ShlTraitLangItem, "shl", shl_trait;
232-
16, ShrTraitLangItem, "shr", shr_trait;
233-
17, IndexTraitLangItem, "index", index_trait;
234-
235-
18, EqTraitLangItem, "eq", eq_trait;
236-
19, OrdTraitLangItem, "ord", ord_trait;
237-
238-
20, StrEqFnLangItem, "str_eq", str_eq_fn;
239-
21, UniqStrEqFnLangItem, "uniq_str_eq", uniq_str_eq_fn;
240-
22, FailFnLangItem, "fail_", fail_fn;
241-
23, FailBoundsCheckFnLangItem, "fail_bounds_check", fail_bounds_check_fn;
242-
24, ExchangeMallocFnLangItem, "exchange_malloc", exchange_malloc_fn;
243-
25, ClosureExchangeMallocFnLangItem, "closure_exchange_malloc", closure_exchange_malloc_fn;
244-
26, ExchangeFreeFnLangItem, "exchange_free", exchange_free_fn;
245-
27, MallocFnLangItem, "malloc", malloc_fn;
246-
28, FreeFnLangItem, "free", free_fn;
247-
29, BorrowAsImmFnLangItem, "borrow_as_imm", borrow_as_imm_fn;
248-
30, BorrowAsMutFnLangItem, "borrow_as_mut", borrow_as_mut_fn;
249-
31, ReturnToMutFnLangItem, "return_to_mut", return_to_mut_fn;
250-
32, CheckNotBorrowedFnLangItem, "check_not_borrowed", check_not_borrowed_fn;
251-
33, StrDupUniqFnLangItem, "strdup_uniq", strdup_uniq_fn;
252-
34, RecordBorrowFnLangItem, "record_borrow", record_borrow_fn;
253-
35, UnrecordBorrowFnLangItem, "unrecord_borrow", unrecord_borrow_fn;
254-
255-
36, StartFnLangItem, "start", start_fn;
256-
257-
37, TyDescStructLangItem, "ty_desc", ty_desc;
258-
38, TyVisitorTraitLangItem, "ty_visitor", ty_visitor;
259-
39, OpaqueStructLangItem, "opaque", opaque;
260-
261-
40, EventLoopFactoryLangItem, "event_loop_factory", event_loop_factory;
262-
263-
41, TypeIdLangItem, "type_id", type_id;
264-
}
265215

216+
3, DropTraitLangItem, "drop", drop_trait;
217+
218+
4, AddTraitLangItem, "add", add_trait;
219+
5, SubTraitLangItem, "sub", sub_trait;
220+
6, MulTraitLangItem, "mul", mul_trait;
221+
7, DivTraitLangItem, "div", div_trait;
222+
8, RemTraitLangItem, "rem", rem_trait;
223+
9, NegTraitLangItem, "neg", neg_trait;
224+
10, NotTraitLangItem, "not", not_trait;
225+
11, BitXorTraitLangItem, "bitxor", bitxor_trait;
226+
12, BitAndTraitLangItem, "bitand", bitand_trait;
227+
13, BitOrTraitLangItem, "bitor", bitor_trait;
228+
14, ShlTraitLangItem, "shl", shl_trait;
229+
15, ShrTraitLangItem, "shr", shr_trait;
230+
16, IndexTraitLangItem, "index", index_trait;
231+
232+
17, EqTraitLangItem, "eq", eq_trait;
233+
18, OrdTraitLangItem, "ord", ord_trait;
234+
235+
19, StrEqFnLangItem, "str_eq", str_eq_fn;
236+
20, UniqStrEqFnLangItem, "uniq_str_eq", uniq_str_eq_fn;
237+
21, FailFnLangItem, "fail_", fail_fn;
238+
22, FailBoundsCheckFnLangItem, "fail_bounds_check", fail_bounds_check_fn;
239+
23, ExchangeMallocFnLangItem, "exchange_malloc", exchange_malloc_fn;
240+
24, ClosureExchangeMallocFnLangItem, "closure_exchange_malloc", closure_exchange_malloc_fn;
241+
25, ExchangeFreeFnLangItem, "exchange_free", exchange_free_fn;
242+
26, MallocFnLangItem, "malloc", malloc_fn;
243+
27, FreeFnLangItem, "free", free_fn;
244+
28, BorrowAsImmFnLangItem, "borrow_as_imm", borrow_as_imm_fn;
245+
29, BorrowAsMutFnLangItem, "borrow_as_mut", borrow_as_mut_fn;
246+
30, ReturnToMutFnLangItem, "return_to_mut", return_to_mut_fn;
247+
31, CheckNotBorrowedFnLangItem, "check_not_borrowed", check_not_borrowed_fn;
248+
32, StrDupUniqFnLangItem, "strdup_uniq", strdup_uniq_fn;
249+
33, RecordBorrowFnLangItem, "record_borrow", record_borrow_fn;
250+
34, UnrecordBorrowFnLangItem, "unrecord_borrow", unrecord_borrow_fn;
251+
252+
35, StartFnLangItem, "start", start_fn;
253+
254+
36, TyDescStructLangItem, "ty_desc", ty_desc;
255+
37, TyVisitorTraitLangItem, "ty_visitor", ty_visitor;
256+
38, OpaqueStructLangItem, "opaque", opaque;
257+
258+
39, EventLoopFactoryLangItem, "event_loop_factory", event_loop_factory;
259+
260+
40, TypeIdLangItem, "type_id", type_id;
261+
}

branches/try2/src/librustc/middle/ty.rs

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,6 @@ pub enum BuiltinBound {
737737
BoundSend,
738738
BoundFreeze,
739739
BoundSized,
740-
BoundPod,
741740
}
742741

743742
pub fn EmptyBuiltinBounds() -> BuiltinBounds {
@@ -1806,9 +1805,6 @@ def_type_content_sets!(
18061805
// Things that prevent values from being considered sized
18071806
Nonsized = 0b0000__00000000__0001,
18081807

1809-
// Things that make values considered not POD (same as `Moves`)
1810-
Nonpod = 0b0000__00001111__0000,
1811-
18121808
// Bits to set when a managed value is encountered
18131809
//
18141810
// [1] Do not set the bits TC::OwnsManaged or
@@ -1832,7 +1828,6 @@ impl TypeContents {
18321828
BoundFreeze => self.is_freezable(cx),
18331829
BoundSend => self.is_sendable(cx),
18341830
BoundSized => self.is_sized(cx),
1835-
BoundPod => self.is_pod(cx),
18361831
}
18371832
}
18381833

@@ -1864,10 +1859,6 @@ impl TypeContents {
18641859
!self.intersects(TC::Nonsized)
18651860
}
18661861

1867-
pub fn is_pod(&self, _: ctxt) -> bool {
1868-
!self.intersects(TC::Nonpod)
1869-
}
1870-
18711862
pub fn moves_by_default(&self, _: ctxt) -> bool {
18721863
self.intersects(TC::Moves)
18731864
}
@@ -1885,32 +1876,15 @@ impl TypeContents {
18851876
*self & (TC::OwnsAll | TC::ReachesAll))
18861877
}
18871878

1888-
pub fn reference(&self, bits: TypeContents) -> TypeContents {
1879+
pub fn other_pointer(&self, bits: TypeContents) -> TypeContents {
18891880
/*!
18901881
* Includes only those bits that still apply
1891-
* when indirected through a reference (`&`)
1882+
* when indirected through a non-owning pointer (`&`, `@`)
18921883
*/
18931884
bits | (
18941885
*self & TC::ReachesAll)
18951886
}
18961887

1897-
pub fn managed_pointer(&self) -> TypeContents {
1898-
/*!
1899-
* Includes only those bits that still apply
1900-
* when indirected through a managed pointer (`@`)
1901-
*/
1902-
TC::Managed | (
1903-
*self & TC::ReachesAll)
1904-
}
1905-
1906-
pub fn unsafe_pointer(&self) -> TypeContents {
1907-
/*!
1908-
* Includes only those bits that still apply
1909-
* when indirected through an unsafe pointer (`*`)
1910-
*/
1911-
*self & TC::ReachesAll
1912-
}
1913-
19141888
pub fn union<T>(v: &[T], f: |&T| -> TypeContents) -> TypeContents {
19151889
v.iter().fold(TC::None, |tc, t| tc | f(t))
19161890
}
@@ -2020,19 +1994,19 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents {
20201994
}
20211995

20221996
ty_box(mt) => {
2023-
tc_mt(cx, mt, cache).managed_pointer()
1997+
tc_mt(cx, mt, cache).other_pointer(TC::Managed)
20241998
}
20251999

20262000
ty_trait(_, _, store, mutbl, bounds) => {
20272001
object_contents(cx, store, mutbl, bounds)
20282002
}
20292003

20302004
ty_ptr(ref mt) => {
2031-
tc_ty(cx, mt.ty, cache).unsafe_pointer()
2005+
tc_ty(cx, mt.ty, cache).other_pointer(TC::None)
20322006
}
20332007

20342008
ty_rptr(r, ref mt) => {
2035-
tc_ty(cx, mt.ty, cache).reference(
2009+
tc_ty(cx, mt.ty, cache).other_pointer(
20362010
borrowed_contents(r, mt.mutbl))
20372011
}
20382012

@@ -2045,11 +2019,11 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents {
20452019
}
20462020

20472021
ty_evec(mt, vstore_box) => {
2048-
tc_mt(cx, mt, cache).managed_pointer()
2022+
tc_mt(cx, mt, cache).other_pointer(TC::Managed)
20492023
}
20502024

20512025
ty_evec(ref mt, vstore_slice(r)) => {
2052-
tc_ty(cx, mt.ty, cache).reference(
2026+
tc_ty(cx, mt.ty, cache).other_pointer(
20532027
borrowed_contents(r, mt.mutbl))
20542028
}
20552029

@@ -2219,10 +2193,10 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents {
22192193
contents.owned_pointer()
22202194
}
22212195
BoxTraitStore => {
2222-
contents.managed_pointer()
2196+
contents.other_pointer(TC::Managed)
22232197
}
22242198
RegionTraitStore(r) => {
2225-
contents.reference(borrowed_contents(r, mutbl))
2199+
contents.other_pointer(borrowed_contents(r, mutbl))
22262200
}
22272201
}
22282202
}
@@ -2239,7 +2213,6 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents {
22392213
BoundSend => TC::Nonsendable,
22402214
BoundFreeze => TC::Nonfreezable,
22412215
BoundSized => TC::Nonsized,
2242-
BoundPod => TC::Nonpod,
22432216
};
22442217
});
22452218
return tc;

branches/try2/src/librustc/util/ppaux.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,6 @@ impl Repr for ty::ParamBounds {
639639
ty::BoundSend => ~"Send",
640640
ty::BoundFreeze => ~"Freeze",
641641
ty::BoundSized => ~"Sized",
642-
ty::BoundPod => ~"Pod",
643642
});
644643
}
645644
for t in self.trait_bounds.iter() {
@@ -927,7 +926,6 @@ impl UserString for ty::BuiltinBound {
927926
ty::BoundSend => ~"Send",
928927
ty::BoundFreeze => ~"Freeze",
929928
ty::BoundSized => ~"Sized",
930-
ty::BoundPod => ~"Pod",
931929
}
932930
}
933931
}

0 commit comments

Comments
 (0)