Skip to content

Commit 66212cb

Browse files
committed
---
yaml --- r: 124574 b: refs/heads/auto c: cb404dd h: refs/heads/master v: v3
1 parent a3f8cc5 commit 66212cb

File tree

32 files changed

+483
-499
lines changed

32 files changed

+483
-499
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: f05a2c97b8e41177e531c4440519333057f9ac55
16+
refs/heads/auto: cb404dd4fbe30907ed53e9f9915e37d644382a12
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/libcollections/dlist.rs

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -278,23 +278,6 @@ impl<T> DList<T> {
278278
/// Move the last element to the front of the list.
279279
///
280280
/// If the list is empty, do nothing.
281-
///
282-
/// # Example
283-
///
284-
/// ```rust
285-
/// use std::collections::{DList, Deque};
286-
///
287-
/// let mut dl = DList::new();
288-
/// dl.push_back(1i);
289-
/// dl.push_back(2);
290-
/// dl.push_back(3);
291-
///
292-
/// dl.rotate_forward();
293-
///
294-
/// for e in dl.iter() {
295-
/// println!("{}", e); // prints 3, then 1, then 2
296-
/// }
297-
/// ```
298281
#[inline]
299282
pub fn rotate_forward(&mut self) {
300283
self.pop_back_node().map(|tail| {
@@ -305,23 +288,6 @@ impl<T> DList<T> {
305288
/// Move the first element to the back of the list.
306289
///
307290
/// If the list is empty, do nothing.
308-
///
309-
/// # Example
310-
///
311-
/// ```rust
312-
/// use std::collections::{DList, Deque};
313-
///
314-
/// let mut dl = DList::new();
315-
/// dl.push_back(1i);
316-
/// dl.push_back(2);
317-
/// dl.push_back(3);
318-
///
319-
/// dl.rotate_backward();
320-
///
321-
/// for e in dl.iter() {
322-
/// println!("{}", e); // prints 2, then 3, then 1
323-
/// }
324-
/// ```
325291
#[inline]
326292
pub fn rotate_backward(&mut self) {
327293
self.pop_front_node().map(|head| {
@@ -332,25 +298,6 @@ impl<T> DList<T> {
332298
/// Add all elements from `other` to the end of the list
333299
///
334300
/// O(1)
335-
///
336-
/// # Example
337-
///
338-
/// ```rust
339-
/// use std::collections::{DList, Deque};
340-
///
341-
/// let mut a = DList::new();
342-
/// let mut b = DList::new();
343-
/// a.push_back(1i);
344-
/// a.push_back(2);
345-
/// b.push_back(3i);
346-
/// b.push_back(4);
347-
///
348-
/// a.append(b);
349-
///
350-
/// for e in a.iter() {
351-
/// println!("{}", e); // prints 1, then 2, then 3, then 4
352-
/// }
353-
/// ```
354301
pub fn append(&mut self, mut other: DList<T>) {
355302
match self.list_tail.resolve() {
356303
None => *self = other,
@@ -373,25 +320,6 @@ impl<T> DList<T> {
373320
/// Add all elements from `other` to the beginning of the list
374321
///
375322
/// O(1)
376-
///
377-
/// # Example
378-
///
379-
/// ```rust
380-
/// use std::collections::{DList, Deque};
381-
///
382-
/// let mut a = DList::new();
383-
/// let mut b = DList::new();
384-
/// a.push_back(1i);
385-
/// a.push_back(2);
386-
/// b.push_back(3i);
387-
/// b.push_back(4);
388-
///
389-
/// a.prepend(b);
390-
///
391-
/// for e in a.iter() {
392-
/// println!("{}", e); // prints 3, then 4, then 1, then 2
393-
/// }
394-
/// ```
395323
#[inline]
396324
pub fn prepend(&mut self, mut other: DList<T>) {
397325
mem::swap(self, &mut other);
@@ -402,25 +330,6 @@ impl<T> DList<T> {
402330
/// or at the end.
403331
///
404332
/// O(N)
405-
///
406-
/// # Example
407-
///
408-
/// ```rust
409-
/// use std::collections::{DList, Deque};
410-
///
411-
/// let mut a: DList<int> = DList::new();
412-
/// a.push_back(2i);
413-
/// a.push_back(4);
414-
/// a.push_back(7);
415-
/// a.push_back(8);
416-
///
417-
/// // insert 11 before the first odd number in the list
418-
/// a.insert_when(11, |&e, _| e % 2 == 1);
419-
///
420-
/// for e in a.iter() {
421-
/// println!("{}", e); // prints 2, then 4, then 11, then 7, then 8
422-
/// }
423-
/// ```
424333
pub fn insert_when(&mut self, elt: T, f: |&T, &T| -> bool) {
425334
{
426335
let mut it = self.mut_iter();

branches/auto/src/librustc/back/link.rs

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -571,27 +571,15 @@ pub fn find_crate_name(sess: Option<&Session>,
571571
};
572572

573573
// Look in attributes 100% of the time to make sure the attribute is marked
574-
// as used. After doing this, however, we still prioritize a crate name from
575-
// the command line over one found in the #[crate_name] attribute. If we
576-
// find both we ensure that they're the same later on as well.
574+
// as used. After doing this, however, favor crate names from the command
575+
// line.
577576
let attr_crate_name = attrs.iter().find(|at| at.check_name("crate_name"))
578577
.and_then(|at| at.value_str().map(|s| (at, s)));
579578

580579
match sess {
581580
Some(sess) => {
582581
match sess.opts.crate_name {
583-
Some(ref s) => {
584-
match attr_crate_name {
585-
Some((attr, ref name)) if s.as_slice() != name.get() => {
586-
let msg = format!("--crate-name and #[crate_name] \
587-
are required to match, but `{}` \
588-
!= `{}`", s, name);
589-
sess.span_err(attr.span, msg.as_slice());
590-
}
591-
_ => {},
592-
}
593-
return validate(s.clone(), None);
594-
}
582+
Some(ref s) => return validate(s.clone(), None),
595583
None => {}
596584
}
597585
}
@@ -1559,7 +1547,7 @@ fn add_upstream_rust_crates(cmd: &mut Command, sess: &Session,
15591547
add_dynamic_crate(cmd, sess, src.dylib.unwrap())
15601548
}
15611549
cstore::RequireStatic => {
1562-
add_static_crate(cmd, sess, tmpdir, src.rlib.unwrap())
1550+
add_static_crate(cmd, sess, tmpdir, cnum, src.rlib.unwrap())
15631551
}
15641552
}
15651553

@@ -1576,7 +1564,7 @@ fn add_upstream_rust_crates(cmd: &mut Command, sess: &Session,
15761564

15771565
// Adds the static "rlib" versions of all crates to the command line.
15781566
fn add_static_crate(cmd: &mut Command, sess: &Session, tmpdir: &Path,
1579-
cratepath: Path) {
1567+
cnum: ast::CrateNum, cratepath: Path) {
15801568
// When performing LTO on an executable output, all of the
15811569
// bytecode from the upstream libraries has already been
15821570
// included in our object file output. We need to modify all of
@@ -1592,8 +1580,7 @@ fn add_upstream_rust_crates(cmd: &mut Command, sess: &Session,
15921580
// If we're not doing LTO, then our job is simply to just link
15931581
// against the archive.
15941582
if sess.lto() {
1595-
let name = cratepath.filename_str().unwrap();
1596-
let name = name.slice(3, name.len() - 5); // chop off lib/.rlib
1583+
let name = sess.cstore.get_crate_data(cnum).name.clone();
15971584
time(sess.time_passes(),
15981585
format!("altering {}.rlib", name).as_slice(),
15991586
(), |()| {

branches/auto/src/librustc/back/lto.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,17 @@ pub fn run(sess: &session::Session, llmod: ModuleRef,
5454
};
5555

5656
let archive = ArchiveRO::open(&path).expect("wanted an rlib");
57-
let file = path.filename_str().unwrap();
58-
let file = file.slice(3, file.len() - 5); // chop off lib/.rlib
59-
debug!("reading {}", file);
57+
debug!("reading {}", name);
6058
let bc = time(sess.time_passes(),
6159
format!("read {}.bytecode.deflate", name).as_slice(),
6260
(),
6361
|_| {
6462
archive.read(format!("{}.bytecode.deflate",
65-
file).as_slice())
63+
name).as_slice())
6664
});
6765
let bc = bc.expect("missing compressed bytecode in archive!");
6866
let bc = time(sess.time_passes(),
69-
format!("inflate {}.bc", file).as_slice(),
67+
format!("inflate {}.bc", name).as_slice(),
7068
(),
7169
|_| {
7270
match flate::inflate_bytes(bc) {

branches/auto/src/librustc/diagnostics.rs

Lines changed: 1 addition & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -110,68 +110,5 @@ register_diagnostics!(
110110
E0091,
111111
E0092,
112112
E0093,
113-
E0094,
114-
E0095,
115-
E0096,
116-
E0097,
117-
E0098,
118-
E0099,
119-
E0100,
120-
E0101,
121-
E0102,
122-
E0103,
123-
E0104,
124-
E0105,
125-
E0106,
126-
E0107,
127-
E0108,
128-
E0109,
129-
E0110,
130-
E0111,
131-
E0112,
132-
E0113,
133-
E0114,
134-
E0115,
135-
E0116,
136-
E0117,
137-
E0118,
138-
E0119,
139-
E0120,
140-
E0121,
141-
E0122,
142-
E0123,
143-
E0124,
144-
E0125,
145-
E0126,
146-
E0127,
147-
E0128,
148-
E0129,
149-
E0130,
150-
E0131,
151-
E0132,
152-
E0133,
153-
E0134,
154-
E0135,
155-
E0136,
156-
E0137,
157-
E0138,
158-
E0139,
159-
E0140,
160-
E0141,
161-
E0142,
162-
E0143,
163-
E0144,
164-
E0145,
165-
E0146,
166-
E0147,
167-
E0148,
168-
E0149,
169-
E0150,
170-
E0151,
171-
E0152,
172-
E0153,
173-
E0154,
174-
E0155,
175-
E0156,
176-
E0157
113+
E0094
177114
)

branches/auto/src/librustc/driver/driver.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,6 @@ pub struct OutputFilenames {
936936
pub out_directory: Path,
937937
pub out_filestem: String,
938938
pub single_output_file: Option<Path>,
939-
extra: String,
940939
}
941940

942941
impl OutputFilenames {
@@ -949,7 +948,7 @@ impl OutputFilenames {
949948
}
950949

951950
pub fn temp_path(&self, flavor: link::OutputType) -> Path {
952-
let base = self.out_directory.join(self.filestem());
951+
let base = self.out_directory.join(self.out_filestem.as_slice());
953952
match flavor {
954953
link::OutputTypeBitcode => base.with_extension("bc"),
955954
link::OutputTypeAssembly => base.with_extension("s"),
@@ -960,11 +959,8 @@ impl OutputFilenames {
960959
}
961960

962961
pub fn with_extension(&self, extension: &str) -> Path {
963-
self.out_directory.join(self.filestem()).with_extension(extension)
964-
}
965-
966-
fn filestem(&self) -> String {
967-
format!("{}{}", self.out_filestem, self.extra)
962+
let stem = self.out_filestem.as_slice();
963+
self.out_directory.join(stem).with_extension(extension)
968964
}
969965
}
970966

@@ -1004,7 +1000,6 @@ pub fn build_output_filenames(input: &Input,
10041000
out_directory: dirpath,
10051001
out_filestem: stem,
10061002
single_output_file: None,
1007-
extra: sess.opts.cg.extra_filename.clone(),
10081003
}
10091004
}
10101005

@@ -1023,7 +1018,6 @@ pub fn build_output_filenames(input: &Input,
10231018
out_directory: out_file.dir_path(),
10241019
out_filestem: out_file.filestem_str().unwrap().to_string(),
10251020
single_output_file: ofile,
1026-
extra: sess.opts.cg.extra_filename.clone(),
10271021
}
10281022
}
10291023
}

branches/auto/src/librustc/middle/borrowck/check_loans.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ impl<'a> CheckLoanCtxt<'a> {
172172
//! are issued for future scopes and thus they may have been
173173
//! *issued* but not yet be in effect.
174174
175-
self.dfcx_loans.each_bit_on_entry(scope_id, |loan_index| {
175+
self.dfcx_loans.each_bit_on_entry_frozen(scope_id, |loan_index| {
176176
let loan = &self.all_loans[loan_index];
177177
op(loan)
178178
})
@@ -271,7 +271,7 @@ impl<'a> CheckLoanCtxt<'a> {
271271
//! we encounter `scope_id`.
272272
273273
let mut result = Vec::new();
274-
self.dfcx_loans.each_gen_bit(scope_id, |loan_index| {
274+
self.dfcx_loans.each_gen_bit_frozen(scope_id, |loan_index| {
275275
result.push(loan_index);
276276
true
277277
});

branches/auto/src/librustc/middle/borrowck/move_data.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ impl<'a> FlowedMoveData<'a> {
576576
* Iterates through each path moved by `id`
577577
*/
578578

579-
self.dfcx_moves.each_gen_bit(id, |index| {
579+
self.dfcx_moves.each_gen_bit_frozen(id, |index| {
580580
let move = self.move_data.moves.borrow();
581581
let move = move.get(index);
582582
let moved_path = move.path;
@@ -592,7 +592,7 @@ impl<'a> FlowedMoveData<'a> {
592592
593593
let mut ret = None;
594594
for loan_path_index in self.move_data.path_map.borrow().find(&*loan_path).iter() {
595-
self.dfcx_moves.each_gen_bit(id, |move_index| {
595+
self.dfcx_moves.each_gen_bit_frozen(id, |move_index| {
596596
let move = self.move_data.moves.borrow();
597597
let move = move.get(move_index);
598598
if move.path == **loan_path_index {
@@ -637,7 +637,7 @@ impl<'a> FlowedMoveData<'a> {
637637

638638
let mut ret = true;
639639

640-
self.dfcx_moves.each_bit_on_entry(id, |index| {
640+
self.dfcx_moves.each_bit_on_entry_frozen(id, |index| {
641641
let move = self.move_data.moves.borrow();
642642
let move = move.get(index);
643643
let moved_path = move.path;
@@ -693,7 +693,7 @@ impl<'a> FlowedMoveData<'a> {
693693
}
694694
};
695695

696-
self.dfcx_assign.each_bit_on_entry(id, |index| {
696+
self.dfcx_assign.each_bit_on_entry_frozen(id, |index| {
697697
let assignment = self.move_data.var_assignments.borrow();
698698
let assignment = assignment.get(index);
699699
if assignment.path == loan_path_index && !f(assignment) {

0 commit comments

Comments
 (0)