Skip to content

Commit f154a6b

Browse files
committed
---
yaml --- r: 235125 b: refs/heads/stable c: 66f757b h: refs/heads/master i: 235123: 9424afa v: v3
1 parent d69bb9d commit f154a6b

Some content is hidden

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

44 files changed

+377
-635
lines changed

[refs]

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

branches/stable/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Read ["Installing Rust"] from [The Book].
7373
```
7474
7575
3. Run `mingw32_shell.bat` or `mingw64_shell.bat` from wherever you installed
76-
MSYS2 (i.e. `C:\msys`), depending on whether you want 32-bit or 64-bit Rust.
76+
MYSY2 (i.e. `C:\msys`), depending on whether you want 32-bit or 64-bit Rust.
7777
7878
4. Navigate to Rust's source code, configure and build it:
7979

branches/stable/src/libcollections/str.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,8 +1859,6 @@ impl str {
18591859
/// # Examples
18601860
///
18611861
/// ```
1862-
/// #![feature(str_casing)]
1863-
///
18641862
/// let s = "HELLO";
18651863
/// assert_eq!(s.to_lowercase(), "hello");
18661864
/// ```
@@ -1905,8 +1903,6 @@ impl str {
19051903
/// # Examples
19061904
///
19071905
/// ```
1908-
/// #![feature(str_casing)]
1909-
///
19101906
/// let s = "hello";
19111907
/// assert_eq!(s.to_uppercase(), "HELLO");
19121908
/// ```

branches/stable/src/libcore/atomic.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,7 @@ unsafe fn atomic_store<T>(dst: *mut T, val: T, order:Ordering) {
953953
}
954954

955955
#[inline]
956+
#[stable(feature = "rust1", since = "1.0.0")]
956957
unsafe fn atomic_load<T>(dst: *const T, order:Ordering) -> T {
957958
match order {
958959
Acquire => intrinsics::atomic_load_acq(dst),
@@ -964,6 +965,7 @@ unsafe fn atomic_load<T>(dst: *const T, order:Ordering) -> T {
964965
}
965966

966967
#[inline]
968+
#[stable(feature = "rust1", since = "1.0.0")]
967969
unsafe fn atomic_swap<T>(dst: *mut T, val: T, order: Ordering) -> T {
968970
match order {
969971
Acquire => intrinsics::atomic_xchg_acq(dst, val),
@@ -976,6 +978,7 @@ unsafe fn atomic_swap<T>(dst: *mut T, val: T, order: Ordering) -> T {
976978

977979
/// Returns the old value (like __sync_fetch_and_add).
978980
#[inline]
981+
#[stable(feature = "rust1", since = "1.0.0")]
979982
unsafe fn atomic_add<T>(dst: *mut T, val: T, order: Ordering) -> T {
980983
match order {
981984
Acquire => intrinsics::atomic_xadd_acq(dst, val),
@@ -988,6 +991,7 @@ unsafe fn atomic_add<T>(dst: *mut T, val: T, order: Ordering) -> T {
988991

989992
/// Returns the old value (like __sync_fetch_and_sub).
990993
#[inline]
994+
#[stable(feature = "rust1", since = "1.0.0")]
991995
unsafe fn atomic_sub<T>(dst: *mut T, val: T, order: Ordering) -> T {
992996
match order {
993997
Acquire => intrinsics::atomic_xsub_acq(dst, val),
@@ -999,6 +1003,7 @@ unsafe fn atomic_sub<T>(dst: *mut T, val: T, order: Ordering) -> T {
9991003
}
10001004

10011005
#[inline]
1006+
#[stable(feature = "rust1", since = "1.0.0")]
10021007
unsafe fn atomic_compare_and_swap<T>(dst: *mut T, old:T, new:T, order: Ordering) -> T {
10031008
match order {
10041009
Acquire => intrinsics::atomic_cxchg_acq(dst, old, new),
@@ -1010,6 +1015,7 @@ unsafe fn atomic_compare_and_swap<T>(dst: *mut T, old:T, new:T, order: Ordering)
10101015
}
10111016

10121017
#[inline]
1018+
#[stable(feature = "rust1", since = "1.0.0")]
10131019
unsafe fn atomic_and<T>(dst: *mut T, val: T, order: Ordering) -> T {
10141020
match order {
10151021
Acquire => intrinsics::atomic_and_acq(dst, val),
@@ -1021,6 +1027,7 @@ unsafe fn atomic_and<T>(dst: *mut T, val: T, order: Ordering) -> T {
10211027
}
10221028

10231029
#[inline]
1030+
#[stable(feature = "rust1", since = "1.0.0")]
10241031
unsafe fn atomic_nand<T>(dst: *mut T, val: T, order: Ordering) -> T {
10251032
match order {
10261033
Acquire => intrinsics::atomic_nand_acq(dst, val),
@@ -1033,6 +1040,7 @@ unsafe fn atomic_nand<T>(dst: *mut T, val: T, order: Ordering) -> T {
10331040

10341041

10351042
#[inline]
1043+
#[stable(feature = "rust1", since = "1.0.0")]
10361044
unsafe fn atomic_or<T>(dst: *mut T, val: T, order: Ordering) -> T {
10371045
match order {
10381046
Acquire => intrinsics::atomic_or_acq(dst, val),
@@ -1045,6 +1053,7 @@ unsafe fn atomic_or<T>(dst: *mut T, val: T, order: Ordering) -> T {
10451053

10461054

10471055
#[inline]
1056+
#[stable(feature = "rust1", since = "1.0.0")]
10481057
unsafe fn atomic_xor<T>(dst: *mut T, val: T, order: Ordering) -> T {
10491058
match order {
10501059
Acquire => intrinsics::atomic_xor_acq(dst, val),

branches/stable/src/libcore/iter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2655,8 +2655,8 @@ macro_rules! step_impl_signed {
26552655
#[allow(trivial_numeric_casts)]
26562656
fn steps_between(start: &$t, end: &$t, by: &$t) -> Option<usize> {
26572657
if *by == 0 { return None; }
2658-
let diff: usize;
2659-
let by_u: usize;
2658+
let mut diff: usize;
2659+
let mut by_u: usize;
26602660
if *by > 0 {
26612661
if *start >= *end {
26622662
return Some(0);

branches/stable/src/libfmt_macros/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ impl<'a> Parser<'a> {
399399
}
400400
Some(..) | None => { return &self.input[..0]; }
401401
};
402-
let end;
402+
let mut end;
403403
loop {
404404
match self.cur.clone().next() {
405405
Some((_, c)) if c.is_xid_continue() => {

branches/stable/src/librustc/diagnostics.rs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,42 +1160,6 @@ static mut FOO: Option<Box<usize>> = None;
11601160
// error: mutable statics are not allowed to have destructors
11611161
static mut BAR: Option<Vec<i32>> = None;
11621162
```
1163-
"##,
1164-
1165-
E0398: r##"
1166-
In Rust 1.3, the default object lifetime bounds are expected to
1167-
change, as described in RFC #1156 [1]. You are getting a warning
1168-
because the compiler thinks it is possible that this change will cause
1169-
a compilation error in your code. It is possible, though unlikely,
1170-
that this is a false alarm.
1171-
1172-
The heart of the change is that where `&'a Box<SomeTrait>` used to
1173-
default to `&'a Box<SomeTrait+'a>`, it now defaults to `&'a
1174-
Box<SomeTrait+'static>` (here, `SomeTrait` is the name of some trait
1175-
type). Note that the only types which are affected are references to
1176-
boxes, like `&Box<SomeTrait>` or `&[Box<SomeTrait>]`. More common
1177-
types like `&SomeTrait` or `Box<SomeTrait>` are unaffected.
1178-
1179-
To silence this warning, edit your code to use an explicit bound.
1180-
Most of the time, this means that you will want to change the
1181-
signature of a function that you are calling. For example, if
1182-
the error is reported on a call like `foo(x)`, and `foo` is
1183-
defined as follows:
1184-
1185-
```
1186-
fn foo(arg: &Box<SomeTrait>) { ... }
1187-
```
1188-
1189-
you might change it to:
1190-
1191-
```
1192-
fn foo<'a>(arg: &Box<SomeTrait+'a>) { ... }
1193-
```
1194-
1195-
This explicitly states that you expect the trait object `SomeTrait` to
1196-
contain references (with a maximum lifetime of `'a`).
1197-
1198-
[1]: https://github.com/rust-lang/rfcs/pull/1156
11991163
"##
12001164

12011165
}

branches/stable/src/librustc/metadata/tydecode.rs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -843,15 +843,15 @@ fn parse_type_param_def_<'a, 'tcx, F>(st: &mut PState<'a, 'tcx>, conv: &mut F)
843843

844844
fn parse_object_lifetime_default<'a,'tcx, F>(st: &mut PState<'a,'tcx>,
845845
conv: &mut F)
846-
-> ty::ObjectLifetimeDefault
846+
-> Option<ty::ObjectLifetimeDefault>
847847
where F: FnMut(DefIdSource, ast::DefId) -> ast::DefId,
848848
{
849849
match next(st) {
850-
'a' => ty::ObjectLifetimeDefault::Ambiguous,
851-
'b' => ty::ObjectLifetimeDefault::BaseDefault,
850+
'n' => None,
851+
'a' => Some(ty::ObjectLifetimeDefault::Ambiguous),
852852
's' => {
853853
let region = parse_region_(st, conv);
854-
ty::ObjectLifetimeDefault::Specific(region)
854+
Some(ty::ObjectLifetimeDefault::Specific(region))
855855
}
856856
_ => panic!("parse_object_lifetime_default: bad input")
857857
}
@@ -887,16 +887,9 @@ fn parse_existential_bounds_<'a,'tcx, F>(st: &mut PState<'a,'tcx>,
887887
}
888888
}
889889

890-
let region_bound_will_change = match next(st) {
891-
'y' => true,
892-
'n' => false,
893-
c => panic!("parse_ty: expected y/n not '{}'", c)
894-
};
895-
896890
return ty::ExistentialBounds { region_bound: region_bound,
897891
builtin_bounds: builtin_bounds,
898-
projection_bounds: projection_bounds,
899-
region_bound_will_change: region_bound_will_change };
892+
projection_bounds: projection_bounds };
900893
}
901894

902895
fn parse_builtin_bounds<F>(st: &mut PState, mut _conv: F) -> ty::BuiltinBounds where

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,6 @@ pub fn enc_existential_bounds<'a,'tcx>(w: &mut Encoder,
390390
}
391391

392392
mywrite!(w, ".");
393-
394-
mywrite!(w, "{}", if bs.region_bound_will_change {'y'} else {'n'});
395393
}
396394

397395
pub fn enc_region_bounds<'a, 'tcx>(w: &mut Encoder,
@@ -416,12 +414,12 @@ pub fn enc_type_param_def<'a, 'tcx>(w: &mut Encoder, cx: &ctxt<'a, 'tcx>,
416414

417415
fn enc_object_lifetime_default<'a, 'tcx>(w: &mut Encoder,
418416
cx: &ctxt<'a, 'tcx>,
419-
default: ty::ObjectLifetimeDefault)
417+
default: Option<ty::ObjectLifetimeDefault>)
420418
{
421419
match default {
422-
ty::ObjectLifetimeDefault::Ambiguous => mywrite!(w, "a"),
423-
ty::ObjectLifetimeDefault::BaseDefault => mywrite!(w, "b"),
424-
ty::ObjectLifetimeDefault::Specific(r) => {
420+
None => mywrite!(w, "n"),
421+
Some(ty::ObjectLifetimeDefault::Ambiguous) => mywrite!(w, "a"),
422+
Some(ty::ObjectLifetimeDefault::Specific(r)) => {
425423
mywrite!(w, "s");
426424
enc_region(w, cx, r);
427425
}

branches/stable/src/librustc/middle/infer/bivariate.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@ impl<'a, 'tcx> TypeRelation<'a, 'tcx> for Bivariate<'a, 'tcx> {
4949

5050
fn a_is_expected(&self) -> bool { self.fields.a_is_expected }
5151

52-
fn will_change(&mut self, _: bool, _: bool) -> bool {
53-
// since we are not comparing regions, we don't care
54-
false
55-
}
56-
5752
fn relate_with_variance<T:Relate<'a,'tcx>>(&mut self,
5853
variance: ty::Variance,
5954
a: &T,

branches/stable/src/librustc/middle/infer/combine.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ pub struct CombineFields<'a, 'tcx: 'a> {
5656
pub infcx: &'a InferCtxt<'a, 'tcx>,
5757
pub a_is_expected: bool,
5858
pub trace: TypeTrace<'tcx>,
59-
pub cause: Option<ty_relate::Cause>,
6059
}
6160

6261
pub fn super_combine_tys<'a,'tcx:'a,R>(infcx: &InferCtxt<'a, 'tcx>,

branches/stable/src/librustc/middle/infer/equate.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ impl<'a, 'tcx> TypeRelation<'a,'tcx> for Equate<'a, 'tcx> {
3434

3535
fn a_is_expected(&self) -> bool { self.fields.a_is_expected }
3636

37-
fn will_change(&mut self, a: bool, b: bool) -> bool {
38-
// if either side changed from what it was, that could cause equality to fail
39-
a || b
40-
}
41-
4237
fn relate_with_variance<T:Relate<'a,'tcx>>(&mut self,
4338
_: ty::Variance,
4439
a: &T,

branches/stable/src/librustc/middle/infer/error_reporting.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,7 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> {
593593
sub: Region,
594594
sup: Region) {
595595
match origin {
596-
infer::Subtype(trace) |
597-
infer::DefaultExistentialBound(trace) => {
596+
infer::Subtype(trace) => {
598597
let terr = ty::terr_regions_does_not_outlive(sup, sub);
599598
self.report_and_explain_type_error(trace, &terr);
600599
}
@@ -1570,8 +1569,7 @@ impl<'a, 'tcx> ErrorReportingHelpers<'tcx> for InferCtxt<'a, 'tcx> {
15701569

15711570
fn note_region_origin(&self, origin: &SubregionOrigin<'tcx>) {
15721571
match *origin {
1573-
infer::Subtype(ref trace) |
1574-
infer::DefaultExistentialBound(ref trace) => {
1572+
infer::Subtype(ref trace) => {
15751573
let desc = match trace.origin {
15761574
infer::Misc(_) => {
15771575
"types are compatible"
@@ -1856,7 +1854,7 @@ impl LifeGiver {
18561854
}
18571855

18581856
fn give_lifetime(&self) -> ast::Lifetime {
1859-
let lifetime;
1857+
let mut lifetime;
18601858
loop {
18611859
let mut s = String::from("'");
18621860
s.push_str(&num_to_string(self.counter.get()));

branches/stable/src/librustc/middle/infer/glb.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,6 @@ impl<'a, 'tcx> TypeRelation<'a, 'tcx> for Glb<'a, 'tcx> {
3535

3636
fn a_is_expected(&self) -> bool { self.fields.a_is_expected }
3737

38-
fn will_change(&mut self, a: bool, b: bool) -> bool {
39-
// Hmm, so the result of GLB will still be a LB if one or both
40-
// sides change to 'static, but it may no longer be the GLB.
41-
// I'm going to go with `a || b` here to be conservative,
42-
// since the result of this operation may be affected, though
43-
// I think it would mostly be more accepting than before (since the result
44-
// would be a bigger region).
45-
a || b
46-
}
47-
4838
fn relate_with_variance<T:Relate<'a,'tcx>>(&mut self,
4939
variance: ty::Variance,
5040
a: &T,

branches/stable/src/librustc/middle/infer/lub.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ impl<'a, 'tcx> TypeRelation<'a, 'tcx> for Lub<'a, 'tcx> {
3535

3636
fn a_is_expected(&self) -> bool { self.fields.a_is_expected }
3737

38-
fn will_change(&mut self, a: bool, b: bool) -> bool {
39-
// result will be 'static if a || b
40-
a || b
41-
}
42-
4338
fn relate_with_variance<T:Relate<'a,'tcx>>(&mut self,
4439
variance: ty::Variance,
4540
a: &T,

branches/stable/src/librustc/middle/infer/mod.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,6 @@ pub enum SubregionOrigin<'tcx> {
194194
// Arose from a subtyping relation
195195
Subtype(TypeTrace<'tcx>),
196196

197-
// Arose from a subtyping relation
198-
DefaultExistentialBound(TypeTrace<'tcx>),
199-
200197
// Stack-allocated closures cannot outlive innermost loop
201198
// or function so as to ensure we only require finite stack
202199
InfStackClosure(Span),
@@ -661,8 +658,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
661658
-> CombineFields<'a, 'tcx> {
662659
CombineFields {infcx: self,
663660
a_is_expected: a_is_expected,
664-
trace: trace,
665-
cause: None}
661+
trace: trace}
666662
}
667663

668664
// public so that it can be used from the rustc_driver unit tests
@@ -1468,7 +1464,6 @@ impl<'tcx> SubregionOrigin<'tcx> {
14681464
pub fn span(&self) -> Span {
14691465
match *self {
14701466
Subtype(ref a) => a.span(),
1471-
DefaultExistentialBound(ref a) => a.span(),
14721467
InfStackClosure(a) => a,
14731468
InvokeClosure(a) => a,
14741469
DerefPointer(a) => a,

0 commit comments

Comments
 (0)