Skip to content

Commit 5329392

Browse files
committed
---
yaml --- r: 192495 b: refs/heads/auto c: 95602a7 h: refs/heads/master i: 192493: 268948a 192491: e84f60c 192487: 2ae0594 192479: f8dd29c v: v3
1 parent 2d67a7f commit 5329392

File tree

134 files changed

+597
-1431
lines changed

Some content is hidden

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

134 files changed

+597
-1431
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 6da0b9dedbc975c3d9ae973216745de9dab535d2
13+
refs/heads/auto: 95602a759d9190cad92279aa5929d30166f2255c
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/doc/trpl/SUMMARY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
* [More Strings](more-strings.md)
2323
* [Patterns](patterns.md)
2424
* [Method Syntax](method-syntax.md)
25-
* [Associated Types](associated-types.md)
2625
* [Closures](closures.md)
2726
* [Iterators](iterators.md)
2827
* [Generics](generics.md)

branches/auto/src/doc/trpl/associated-types.md

Lines changed: 0 additions & 202 deletions
This file was deleted.

branches/auto/src/doc/trpl/ownership.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,8 @@ Otherwise, it is an error to elide an output lifetime.
513513

514514
### Examples
515515

516-
Here are some examples of functions with elided lifetimes. We've paired each
517-
example of an elided lifetime with its expanded form.
516+
Here are some examples of functions with elided lifetimes, and the version of
517+
what the elided lifetimes are expand to:
518518

519519
```{rust,ignore}
520520
fn print(s: &str); // elided

branches/auto/src/libarena/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,8 @@ impl<T> TypedArenaChunk<T> {
429429
// Destroy the next chunk.
430430
let next = self.next;
431431
let size = calculate_size::<T>(self.capacity);
432-
deallocate(self as *mut TypedArenaChunk<T> as *mut u8, size,
432+
let self_ptr: *mut TypedArenaChunk<T> = self;
433+
deallocate(self_ptr as *mut u8, size,
433434
mem::min_align_of::<TypedArenaChunk<T>>());
434435
if !next.is_null() {
435436
let capacity = (*next).capacity;

branches/auto/src/libcollections/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
html_playground_url = "http://play.rust-lang.org/")]
2525
#![doc(test(no_crate_inject))]
2626

27+
#![allow(trivial_cast)]
28+
#![allow(trivial_numeric_cast)]
2729
#![feature(alloc)]
2830
#![feature(box_syntax)]
2931
#![feature(box_patterns)]

branches/auto/src/libcollections/vec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,8 +1199,8 @@ impl<T: PartialEq> Vec<T> {
11991199

12001200
// Avoid bounds checks by using unsafe pointers.
12011201
let p = self.as_mut_ptr();
1202-
let mut r = 1;
1203-
let mut w = 1;
1202+
let mut r: usize = 1;
1203+
let mut w: usize = 1;
12041204

12051205
while r < ln {
12061206
let p_r = p.offset(r as isize);

branches/auto/src/libcollectionstest/btree/set.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,15 @@ struct Counter<'a, 'b> {
4343
}
4444

4545
impl<'a, 'b, 'c> FnMut<(&'c i32,)> for Counter<'a, 'b> {
46+
type Output = bool;
47+
4648
extern "rust-call" fn call_mut(&mut self, (&x,): (&'c i32,)) -> bool {
4749
assert_eq!(x, self.expected[*self.i]);
4850
*self.i += 1;
4951
true
5052
}
5153
}
5254

53-
impl<'a, 'b, 'c> FnOnce<(&'c i32,)> for Counter<'a, 'b> {
54-
type Output = bool;
55-
56-
extern "rust-call" fn call_once(mut self, args: (&'c i32,)) -> bool {
57-
self.call_mut(args)
58-
}
59-
}
60-
6155
fn check<F>(a: &[i32], b: &[i32], expected: &[i32], f: F) where
6256
// FIXME Replace Counter with `Box<FnMut(_) -> _>`
6357
F: FnOnce(&BTreeSet<i32>, &BTreeSet<i32>, Counter) -> bool,

branches/auto/src/libcore/cell.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,11 @@ impl<T> UnsafeCell<T> {
713713
/// ```
714714
#[inline]
715715
#[stable(feature = "rust1", since = "1.0.0")]
716-
pub fn get(&self) -> *mut T { &self.value as *const T as *mut T }
716+
pub fn get(&self) -> *mut T {
717+
// FIXME(#23542) Replace with type ascription.
718+
#![allow(trivial_cast)]
719+
&self.value as *const T as *mut T
720+
}
717721

718722
/// Unwraps the value
719723
///

branches/auto/src/libcore/fmt/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,20 +833,26 @@ impl<T> Pointer for *const T {
833833
#[stable(feature = "rust1", since = "1.0.0")]
834834
impl<T> Pointer for *mut T {
835835
fn fmt(&self, f: &mut Formatter) -> Result {
836+
// FIXME(#23542) Replace with type ascription.
837+
#![allow(trivial_cast)]
836838
Pointer::fmt(&(*self as *const T), f)
837839
}
838840
}
839841

840842
#[stable(feature = "rust1", since = "1.0.0")]
841843
impl<'a, T> Pointer for &'a T {
842844
fn fmt(&self, f: &mut Formatter) -> Result {
845+
// FIXME(#23542) Replace with type ascription.
846+
#![allow(trivial_cast)]
843847
Pointer::fmt(&(*self as *const T), f)
844848
}
845849
}
846850

847851
#[stable(feature = "rust1", since = "1.0.0")]
848852
impl<'a, T> Pointer for &'a mut T {
849853
fn fmt(&self, f: &mut Formatter) -> Result {
854+
// FIXME(#23542) Replace with type ascription.
855+
#![allow(trivial_cast)]
850856
Pointer::fmt(&(&**self as *const T), f)
851857
}
852858
}

branches/auto/src/libcore/fmt/num.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// FIXME: #6220 Implement floating point formatting
1414

1515
#![allow(unsigned_negation)]
16+
#![allow(trivial_numeric_cast)]
1617

1718
use fmt;
1819
use iter::IteratorExt;

branches/auto/src/libcore/hash/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ mod impls {
182182
}
183183

184184
fn hash_slice<H: Hasher>(data: &[$ty], state: &mut H) {
185+
// FIXME(#23542) Replace with type ascription.
186+
#![allow(trivial_cast)]
185187
let newlen = data.len() * ::$ty::BYTES as usize;
186188
let ptr = data.as_ptr() as *const u8;
187189
state.write(unsafe { slice::from_raw_parts(ptr, newlen) })

branches/auto/src/libcore/mem.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,8 @@ pub fn drop<T>(_x: T) { }
313313
#[inline]
314314
#[stable(feature = "rust1", since = "1.0.0")]
315315
pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
316+
// FIXME(#23542) Replace with type ascription.
317+
#![allow(trivial_cast)]
316318
ptr::read(src as *const T as *const U)
317319
}
318320

branches/auto/src/libcore/num/i16.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
1313
#![stable(feature = "rust1", since = "1.0.0")]
1414
#![doc(primitive = "i16")]
15+
#![allow(trivial_numeric_cast)]
1516

1617
int_module! { i16, 16 }

branches/auto/src/libcore/num/i32.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
1313
#![stable(feature = "rust1", since = "1.0.0")]
1414
#![doc(primitive = "i32")]
15+
#![allow(trivial_numeric_cast)]
1516

1617
int_module! { i32, 32 }

branches/auto/src/libcore/num/i64.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
1313
#![stable(feature = "rust1", since = "1.0.0")]
1414
#![doc(primitive = "i64")]
15+
#![allow(trivial_numeric_cast)]
1516

1617
int_module! { i64, 64 }

branches/auto/src/libcore/num/i8.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
1313
#![stable(feature = "rust1", since = "1.0.0")]
1414
#![doc(primitive = "i8")]
15+
#![allow(trivial_numeric_cast)]
1516

1617
int_module! { i8, 8 }

branches/auto/src/libcore/num/int_macros.rs

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

1111
#![doc(hidden)]
12+
#![allow(trivial_numeric_cast)]
1213

1314
macro_rules! int_module { ($T:ty, $bits:expr) => (
1415

branches/auto/src/libcore/num/isize.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
1717
#![stable(feature = "rust1", since = "1.0.0")]
1818
#![doc(primitive = "isize")]
19+
#![allow(trivial_numeric_cast)]
1920

2021
#[cfg(target_pointer_width = "32")]
2122
int_module! { isize, 32 }

0 commit comments

Comments
 (0)