Skip to content

Commit fb43745

Browse files
committed
---
yaml --- r: 220767 b: refs/heads/master c: 9191a78 h: refs/heads/master i: 220765: a0cd759 220763: 7d53ebe 220759: b4da191 220751: 273df9d 220735: 07b9203 v: v3
1 parent 7adee2e commit fb43745

Some content is hidden

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

63 files changed

+288
-867
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: e33b128e01e1a5a2d23abac5b88274eea5cf9059
2+
refs/heads/master: 9191a7895574ec3aa5a9b84ce0008d91e32ccd6a
33
refs/heads/snap-stage3: d4432b37378ec55450e06799f5344b4b0f4b94e0
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/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

trunk/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-
}

trunk/src/libcore/fmt/num.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
1313
// FIXME: #6220 Implement floating point formatting
1414

15+
#![allow(unsigned_negation)]
16+
1517
use prelude::*;
1618

1719
use fmt;

trunk/src/libcore/ops.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ pub trait Neg {
517517
macro_rules! neg_impl_core {
518518
($id:ident => $body:expr, $($t:ty)*) => ($(
519519
#[stable(feature = "rust1", since = "1.0.0")]
520+
#[allow(unsigned_negation)]
520521
impl Neg for $t {
521522
#[stable(feature = "rust1", since = "1.0.0")]
522523
type Output = $t;

trunk/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")]

trunk/src/libcoretest/fmt/num.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
10+
#![allow(unsigned_negation)]
11+
1012
use core::fmt::radix;
1113

1214
#[test]

trunk/src/librand/isaac.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ impl IsaacRng {
126126

127127
/// Refills the output buffer (`self.rsl`)
128128
#[inline]
129+
#[allow(unsigned_negation)]
129130
fn isaac(&mut self) {
130131
self.c = self.c + w(1);
131132
// abbreviations

trunk/src/librustc/lint/context.rs

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,6 @@ enum TargetLint {
7575

7676
/// Temporary renaming, used for easing migration pain; see #16545
7777
Renamed(String, LintId),
78-
79-
/// Lint with this name existed previously, but has been removed/deprecated.
80-
/// The string argument is the reason for removal.
81-
Removed(String),
82-
}
83-
84-
enum FindLintError {
85-
NotFound,
86-
Removed
8778
}
8879

8980
impl LintStore {
@@ -175,42 +166,30 @@ impl LintStore {
175166
self.by_name.insert(old_name.to_string(), Renamed(new_name.to_string(), target));
176167
}
177168

178-
pub fn register_removed(&mut self, name: &str, reason: &str) {
179-
self.by_name.insert(name.into(), Removed(reason.into()));
180-
}
181-
182169
#[allow(unused_variables)]
183170
fn find_lint(&self, lint_name: &str, sess: &Session, span: Option<Span>)
184-
-> Result<LintId, FindLintError>
171+
-> Option<LintId>
185172
{
186173
match self.by_name.get(lint_name) {
187-
Some(&Id(lint_id)) => Ok(lint_id),
174+
Some(&Id(lint_id)) => Some(lint_id),
188175
Some(&Renamed(ref new_name, lint_id)) => {
189176
let warning = format!("lint {} has been renamed to {}",
190177
lint_name, new_name);
191178
match span {
192179
Some(span) => sess.span_warn(span, &warning[..]),
193180
None => sess.warn(&warning[..]),
194181
};
195-
Ok(lint_id)
196-
},
197-
Some(&Removed(ref reason)) => {
198-
let warning = format!("lint {} has been removed: {}", lint_name, reason);
199-
match span {
200-
Some(span) => sess.span_warn(span, &warning[..]),
201-
None => sess.warn(&warning[..])
202-
}
203-
Err(FindLintError::Removed)
204-
},
205-
None => Err(FindLintError::NotFound)
182+
Some(lint_id)
183+
}
184+
None => None
206185
}
207186
}
208187

209188
pub fn process_command_line(&mut self, sess: &Session) {
210189
for &(ref lint_name, level) in &sess.opts.lint_opts {
211190
match self.find_lint(&lint_name[..], sess, None) {
212-
Ok(lint_id) => self.set_level(lint_id, (level, CommandLine)),
213-
Err(_) => {
191+
Some(lint_id) => self.set_level(lint_id, (level, CommandLine)),
192+
None => {
214193
match self.lint_groups.iter().map(|(&x, pair)| (x, pair.0.clone()))
215194
.collect::<FnvHashMap<&'static str,
216195
Vec<LintId>>>()
@@ -419,8 +398,8 @@ impl<'a, 'tcx> Context<'a, 'tcx> {
419398
}
420399
Ok((lint_name, level, span)) => {
421400
match self.lints.find_lint(&lint_name, &self.tcx.sess, Some(span)) {
422-
Ok(lint_id) => vec![(lint_id, level, span)],
423-
Err(FindLintError::NotFound) => {
401+
Some(lint_id) => vec![(lint_id, level, span)],
402+
None => {
424403
match self.lints.lint_groups.get(&lint_name[..]) {
425404
Some(&(ref v, _)) => v.iter()
426405
.map(|lint_id: &LintId|
@@ -433,8 +412,7 @@ impl<'a, 'tcx> Context<'a, 'tcx> {
433412
continue;
434413
}
435414
}
436-
},
437-
Err(FindLintError::Removed) => { continue; }
415+
}
438416
}
439417
}
440418
};

trunk/src/librustc/middle/const_eval.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
#![allow(non_camel_case_types)]
12+
#![allow(unsigned_negation)]
1213

1314
use self::ConstVal::*;
1415

@@ -26,6 +27,7 @@ use util::num::ToPrimitive;
2627
use syntax::ast::{self, Expr};
2728
use syntax::ast_util;
2829
use syntax::codemap::Span;
30+
use syntax::feature_gate;
2931
use syntax::parse::token::InternedString;
3032
use syntax::ptr::P;
3133
use syntax::{codemap, visit};
@@ -743,6 +745,13 @@ pub fn eval_const_expr_with_substs<'tcx, S>(tcx: &ty::ctxt<'tcx>,
743745
Float(f) => Float(-f),
744746
Int(n) => try!(const_int_checked_neg(n, e, expr_int_type)),
745747
Uint(i) => {
748+
if !tcx.sess.features.borrow().negate_unsigned {
749+
feature_gate::emit_feature_err(
750+
&tcx.sess.parse_sess.span_diagnostic,
751+
"negate_unsigned",
752+
e.span,
753+
"unary negation of unsigned integers may be removed in the future");
754+
}
746755
try!(const_uint_checked_neg(i, e, expr_uint_type))
747756
}
748757
Str(_) => signal!(e, NegateOnString),

trunk/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+

trunk/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))

trunk/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
}

0 commit comments

Comments
 (0)