Skip to content

Commit f92aec1

Browse files
committed
---
yaml --- r: 233317 b: refs/heads/beta c: 43f6c2f h: refs/heads/master i: 233315: 8d7811f v: v3
1 parent 63e17ba commit f92aec1

File tree

8 files changed

+4
-252
lines changed

8 files changed

+4
-252
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 021389f6adbb215bb8fe267c93bc1a9daeb2ec14
26+
refs/heads/beta: 43f6c2fab76fc7cf92876a7de70579e5b781196d
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/libcore/slice.rs

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ use ptr;
5050
use mem;
5151
use mem::size_of;
5252
use marker::{Send, Sync, self};
53-
use num::wrapping::OverflowingOps;
5453
use raw::Repr;
5554
// Avoid conflicts with *both* the Slice trait (buggy) and the `slice::raw` module.
5655
use raw::Slice as RawSlice;
@@ -1181,34 +1180,6 @@ impl<'a, T> Iterator for Windows<'a, T> {
11811180
(size, Some(size))
11821181
}
11831182
}
1184-
1185-
#[inline]
1186-
fn count(self) -> usize {
1187-
self.size_hint().0
1188-
}
1189-
1190-
#[inline]
1191-
fn nth(&mut self, n: usize) -> Option<Self::Item> {
1192-
let (end, overflow) = self.size.overflowing_add(n);
1193-
if end > self.v.len() || overflow {
1194-
self.v = &[];
1195-
None
1196-
} else {
1197-
let nth = &self.v[n..end];
1198-
self.v = &self.v[n+1..];
1199-
Some(nth)
1200-
}
1201-
}
1202-
1203-
#[inline]
1204-
fn last(self) -> Option<Self::Item> {
1205-
if self.size > self.v.len() {
1206-
None
1207-
} else {
1208-
let start = self.v.len() - self.size;
1209-
Some(&self.v[start..])
1210-
}
1211-
}
12121183
}
12131184

12141185
#[stable(feature = "rust1", since = "1.0.0")]
@@ -1295,38 +1266,6 @@ impl<'a, T> Iterator for Chunks<'a, T> {
12951266
(n, Some(n))
12961267
}
12971268
}
1298-
1299-
#[inline]
1300-
fn count(self) -> usize {
1301-
self.size_hint().0
1302-
}
1303-
1304-
#[inline]
1305-
fn nth(&mut self, n: usize) -> Option<Self::Item> {
1306-
let (start, overflow) = n.overflowing_mul(self.size);
1307-
if start >= self.v.len() || overflow {
1308-
self.v = &[];
1309-
None
1310-
} else {
1311-
let end = match start.checked_add(self.size) {
1312-
Some(sum) => cmp::min(self.v.len(), sum),
1313-
None => self.v.len(),
1314-
};
1315-
let nth = &self.v[start..end];
1316-
self.v = &self.v[end..];
1317-
Some(nth)
1318-
}
1319-
}
1320-
1321-
#[inline]
1322-
fn last(self) -> Option<Self::Item> {
1323-
if self.v.is_empty() {
1324-
None
1325-
} else {
1326-
let start = (self.v.len() - 1) / self.size * self.size;
1327-
Some(&self.v[start..])
1328-
}
1329-
}
13301269
}
13311270

13321271
#[stable(feature = "rust1", since = "1.0.0")]
@@ -1407,40 +1346,6 @@ impl<'a, T> Iterator for ChunksMut<'a, T> {
14071346
(n, Some(n))
14081347
}
14091348
}
1410-
1411-
#[inline]
1412-
fn count(self) -> usize {
1413-
self.size_hint().0
1414-
}
1415-
1416-
#[inline]
1417-
fn nth(&mut self, n: usize) -> Option<&'a mut [T]> {
1418-
let (start, overflow) = n.overflowing_mul(self.chunk_size);
1419-
if start >= self.v.len() || overflow {
1420-
self.v = &mut [];
1421-
None
1422-
} else {
1423-
let end = match start.checked_add(self.chunk_size) {
1424-
Some(sum) => cmp::min(self.v.len(), sum),
1425-
None => self.v.len(),
1426-
};
1427-
let tmp = mem::replace(&mut self.v, &mut []);
1428-
let (head, tail) = tmp.split_at_mut(end);
1429-
let (_, nth) = head.split_at_mut(start);
1430-
self.v = tail;
1431-
Some(nth)
1432-
}
1433-
}
1434-
1435-
#[inline]
1436-
fn last(self) -> Option<Self::Item> {
1437-
if self.v.is_empty() {
1438-
None
1439-
} else {
1440-
let start = (self.v.len() - 1) / self.chunk_size * self.chunk_size;
1441-
Some(&mut self.v[start..])
1442-
}
1443-
}
14441349
}
14451350

14461351
#[stable(feature = "rust1", since = "1.0.0")]

branches/beta/src/libcoretest/slice.rs

Lines changed: 0 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -64,123 +64,3 @@ fn test_iterator_count() {
6464
iter2.next();
6565
assert_eq!(iter2.count(), 3);
6666
}
67-
68-
#[test]
69-
fn test_chunks_count() {
70-
let v: &[i32] = &[0, 1, 2, 3, 4, 5];
71-
let c = v.chunks(3);
72-
assert_eq!(c.count(), 2);
73-
74-
let v2: &[i32] = &[0, 1, 2, 3, 4];
75-
let c2 = v2.chunks(2);
76-
assert_eq!(c2.count(), 3);
77-
78-
let v3: &[i32] = &[];
79-
let c3 = v3.chunks(2);
80-
assert_eq!(c3.count(), 0);
81-
}
82-
83-
#[test]
84-
fn test_chunks_nth() {
85-
let v: &[i32] = &[0, 1, 2, 3, 4, 5];
86-
let mut c = v.chunks(2);
87-
assert_eq!(c.nth(1).unwrap()[1], 3);
88-
assert_eq!(c.next().unwrap()[0], 4);
89-
90-
let v2: &[i32] = &[0, 1, 2, 3, 4];
91-
let mut c2 = v2.chunks(3);
92-
assert_eq!(c2.nth(1).unwrap()[1], 4);
93-
assert_eq!(c2.next(), None);
94-
}
95-
96-
#[test]
97-
fn test_chunks_last() {
98-
let v: &[i32] = &[0, 1, 2, 3, 4, 5];
99-
let c = v.chunks(2);
100-
assert_eq!(c.last().unwrap()[1], 5);
101-
102-
let v2: &[i32] = &[0, 1, 2, 3, 4];
103-
let c2 = v2.chunks(2);
104-
assert_eq!(c2.last().unwrap()[0], 4);
105-
}
106-
107-
#[test]
108-
fn test_chunks_mut_count() {
109-
let mut v: &mut [i32] = &mut [0, 1, 2, 3, 4, 5];
110-
let c = v.chunks_mut(3);
111-
assert_eq!(c.count(), 2);
112-
113-
let mut v2: &mut [i32] = &mut [0, 1, 2, 3, 4];
114-
let c2 = v2.chunks_mut(2);
115-
assert_eq!(c2.count(), 3);
116-
117-
let mut v3: &mut [i32] = &mut [];
118-
let c3 = v3.chunks_mut(2);
119-
assert_eq!(c3.count(), 0);
120-
}
121-
122-
#[test]
123-
fn test_chunks_mut_nth() {
124-
let mut v: &mut [i32] = &mut [0, 1, 2, 3, 4, 5];
125-
let mut c = v.chunks_mut(2);
126-
assert_eq!(c.nth(1).unwrap()[1], 3);
127-
assert_eq!(c.next().unwrap()[0], 4);
128-
129-
let mut v2: &mut [i32] = &mut [0, 1, 2, 3, 4];
130-
let mut c2 = v2.chunks_mut(3);
131-
assert_eq!(c2.nth(1).unwrap()[1], 4);
132-
assert_eq!(c2.next(), None);
133-
}
134-
135-
#[test]
136-
fn test_chunks_mut_last() {
137-
let v: &mut [i32] = &mut [0, 1, 2, 3, 4, 5];
138-
let c = v.chunks_mut(2);
139-
assert_eq!(c.last().unwrap()[1], 5);
140-
141-
let v2: &mut [i32] = &mut [0, 1, 2, 3, 4];
142-
let c2 = v2.chunks_mut(2);
143-
assert_eq!(c2.last().unwrap()[0], 4);
144-
}
145-
146-
147-
148-
149-
#[test]
150-
fn test_windows_count() {
151-
let v: &[i32] = &[0, 1, 2, 3, 4, 5];
152-
let c = v.windows(3);
153-
assert_eq!(c.count(), 4);
154-
155-
let v2: &[i32] = &[0, 1, 2, 3, 4];
156-
let c2 = v2.windows(6);
157-
assert_eq!(c2.count(), 0);
158-
159-
let v3: &[i32] = &[];
160-
let c3 = v3.windows(2);
161-
assert_eq!(c3.count(), 0);
162-
}
163-
164-
#[test]
165-
fn test_windows_nth() {
166-
let v: &[i32] = &[0, 1, 2, 3, 4, 5];
167-
let mut c = v.windows(2);
168-
assert_eq!(c.nth(2).unwrap()[1], 3);
169-
assert_eq!(c.next().unwrap()[0], 3);
170-
171-
let v2: &[i32] = &[0, 1, 2, 3, 4];
172-
let mut c2 = v2.windows(4);
173-
assert_eq!(c2.nth(1).unwrap()[1], 2);
174-
assert_eq!(c2.next(), None);
175-
}
176-
177-
#[test]
178-
fn test_windows_last() {
179-
let v: &[i32] = &[0, 1, 2, 3, 4, 5];
180-
let c = v.windows(2);
181-
assert_eq!(c.last().unwrap()[1], 5);
182-
183-
let v2: &[i32] = &[0, 1, 2, 3, 4];
184-
let c2 = v2.windows(2);
185-
assert_eq!(c2.last().unwrap()[0], 3);
186-
}

branches/beta/src/liblog/macros.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ macro_rules! info {
135135
($($arg:tt)*) => (log!(::log::INFO, $($arg)*))
136136
}
137137

138-
/// A convenience macro for logging at the debug log level. This macro can also
139-
/// be omitted at compile time by passing `-C debug-assertions` to the compiler. If
140-
/// this option is not passed, then debug statements will be compiled.
138+
/// A convenience macro for logging at the debug log level. This macro will
139+
/// be omitted at compile time in an optimized build unless `-C debug-assertions`
140+
/// is passed to the compiler.
141141
///
142142
/// # Examples
143143
///

branches/beta/src/librustc_resolve/build_reduced_graph.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -785,11 +785,6 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
785785
debug!("(building reduced graph for external \
786786
crate) building type {}", final_ident);
787787

788-
let modifiers = match new_parent.kind.get() {
789-
NormalModuleKind => modifiers,
790-
_ => modifiers & !DefModifiers::IMPORTABLE
791-
};
792-
793788
child_name_bindings.define_type(def, DUMMY_SP, modifiers);
794789
}
795790
DefStruct(def_id) => {

branches/beta/src/test/auxiliary/use_from_trait_xc.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,16 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(associated_consts)]
12-
1311
pub use self::sub::{Bar, Baz};
1412

1513
pub trait Trait {
1614
fn foo(&self);
17-
type Assoc;
18-
const CONST: u32;
1915
}
2016

2117
struct Foo;
2218

2319
impl Foo {
2420
pub fn new() {}
25-
26-
pub const C: u32 = 0;
2721
}
2822

2923
mod sub {

branches/beta/src/test/compile-fail/use-from-trait-xc.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,9 @@ extern crate use_from_trait_xc;
1515
use use_from_trait_xc::Trait::foo;
1616
//~^ ERROR `foo` is not directly importable
1717

18-
use use_from_trait_xc::Trait::Assoc;
19-
//~^ ERROR `Assoc` is not directly importable
20-
21-
use use_from_trait_xc::Trait::CONST;
22-
//~^ ERROR `CONST` is not directly importable
23-
2418
use use_from_trait_xc::Foo::new;
2519
//~^ ERROR `new` is not directly importable
2620

27-
use use_from_trait_xc::Foo::C;
28-
//~^ ERROR unresolved import `use_from_trait_xc::Foo::C`
29-
3021
use use_from_trait_xc::Bar::new as bnew;
3122
//~^ ERROR `bnew` is not directly importable
3223

branches/beta/src/test/compile-fail/use-from-trait.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,19 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(associated_consts)]
12-
1311
use Trait::foo;
1412
//~^ ERROR `foo` is not directly importable
15-
use Trait::Assoc;
16-
//~^ ERROR `Assoc` is not directly importable
17-
use Trait::C;
18-
//~^ ERROR `C` is not directly importable
19-
2013
use Foo::new;
2114
//~^ ERROR unresolved import `Foo::new`. Not a module `Foo`
2215

23-
use Foo::C2;
24-
//~^ ERROR unresolved import `Foo::C2`. Not a module `Foo`
25-
2616
pub trait Trait {
2717
fn foo();
28-
type Assoc;
29-
const C: u32;
3018
}
3119

3220
struct Foo;
3321

3422
impl Foo {
3523
fn new() {}
36-
const C2: u32 = 0;
3724
}
3825

3926
fn main() {}

0 commit comments

Comments
 (0)