Skip to content

Commit ddbaf06

Browse files
committed
---
yaml --- r: 274110 b: refs/heads/stable c: 34f17d9 h: refs/heads/master
1 parent 92395cc commit ddbaf06

File tree

88 files changed

+978
-1646
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+978
-1646
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 670f5b06e47d847b3fc8c61392a65202f1d3dfa2
32+
refs/heads/stable: 34f17d98eaf10ef3d6eb163577b68c1746ea7afd
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/configure

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ CFG_SELF="$0"
550550
CFG_CONFIGURE_ARGS="$@"
551551

552552

553-
case "${CFG_SRC_DIR}" in
553+
case "${CFG_SRC_DIR}" in
554554
*\ * )
555555
err "The path to the rust source directory contains spaces, which is not supported"
556556
;;
@@ -892,13 +892,6 @@ then
892892
CFG_DISABLE_JEMALLOC=1
893893
fi
894894

895-
if [ $CFG_OSTYPE = pc-windows-gnu ]
896-
then
897-
# FIXME(#31030) - there's not a great reason to disable jemalloc here
898-
step_msg "on Windows, disabling jemalloc"
899-
CFG_DISABLE_JEMALLOC=1
900-
fi
901-
902895
# OS X 10.9, gcc is actually clang. This can cause some confusion in the build
903896
# system, so if we find that gcc is clang, we should just use clang directly.
904897
if [ $CFG_OSTYPE = apple-darwin -a -z "$CFG_ENABLE_CLANG" ]

branches/stable/mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
######################################################################
1414

1515
# The version number
16-
CFG_RELEASE_NUM=1.8.0
16+
CFG_RELEASE_NUM=1.7.0
1717

1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release

branches/stable/src/jemalloc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit e24a1a025a1f214e40eedafe3b9c7b1d69937922
1+
Subproject commit f84e30927284b0c500ed3eaf09e8e159da20ddaf

branches/stable/src/liballoc/rc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -715,9 +715,9 @@ pub struct Weak<T: ?Sized> {
715715
_ptr: Shared<RcBox<T>>,
716716
}
717717

718-
#[stable(feature = "rust1", since = "1.0.0")]
718+
#[stable(feature = "rc_weak", since = "1.4.0")]
719719
impl<T: ?Sized> !marker::Send for Weak<T> {}
720-
#[stable(feature = "rust1", since = "1.0.0")]
720+
#[stable(feature = "rc_weak", since = "1.4.0")]
721721
impl<T: ?Sized> !marker::Sync for Weak<T> {}
722722

723723
#[unstable(feature = "coerce_unsized", issue = "27732")]
@@ -753,7 +753,7 @@ impl<T: ?Sized> Weak<T> {
753753
}
754754
}
755755

756-
#[stable(feature = "rust1", since = "1.0.0")]
756+
#[stable(feature = "rc_weak", since = "1.4.0")]
757757
impl<T: ?Sized> Drop for Weak<T> {
758758
/// Drops the `Weak<T>`.
759759
///
@@ -819,7 +819,7 @@ impl<T: ?Sized> Clone for Weak<T> {
819819
}
820820
}
821821

822-
#[stable(feature = "rust1", since = "1.0.0")]
822+
#[stable(feature = "rc_weak", since = "1.4.0")]
823823
impl<T: ?Sized + fmt::Debug> fmt::Debug for Weak<T> {
824824
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
825825
write!(f, "(Weak)")

branches/stable/src/libcollections/btree/node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,8 +1027,6 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::
10271027
}
10281028
self.node.as_leaf_mut().len -= 1;
10291029

1030-
left_node.as_leaf_mut().len += right_len as u16 + 1;
1031-
10321030
if self.node.height > 1 {
10331031
ptr::copy_nonoverlapping(
10341032
right_node.cast_unchecked().as_internal().edges.as_ptr(),
@@ -1060,6 +1058,8 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::
10601058
);
10611059
}
10621060

1061+
left_node.as_leaf_mut().len += right_len as u16 + 1;
1062+
10631063
Handle::new_edge(self.node, self.idx)
10641064
}
10651065
}

branches/stable/src/librustc/middle/astconv_util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Almost certainly this could (and should) be refactored out of existence.
1515
*/
1616

17-
use middle::def::Def;
17+
use middle::def;
1818
use middle::ty::{self, Ty};
1919

2020
use syntax::codemap::Span;
@@ -72,7 +72,7 @@ pub fn ast_ty_to_prim_ty<'tcx>(tcx: &ty::ctxt<'tcx>, ast_ty: &ast::Ty)
7272
}
7373
Some(d) => d.full_def()
7474
};
75-
if let Def::PrimTy(nty) = def {
75+
if let def::DefPrimTy(nty) = def {
7676
Some(prim_ty_to_ty(tcx, &path.segments, nty))
7777
} else {
7878
None

branches/stable/src/librustc/middle/cfg/construct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use rustc_data_structures::graph;
1212
use middle::cfg::*;
13-
use middle::def::Def;
13+
use middle::def;
1414
use middle::pat_util;
1515
use middle::ty;
1616
use syntax::ast;
@@ -591,7 +591,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
591591
}
592592

593593
match self.tcx.def_map.borrow().get(&expr.id).map(|d| d.full_def()) {
594-
Some(Def::Label(loop_id)) => {
594+
Some(def::DefLabel(loop_id)) => {
595595
for l in &self.loop_scopes {
596596
if l.loop_id == loop_id {
597597
return *l;

branches/stable/src/librustc/middle/check_const.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use middle::ty::cast::{CastKind};
2929
use middle::const_eval::{self, ConstEvalErr};
3030
use middle::const_eval::ErrKind::IndexOpFeatureGated;
3131
use middle::const_eval::EvalHint::ExprTypeChecked;
32-
use middle::def::Def;
32+
use middle::def;
3333
use middle::def_id::DefId;
3434
use middle::expr_use_visitor as euv;
3535
use middle::infer;
@@ -610,21 +610,21 @@ fn check_expr<'a, 'tcx>(v: &mut CheckCrateVisitor<'a, 'tcx>,
610610
hir::ExprPath(..) => {
611611
let def = v.tcx.def_map.borrow().get(&e.id).map(|d| d.full_def());
612612
match def {
613-
Some(Def::Variant(..)) => {
613+
Some(def::DefVariant(_, _, _)) => {
614614
// Count the discriminator or function pointer.
615615
v.add_qualif(ConstQualif::NON_ZERO_SIZED);
616616
}
617-
Some(Def::Struct(..)) => {
617+
Some(def::DefStruct(_)) => {
618618
if let ty::TyBareFn(..) = node_ty.sty {
619619
// Count the function pointer.
620620
v.add_qualif(ConstQualif::NON_ZERO_SIZED);
621621
}
622622
}
623-
Some(Def::Fn(..)) | Some(Def::Method(..)) => {
623+
Some(def::DefFn(..)) | Some(def::DefMethod(..)) => {
624624
// Count the function pointer.
625625
v.add_qualif(ConstQualif::NON_ZERO_SIZED);
626626
}
627-
Some(Def::Static(..)) => {
627+
Some(def::DefStatic(..)) => {
628628
match v.mode {
629629
Mode::Static | Mode::StaticMut => {}
630630
Mode::Const | Mode::ConstFn => {
@@ -635,16 +635,16 @@ fn check_expr<'a, 'tcx>(v: &mut CheckCrateVisitor<'a, 'tcx>,
635635
Mode::Var => v.add_qualif(ConstQualif::NOT_CONST)
636636
}
637637
}
638-
Some(Def::Const(did)) |
639-
Some(Def::AssociatedConst(did)) => {
638+
Some(def::DefConst(did)) |
639+
Some(def::DefAssociatedConst(did)) => {
640640
if let Some(expr) = const_eval::lookup_const_by_id(v.tcx, did,
641641
Some(e.id),
642642
None) {
643643
let inner = v.global_expr(Mode::Const, expr);
644644
v.add_qualif(inner);
645645
}
646646
}
647-
Some(Def::Local(..)) if v.mode == Mode::ConstFn => {
647+
Some(def::DefLocal(..)) if v.mode == Mode::ConstFn => {
648648
// Sadly, we can't determine whether the types are zero-sized.
649649
v.add_qualif(ConstQualif::NOT_CONST | ConstQualif::NON_ZERO_SIZED);
650650
}
@@ -672,16 +672,16 @@ fn check_expr<'a, 'tcx>(v: &mut CheckCrateVisitor<'a, 'tcx>,
672672
}
673673
let def = v.tcx.def_map.borrow().get(&callee.id).map(|d| d.full_def());
674674
let is_const = match def {
675-
Some(Def::Struct(..)) => true,
676-
Some(Def::Variant(..)) => {
675+
Some(def::DefStruct(..)) => true,
676+
Some(def::DefVariant(..)) => {
677677
// Count the discriminator.
678678
v.add_qualif(ConstQualif::NON_ZERO_SIZED);
679679
true
680680
}
681-
Some(Def::Fn(did)) => {
681+
Some(def::DefFn(did, _)) => {
682682
v.handle_const_fn_call(e, did, node_ty)
683683
}
684-
Some(Def::Method(did)) => {
684+
Some(def::DefMethod(did)) => {
685685
match v.tcx.impl_or_trait_item(did).container() {
686686
ty::ImplContainer(_) => {
687687
v.handle_const_fn_call(e, did, node_ty)

branches/stable/src/librustc/middle/check_match.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ fn check_for_bindings_named_the_same_as_variants(cx: &MatchCheckCtxt, pat: &Pat)
246246
let pat_ty = cx.tcx.pat_ty(p);
247247
if let ty::TyEnum(edef, _) = pat_ty.sty {
248248
let def = cx.tcx.def_map.borrow().get(&p.id).map(|d| d.full_def());
249-
if let Some(Def::Local(..)) = def {
249+
if let Some(DefLocal(..)) = def {
250250
if edef.variants.iter().any(|variant|
251251
variant.name == ident.node.unhygienic_name
252252
&& variant.kind() == VariantKind::Unit
@@ -454,8 +454,8 @@ impl<'a, 'tcx> Folder for StaticInliner<'a, 'tcx> {
454454
hir::PatIdent(..) | hir::PatEnum(..) | hir::PatQPath(..) => {
455455
let def = self.tcx.def_map.borrow().get(&pat.id).map(|d| d.full_def());
456456
match def {
457-
Some(Def::AssociatedConst(did)) |
458-
Some(Def::Const(did)) => match lookup_const_by_id(self.tcx, did,
457+
Some(DefAssociatedConst(did)) |
458+
Some(DefConst(did)) => match lookup_const_by_id(self.tcx, did,
459459
Some(pat.id), None) {
460460
Some(const_expr) => {
461461
const_expr_to_pat(self.tcx, const_expr, pat.span).map(|new_pat| {
@@ -757,30 +757,30 @@ fn pat_constructors(cx: &MatchCheckCtxt, p: &Pat,
757757
match pat.node {
758758
hir::PatIdent(..) =>
759759
match cx.tcx.def_map.borrow().get(&pat.id).map(|d| d.full_def()) {
760-
Some(Def::Const(..)) | Some(Def::AssociatedConst(..)) =>
760+
Some(DefConst(..)) | Some(DefAssociatedConst(..)) =>
761761
cx.tcx.sess.span_bug(pat.span, "const pattern should've \
762762
been rewritten"),
763-
Some(Def::Struct(..)) => vec!(Single),
764-
Some(Def::Variant(_, id)) => vec!(Variant(id)),
763+
Some(DefStruct(_)) => vec!(Single),
764+
Some(DefVariant(_, id, _)) => vec!(Variant(id)),
765765
_ => vec!()
766766
},
767767
hir::PatEnum(..) =>
768768
match cx.tcx.def_map.borrow().get(&pat.id).map(|d| d.full_def()) {
769-
Some(Def::Const(..)) | Some(Def::AssociatedConst(..)) =>
769+
Some(DefConst(..)) | Some(DefAssociatedConst(..)) =>
770770
cx.tcx.sess.span_bug(pat.span, "const pattern should've \
771771
been rewritten"),
772-
Some(Def::Variant(_, id)) => vec!(Variant(id)),
772+
Some(DefVariant(_, id, _)) => vec!(Variant(id)),
773773
_ => vec!(Single)
774774
},
775775
hir::PatQPath(..) =>
776776
cx.tcx.sess.span_bug(pat.span, "const pattern should've \
777777
been rewritten"),
778778
hir::PatStruct(..) =>
779779
match cx.tcx.def_map.borrow().get(&pat.id).map(|d| d.full_def()) {
780-
Some(Def::Const(..)) | Some(Def::AssociatedConst(..)) =>
780+
Some(DefConst(..)) | Some(DefAssociatedConst(..)) =>
781781
cx.tcx.sess.span_bug(pat.span, "const pattern should've \
782782
been rewritten"),
783-
Some(Def::Variant(_, id)) => vec!(Variant(id)),
783+
Some(DefVariant(_, id, _)) => vec!(Variant(id)),
784784
_ => vec!(Single)
785785
},
786786
hir::PatLit(ref expr) =>
@@ -869,10 +869,10 @@ pub fn specialize<'a>(cx: &MatchCheckCtxt, r: &[&'a Pat],
869869
hir::PatIdent(_, _, _) => {
870870
let opt_def = cx.tcx.def_map.borrow().get(&pat_id).map(|d| d.full_def());
871871
match opt_def {
872-
Some(Def::Const(..)) | Some(Def::AssociatedConst(..)) =>
872+
Some(DefConst(..)) | Some(DefAssociatedConst(..)) =>
873873
cx.tcx.sess.span_bug(pat_span, "const pattern should've \
874874
been rewritten"),
875-
Some(Def::Variant(_, id)) => if *constructor == Variant(id) {
875+
Some(DefVariant(_, id, _)) => if *constructor == Variant(id) {
876876
Some(vec!())
877877
} else {
878878
None
@@ -884,11 +884,11 @@ pub fn specialize<'a>(cx: &MatchCheckCtxt, r: &[&'a Pat],
884884
hir::PatEnum(_, ref args) => {
885885
let def = cx.tcx.def_map.borrow().get(&pat_id).unwrap().full_def();
886886
match def {
887-
Def::Const(..) | Def::AssociatedConst(..) =>
887+
DefConst(..) | DefAssociatedConst(..) =>
888888
cx.tcx.sess.span_bug(pat_span, "const pattern should've \
889889
been rewritten"),
890-
Def::Variant(_, id) if *constructor != Variant(id) => None,
891-
Def::Variant(..) | Def::Struct(..) => {
890+
DefVariant(_, id, _) if *constructor != Variant(id) => None,
891+
DefVariant(..) | DefStruct(..) => {
892892
Some(match args {
893893
&Some(ref args) => args.iter().map(|p| &**p).collect(),
894894
&None => vec![DUMMY_WILD_PAT; arity],

branches/stable/src/librustc/middle/check_static_recursion.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use front::map as ast_map;
1515
use session::Session;
16-
use middle::def::{Def, DefMap};
16+
use middle::def::{DefStatic, DefConst, DefAssociatedConst, DefVariant, DefMap};
1717
use util::nodemap::NodeMap;
1818

1919
use syntax::{ast};
@@ -238,9 +238,9 @@ impl<'a, 'ast: 'a> Visitor<'ast> for CheckItemRecursionVisitor<'a, 'ast> {
238238
match e.node {
239239
hir::ExprPath(..) => {
240240
match self.def_map.get(&e.id).map(|d| d.base_def) {
241-
Some(Def::Static(def_id, _)) |
242-
Some(Def::AssociatedConst(def_id)) |
243-
Some(Def::Const(def_id)) => {
241+
Some(DefStatic(def_id, _)) |
242+
Some(DefAssociatedConst(def_id)) |
243+
Some(DefConst(def_id)) => {
244244
if let Some(node_id) = self.ast_map.as_local_node_id(def_id) {
245245
match self.ast_map.get(node_id) {
246246
ast_map::NodeItem(item) =>
@@ -263,7 +263,7 @@ impl<'a, 'ast: 'a> Visitor<'ast> for CheckItemRecursionVisitor<'a, 'ast> {
263263
// affect the specific variant used, but we need to check
264264
// the whole enum definition to see what expression that
265265
// might be (if any).
266-
Some(Def::Variant(enum_id, variant_id)) => {
266+
Some(DefVariant(enum_id, variant_id, false)) => {
267267
if let Some(enum_node_id) = self.ast_map.as_local_node_id(enum_id) {
268268
if let hir::ItemEnum(ref enum_def, ref generics) =
269269
self.ast_map.expect_item(enum_node_id).node
@@ -276,7 +276,7 @@ impl<'a, 'ast: 'a> Visitor<'ast> for CheckItemRecursionVisitor<'a, 'ast> {
276276
} else {
277277
self.sess.span_bug(e.span,
278278
"`check_static_recursion` found \
279-
non-enum in Def::Variant");
279+
non-enum in DefVariant");
280280
}
281281
}
282282
}

0 commit comments

Comments
 (0)