Skip to content

Commit f29f45f

Browse files
committed
---
yaml --- r: 228557 b: refs/heads/try c: 44dd247 h: refs/heads/master i: 228555: 19fc2ae v: v3
1 parent 6c8a6d1 commit f29f45f

Some content is hidden

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

53 files changed

+238
-589
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 2afe47d1688726fd1e836deedaa0ad8c2ec891c7
4+
refs/heads/try: 44dd247cd5ced8ae8a8c6f1d04463abce21c8e9e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/configure

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -323,17 +323,6 @@ envopt() {
323323
fi
324324
}
325325

326-
enable_if_not_disabled() {
327-
local OP=$1
328-
local UOP=$(echo $OP | tr '[:lower:]' '[:upper:]' | tr '\-' '\_')
329-
local ENAB_V="CFG_ENABLE_$UOP"
330-
local EXPLICITLY_DISABLED="CFG_DISABLE_${UOP}_PROVIDED"
331-
eval VV=\$$EXPLICITLY_DISABLED
332-
if [ -z "$VV" ]; then
333-
eval $ENAB_V=1
334-
fi
335-
}
336-
337326
to_llvm_triple() {
338327
case $1 in
339328
i686-w64-mingw32) echo i686-pc-windows-gnu ;;
@@ -682,12 +671,10 @@ if [ -n "$CFG_ENABLE_DEBUG" ]; then
682671
CFG_DISABLE_OPTIMIZE=1
683672
CFG_DISABLE_OPTIMIZE_CXX=1
684673
fi
685-
686-
# Set following variables to 1 unless setting already provided
687-
enable_if_not_disabled debug-assertions
688-
enable_if_not_disabled debug-jemalloc
689-
enable_if_not_disabled debuginfo
690-
enable_if_not_disabled llvm-assertions
674+
CFG_ENABLE_DEBUG_ASSERTIONS=1
675+
CFG_ENABLE_DEBUG_JEMALLOC=1
676+
CFG_ENABLE_DEBUGINFO=1
677+
CFG_ENABLE_LLVM_ASSERTIONS=1
691678
fi
692679

693680
# OK, now write the debugging options

branches/try/src/libcollections/slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! Utilities for slice manipulation
11+
//! A dynamically-sized view into a contiguous sequence, `[T]`.
1212
//!
1313
//! The `slice` module contains useful code to help work with slice values.
1414
//! Slices are a view into a block of memory represented as a pointer and a

branches/try/src/libcollections/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! Unicode string manipulation (the `str` type).
11+
//! Unicode string slices
1212
//!
1313
//! Rust's `str` type is one of the core primitive types of the language. `&str`
1414
//! is the borrowed string type. This type of string can only be created from

branches/try/src/libcore/atomic.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ use intrinsics;
7878
use cell::UnsafeCell;
7979

8080
use default::Default;
81-
use fmt;
8281

8382
/// A boolean type which can be safely shared between threads.
8483
#[stable(feature = "rust1", since = "1.0.0")]
@@ -1090,23 +1089,3 @@ pub fn fence(order: Ordering) {
10901089
}
10911090
}
10921091
}
1093-
1094-
macro_rules! impl_Debug {
1095-
($($t:ident)*) => ($(
1096-
#[stable(feature = "atomic_debug", since = "1.3.0")]
1097-
impl fmt::Debug for $t {
1098-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1099-
f.debug_tuple(stringify!($t)).field(&self.load(Ordering::SeqCst)).finish()
1100-
}
1101-
}
1102-
)*);
1103-
}
1104-
1105-
impl_Debug!{ AtomicUsize AtomicIsize AtomicBool }
1106-
1107-
#[stable(feature = "atomic_debug", since = "1.3.0")]
1108-
impl<T> fmt::Debug for AtomicPtr<T> {
1109-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1110-
f.debug_tuple("AtomicPtr").field(&self.load(Ordering::SeqCst)).finish()
1111-
}
1112-
}

branches/try/src/libcore/ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// FIXME: talk about offset, copy_memory, copy_nonoverlapping_memory
1212

13-
//! Operations on raw pointers, `*const T`, and `*mut T`.
13+
//! Raw, unsafe pointers, `*const T`, and `*mut T`
1414
//!
1515
//! Working with raw pointers in Rust is uncommon,
1616
//! typically limited to a few patterns.

branches/try/src/libcore/str/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -636,10 +636,10 @@ impl<'a, P: Pattern<'a>> SplitInternal<'a, P> {
636636

637637
generate_pattern_iterators! {
638638
forward:
639-
/// Created with the method `.split()`.
639+
#[doc="Created with the method `.split()`."]
640640
struct Split;
641641
reverse:
642-
/// Created with the method `.rsplit()`.
642+
#[doc="Created with the method `.rsplit()`."]
643643
struct RSplit;
644644
stability:
645645
#[stable(feature = "rust1", since = "1.0.0")]
@@ -650,10 +650,10 @@ generate_pattern_iterators! {
650650

651651
generate_pattern_iterators! {
652652
forward:
653-
/// Created with the method `.split_terminator()`.
653+
#[doc="Created with the method `.split_terminator()`."]
654654
struct SplitTerminator;
655655
reverse:
656-
/// Created with the method `.rsplit_terminator()`.
656+
#[doc="Created with the method `.rsplit_terminator()`."]
657657
struct RSplitTerminator;
658658
stability:
659659
#[stable(feature = "rust1", since = "1.0.0")]
@@ -696,10 +696,10 @@ impl<'a, P: Pattern<'a>> SplitNInternal<'a, P> {
696696

697697
generate_pattern_iterators! {
698698
forward:
699-
/// Created with the method `.splitn()`.
699+
#[doc="Created with the method `.splitn()`."]
700700
struct SplitN;
701701
reverse:
702-
/// Created with the method `.rsplitn()`.
702+
#[doc="Created with the method `.rsplitn()`."]
703703
struct RSplitN;
704704
stability:
705705
#[stable(feature = "rust1", since = "1.0.0")]
@@ -730,10 +730,10 @@ impl<'a, P: Pattern<'a>> MatchIndicesInternal<'a, P> {
730730

731731
generate_pattern_iterators! {
732732
forward:
733-
/// Created with the method `.match_indices()`.
733+
#[doc="Created with the method `.match_indices()`."]
734734
struct MatchIndices;
735735
reverse:
736-
/// Created with the method `.rmatch_indices()`.
736+
#[doc="Created with the method `.rmatch_indices()`."]
737737
struct RMatchIndices;
738738
stability:
739739
#[unstable(feature = "str_match_indices",
@@ -771,10 +771,10 @@ impl<'a, P: Pattern<'a>> MatchesInternal<'a, P> {
771771

772772
generate_pattern_iterators! {
773773
forward:
774-
/// Created with the method `.matches()`.
774+
#[doc="Created with the method `.matches()`."]
775775
struct Matches;
776776
reverse:
777-
/// Created with the method `.rmatches()`.
777+
#[doc="Created with the method `.rmatches()`."]
778778
struct RMatches;
779779
stability:
780780
#[stable(feature = "str_matches", since = "1.2.0")]

branches/try/src/libcore/tuple.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! Operations on tuples
11+
//! A finite heterogeneous sequence, `(T, U, ..)`
1212
//!
1313
//! To access a single element of a tuple one can use the `.0`
1414
//! field access syntax.

branches/try/src/librustc/middle/free_region.rs

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,18 @@
1313
use middle::implicator::Implication;
1414
use middle::ty::{self, FreeRegion};
1515
use util::common::can_reach;
16-
use util::nodemap::{FnvHashMap, FnvHashSet};
16+
use util::nodemap::FnvHashMap;
1717

1818
#[derive(Clone)]
1919
pub struct FreeRegionMap {
20-
/// `map` maps from a free region `a` to a list of
20+
/// `free_region_map` maps from a free region `a` to a list of
2121
/// free regions `bs` such that `a <= b for all b in bs`
2222
map: FnvHashMap<FreeRegion, Vec<FreeRegion>>,
23-
/// regions that are required to outlive (and therefore be
24-
/// equal to) 'static.
25-
statics: FnvHashSet<FreeRegion>
2623
}
2724

2825
impl FreeRegionMap {
2926
pub fn new() -> FreeRegionMap {
30-
FreeRegionMap { map: FnvHashMap(), statics: FnvHashSet() }
27+
FreeRegionMap { map: FnvHashMap() }
3128
}
3229

3330
pub fn relate_free_regions_from_implications<'tcx>(&mut self,
@@ -62,8 +59,6 @@ impl FreeRegionMap {
6259
}
6360
ty::Predicate::RegionOutlives(ty::Binder(ty::OutlivesPredicate(r_a, r_b))) => {
6461
match (r_a, r_b) {
65-
(ty::ReStatic, ty::ReFree(_)) => {},
66-
(ty::ReFree(fr_a), ty::ReStatic) => self.relate_to_static(fr_a),
6762
(ty::ReFree(fr_a), ty::ReFree(fr_b)) => {
6863
// Record that `'a:'b`. Or, put another way, `'b <= 'a`.
6964
self.relate_free_regions(fr_b, fr_a);
@@ -81,12 +76,8 @@ impl FreeRegionMap {
8176
}
8277
}
8378

84-
fn relate_to_static(&mut self, sup: FreeRegion) {
85-
self.statics.insert(sup);
86-
}
87-
88-
fn relate_free_regions(&mut self, sub: FreeRegion, sup: FreeRegion) {
89-
let mut sups = self.map.entry(sub).or_insert(Vec::new());
79+
pub fn relate_free_regions(&mut self, sub: FreeRegion, sup: FreeRegion) {
80+
let mut sups = self.map.entry(sub).or_insert(Vec::new());
9081
if !sups.contains(&sup) {
9182
sups.push(sup);
9283
}
@@ -97,7 +88,7 @@ impl FreeRegionMap {
9788
/// it is possible that `sub != sup` and `sub <= sup` and `sup <= sub`
9889
/// (that is, the user can give two different names to the same lifetime).
9990
pub fn sub_free_region(&self, sub: FreeRegion, sup: FreeRegion) -> bool {
100-
can_reach(&self.map, sub, sup) || self.is_static(&sup)
91+
can_reach(&self.map, sub, sup)
10192
}
10293

10394
/// Determines whether one region is a subregion of another. This is intended to run *after
@@ -125,17 +116,10 @@ impl FreeRegionMap {
125116
(ty::ReFree(sub_fr), ty::ReFree(super_fr)) =>
126117
self.sub_free_region(sub_fr, super_fr),
127118

128-
(ty::ReStatic, ty::ReFree(ref sup_fr)) => self.is_static(sup_fr),
129-
130119
_ =>
131120
false,
132121
}
133122
}
134123
}
135-
136-
/// Determines whether this free-region is required to be 'static
137-
pub fn is_static(&self, super_region: &ty::FreeRegion) -> bool {
138-
debug!("is_static(super_region={:?})", super_region);
139-
self.statics.iter().any(|s| can_reach(&self.map, *s, *super_region))
140-
}
141124
}
125+

branches/try/src/librustc/middle/infer/region_inference/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -869,8 +869,7 @@ impl<'a, 'tcx> RegionVarBindings<'a, 'tcx> {
869869
// is the scope `s_id`. Otherwise, as we do not know
870870
// big the free region is precisely, the GLB is undefined.
871871
let fr_scope = fr.scope.to_code_extent();
872-
if self.tcx.region_maps.nearest_common_ancestor(fr_scope, s_id) == fr_scope ||
873-
free_regions.is_static(fr) {
872+
if self.tcx.region_maps.nearest_common_ancestor(fr_scope, s_id) == fr_scope {
874873
Ok(s)
875874
} else {
876875
Err(TypeError::RegionsNoOverlap(b, a))

branches/try/src/librustc_back/target/openbsd_base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub fn opts() -> TargetOptions {
2727
"-Wl,--as-needed".to_string(),
2828
),
2929
position_independent_executables: true,
30-
archive_format: "gnu".to_string(),
30+
archive_format: "bsd".to_string(),
3131
.. Default::default()
3232
}
3333
}

branches/try/src/librustc_lint/builtin.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1616,6 +1616,8 @@ impl LintPass for MissingDoc {
16161616
}
16171617
return
16181618
},
1619+
ast::ItemConst(..) => "a constant",
1620+
ast::ItemStatic(..) => "a static",
16191621
_ => return
16201622
};
16211623

branches/try/src/librustc_trans/trans/common.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -905,13 +905,11 @@ pub fn fulfill_obligation<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
905905
let vtable = selection.map(|predicate| {
906906
fulfill_cx.register_predicate_obligation(&infcx, predicate);
907907
});
908-
let vtable = erase_regions(tcx,
909-
&drain_fulfillment_cx_or_panic(span, &infcx, &mut fulfill_cx, &vtable)
910-
);
908+
let vtable = drain_fulfillment_cx_or_panic(span, &infcx, &mut fulfill_cx, &vtable);
911909

912-
info!("Cache miss: {:?} => {:?}", trait_ref, vtable);
913-
914-
ccx.trait_cache().borrow_mut().insert(trait_ref, vtable.clone());
910+
info!("Cache miss: {:?}", trait_ref);
911+
ccx.trait_cache().borrow_mut().insert(trait_ref,
912+
vtable.clone());
915913

916914
vtable
917915
}

branches/try/src/librustc_typeck/astconv.rs

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ fn report_ambiguous_associated_type(tcx: &ty::ctxt,
11121112
// any ambiguity.
11131113
fn find_bound_for_assoc_item<'tcx>(this: &AstConv<'tcx>,
11141114
ty_param_node_id: ast::NodeId,
1115-
ty_param_name: ast::Name,
1115+
ty_param_name: Option<ast::Name>,
11161116
assoc_name: ast::Name,
11171117
span: Span)
11181118
-> Result<ty::PolyTraitRef<'tcx>, ErrorReported>
@@ -1138,11 +1138,21 @@ fn find_bound_for_assoc_item<'tcx>(this: &AstConv<'tcx>,
11381138
.filter(|b| this.trait_defines_associated_type_named(b.def_id(), assoc_name))
11391139
.collect();
11401140

1141-
one_bound_for_assoc_type(tcx,
1142-
suitable_bounds,
1143-
&token::get_name(ty_param_name),
1144-
&token::get_name(assoc_name),
1145-
span)
1141+
if let Some(s) = ty_param_name {
1142+
// borrowck doesn't like this any other way
1143+
one_bound_for_assoc_type(tcx,
1144+
suitable_bounds,
1145+
&token::get_name(s),
1146+
&token::get_name(assoc_name),
1147+
span)
1148+
} else {
1149+
one_bound_for_assoc_type(tcx,
1150+
suitable_bounds,
1151+
"Self",
1152+
&token::get_name(assoc_name),
1153+
span)
1154+
1155+
}
11461156
}
11471157

11481158

@@ -1241,11 +1251,7 @@ fn associated_path_def_to_ty<'tcx>(this: &AstConv<'tcx>,
12411251
}
12421252
(&ty::TyParam(_), def::DefSelfTy(Some(trait_did), None)) => {
12431253
assert_eq!(trait_did.krate, ast::LOCAL_CRATE);
1244-
match find_bound_for_assoc_item(this,
1245-
trait_did.node,
1246-
token::special_idents::type_self.name,
1247-
assoc_name,
1248-
span) {
1254+
match find_bound_for_assoc_item(this, trait_did.node, None, assoc_name, span) {
12491255
Ok(bound) => bound,
12501256
Err(ErrorReported) => return (tcx.types.err, ty_path_def),
12511257
}
@@ -1254,7 +1260,7 @@ fn associated_path_def_to_ty<'tcx>(this: &AstConv<'tcx>,
12541260
assert_eq!(param_did.krate, ast::LOCAL_CRATE);
12551261
match find_bound_for_assoc_item(this,
12561262
param_did.node,
1257-
param_name,
1263+
Some(param_name),
12581264
assoc_name,
12591265
span) {
12601266
Ok(bound) => bound,

branches/try/src/librustc_unicode/char.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! Character manipulation (`char` type, Unicode Scalar Value)
11+
//! A Unicode scalar value
1212
//!
1313
//! This module provides the `CharExt` trait, as well as its
1414
//! implementation for the primitive `char` type, in order to allow

branches/try/src/librustdoc/clean/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1947,10 +1947,6 @@ impl Span {
19471947

19481948
impl Clean<Span> for syntax::codemap::Span {
19491949
fn clean(&self, cx: &DocContext) -> Span {
1950-
if *self == DUMMY_SP {
1951-
return Span::empty();
1952-
}
1953-
19541950
let cm = cx.sess().codemap();
19551951
let filename = cm.span_to_filename(*self);
19561952
let lo = cm.lookup_char_pos(self.lo);

branches/try/src/librustdoc/html/format.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -540,19 +540,6 @@ impl fmt::Display for clean::Type {
540540
}
541541
}
542542

543-
impl fmt::Display for clean::Impl {
544-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
545-
try!(write!(f, "impl{} ", self.generics));
546-
if let Some(ref ty) = self.trait_ {
547-
try!(write!(f, "{}{} for ",
548-
if self.polarity == Some(clean::ImplPolarity::Negative) { "!" } else { "" },
549-
*ty));
550-
}
551-
try!(write!(f, "{}{}", self.for_, WhereClause(&self.generics)));
552-
Ok(())
553-
}
554-
}
555-
556543
impl fmt::Display for clean::Arguments {
557544
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
558545
for (i, input) in self.values.iter().enumerate() {

0 commit comments

Comments
 (0)