Skip to content

Commit 2cc369c

Browse files
author
Jakub Wieczorek
committed
---
yaml --- r: 125655 b: refs/heads/try c: 5274e99 h: refs/heads/master i: 125653: 113f790 125651: f9cccd0 125647: c2eddd5 v: v3
1 parent dbac995 commit 2cc369c

File tree

98 files changed

+784
-2405
lines changed

Some content is hidden

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

98 files changed

+784
-2405
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: f2fa55903e378368ed9173560f03a0ef16e371c2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 9fc8394d3bce22ab483f98842434c84c396212ae
5-
refs/heads/try: fb4c3f0af287423489e54b6415452d3f7881b592
5+
refs/heads/try: 5274e997abc9273ef259199a1036f7753246bada
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/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/try/src/libcore/ops.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -749,23 +749,19 @@ pub trait DerefMut<Result>: Deref<Result> {
749749
#[lang="fn"]
750750
pub trait Fn<Args,Result> {
751751
/// This is called when the call operator is used.
752-
#[rust_call_abi_hack]
753752
fn call(&self, args: Args) -> Result;
754753
}
755754

756755
/// A version of the call operator that takes a mutable receiver.
757756
#[lang="fn_mut"]
758757
pub trait FnMut<Args,Result> {
759758
/// This is called when the call operator is used.
760-
#[rust_call_abi_hack]
761759
fn call_mut(&mut self, args: Args) -> Result;
762760
}
763761

764762
/// A version of the call operator that takes a by-value receiver.
765763
#[lang="fn_once"]
766764
pub trait FnOnce<Args,Result> {
767765
/// This is called when the call operator is used.
768-
#[rust_call_abi_hack]
769766
fn call_once(self, args: Args) -> Result;
770767
}
771-

branches/try/src/libcore/prelude.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ pub use ops::{BitAnd, BitOr, BitXor};
3535
pub use ops::{Drop, Deref, DerefMut};
3636
pub use ops::{Shl, Shr};
3737
pub use ops::{Index, IndexMut};
38-
pub use ops::{Fn, FnMut, FnOnce};
3938
pub use option::{Option, Some, None};
4039
pub use result::{Result, Ok, Err};
4140

branches/try/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/try/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/try/src/librustc/diagnostics.rs

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,68 @@ register_diagnostics!(
110110
E0091,
111111
E0092,
112112
E0093,
113-
E0094
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
114177
)

branches/try/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/try/src/librustc/front/feature_gate.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
6767
("quad_precision_float", Removed),
6868

6969
("rustc_diagnostic_macros", Active),
70-
("unboxed_closures", Active),
7170

7271
// A temporary feature gate used to enable parser extensions needed
7372
// to bootstrap fix for #5723.
@@ -328,12 +327,6 @@ impl<'a> Visitor<()> for Context<'a> {
328327
ast::ExprUnary(ast::UnBox, _) => {
329328
self.gate_box(e.span);
330329
}
331-
ast::ExprUnboxedFn(..) => {
332-
self.gate_feature("unboxed_closures",
333-
e.span,
334-
"unboxed closures are a work-in-progress \
335-
feature with known bugs");
336-
}
337330
_ => {}
338331
}
339332
visit::walk_expr(self, e, ());

branches/try/src/librustc/lint/builtin.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,9 +1451,6 @@ impl LintPass for Stability {
14511451
typeck::MethodStatic(def_id) => {
14521452
def_id
14531453
}
1454-
typeck::MethodStaticUnboxedClosure(def_id) => {
1455-
def_id
1456-
}
14571454
typeck::MethodParam(typeck::MethodParam {
14581455
trait_id: trait_id,
14591456
method_num: index,

0 commit comments

Comments
 (0)