Skip to content

Commit c656d3e

Browse files
committed
---
yaml --- r: 276543 b: refs/heads/try c: 13877ac h: refs/heads/master i: 276541: 9f53847 276539: 05dcd25 276535: 909b26a 276527: bde2411 276511: 2655537 276479: 1837f60
1 parent 1f689ef commit c656d3e

File tree

199 files changed

+1802
-4666
lines changed

Some content is hidden

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

199 files changed

+1802
-4666
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: 671027817c6ef7351db6dbb47cfac42cf5f0707a
4+
refs/heads/try: 13877ac4428cc9cbf6b07ad98e0f0b152381fac7
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
383383
@$$(call E, rustc: $$@)
384384
$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(2)) \
385385
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) -o $$@ $$< --test \
386-
-Cmetadata="test-crate" -L "$$(RT_OUTPUT_DIR_$(2))" \
386+
-L "$$(RT_OUTPUT_DIR_$(2))" \
387387
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
388388
$$(RUSTFLAGS_$(4))
389389

branches/try/src/compiletest/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ impl fmt::Display for Mode {
6969
#[derive(Clone)]
7070
pub struct Config {
7171
// The library paths required for running the compiler
72-
pub compile_lib_path: PathBuf,
72+
pub compile_lib_path: String,
7373

7474
// The library paths required for running compiled programs
75-
pub run_lib_path: PathBuf,
75+
pub run_lib_path: String,
7676

7777
// The rustc executable
7878
pub rustc_path: PathBuf,

branches/try/src/compiletest/compiletest.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,9 @@ pub fn parse_config(args: Vec<String> ) -> Config {
118118
}
119119
}
120120

121-
fn make_absolute(path: PathBuf) -> PathBuf {
122-
if path.is_relative() {
123-
env::current_dir().unwrap().join(path)
124-
} else {
125-
path
126-
}
127-
}
128-
129121
Config {
130-
compile_lib_path: make_absolute(opt_path(matches, "compile-lib-path")),
131-
run_lib_path: make_absolute(opt_path(matches, "run-lib-path")),
122+
compile_lib_path: matches.opt_str("compile-lib-path").unwrap(),
123+
run_lib_path: matches.opt_str("run-lib-path").unwrap(),
132124
rustc_path: opt_path(matches, "rustc-path"),
133125
rustdoc_path: opt_path(matches, "rustdoc-path"),
134126
python: matches.opt_str("python").unwrap(),

branches/try/src/compiletest/runtest.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ fn run_pretty_test_revision(config: &Config,
316316
testpaths,
317317
pretty_type.to_owned()),
318318
props.exec_env.clone(),
319-
config.compile_lib_path.to_str().unwrap(),
319+
&config.compile_lib_path,
320320
Some(aux_dir.to_str().unwrap()),
321321
Some(src))
322322
}
@@ -635,7 +635,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testpaths: &TestPa
635635
testpaths,
636636
proc_args,
637637
environment,
638-
config.run_lib_path.to_str().unwrap(),
638+
&config.run_lib_path,
639639
None,
640640
None);
641641
}
@@ -1315,7 +1315,7 @@ fn exec_compiled_test(config: &Config, props: &TestProps,
13151315
testpaths,
13161316
make_run_args(config, props, testpaths),
13171317
env,
1318-
config.run_lib_path.to_str().unwrap(),
1318+
&config.run_lib_path,
13191319
Some(aux_dir.to_str().unwrap()),
13201320
None)
13211321
}
@@ -1387,7 +1387,7 @@ fn compose_and_run_compiler(config: &Config, props: &TestProps,
13871387
&aux_testpaths,
13881388
aux_args,
13891389
Vec::new(),
1390-
config.compile_lib_path.to_str().unwrap(),
1390+
&config.compile_lib_path,
13911391
Some(aux_dir.to_str().unwrap()),
13921392
None);
13931393
if !auxres.status.success() {
@@ -1410,7 +1410,7 @@ fn compose_and_run_compiler(config: &Config, props: &TestProps,
14101410
testpaths,
14111411
args,
14121412
props.rustc_env.clone(),
1413-
config.compile_lib_path.to_str().unwrap(),
1413+
&config.compile_lib_path,
14141414
Some(aux_dir.to_str().unwrap()),
14151415
input)
14161416
}

branches/try/src/doc/book/drop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ BOOM times 100!!!
5555
BOOM times 1!!!
5656
```
5757

58-
The `tnt` goes off before the `firecracker` does, because it was declared
58+
The TNT goes off before the firecracker does, because it was declared
5959
afterwards. Last in, first out.
6060

6161
So what is `Drop` good for? Generally, `Drop` is used to clean up any resources

branches/try/src/libcore/clone.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,6 @@
1818
//! them cheap and safe to copy. For other types copies must be made
1919
//! explicitly, by convention implementing the `Clone` trait and calling
2020
//! the `clone` method.
21-
//!
22-
//! Basic usage example:
23-
//!
24-
//! ```
25-
//! let s = String::new(); // String type implements Clone
26-
//! let copy = s.clone(); // so we can clone it
27-
//! ```
28-
//!
29-
//! To easily implement the Clone trait, you can also use
30-
//! `#[derive(Clone)]`. Example:
31-
//!
32-
//! ```
33-
//! #[derive(Clone)] // we add the Clone trait to Morpheus struct
34-
//! struct Morpheus {
35-
//! blue_pill: f32,
36-
//! red_pill: i64,
37-
//! }
38-
//!
39-
//! fn main() {
40-
//! let f = Morpheus { blue_pill: 0.0, red_pill: 0 };
41-
//! let copy = f.clone(); // and now we can clone it!
42-
//! }
43-
//! ```
4421
4522
#![stable(feature = "rust1", since = "1.0.0")]
4623

branches/try/src/libcore/ops.rs

Lines changed: 6 additions & 208 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,24 +1446,7 @@ pub trait IndexMut<Idx: ?Sized>: Index<Idx> {
14461446
fn index_mut(&mut self, index: Idx) -> &mut Self::Output;
14471447
}
14481448

1449-
/// An unbounded range. Use `..` (two dots) for its shorthand.
1450-
///
1451-
/// Its primary use case is slicing index. It cannot serve as an iterator
1452-
/// because it doesn't have a starting point.
1453-
///
1454-
/// # Examples
1455-
///
1456-
/// ```
1457-
/// fn main() {
1458-
/// assert_eq!((..), std::ops::RangeFull);
1459-
///
1460-
/// let arr = [0, 1, 2, 3];
1461-
/// assert_eq!(arr[ .. ], [0,1,2,3]); // RangeFull
1462-
/// assert_eq!(arr[ ..3], [0,1,2 ]);
1463-
/// assert_eq!(arr[1.. ], [ 1,2,3]);
1464-
/// assert_eq!(arr[1..3], [ 1,2 ]);
1465-
/// }
1466-
/// ```
1449+
/// An unbounded range.
14671450
#[derive(Copy, Clone, PartialEq, Eq)]
14681451
#[stable(feature = "rust1", since = "1.0.0")]
14691452
pub struct RangeFull;
@@ -1475,26 +1458,7 @@ impl fmt::Debug for RangeFull {
14751458
}
14761459
}
14771460

1478-
/// A (half-open) range which is bounded at both ends: { x | start <= x < end }.
1479-
/// Use `start..end` (two dots) for its shorthand.
1480-
///
1481-
/// See the [`contains()`](#method.contains) method for its characterization.
1482-
///
1483-
/// # Examples
1484-
///
1485-
/// ```
1486-
/// #![feature(iter_arith)]
1487-
/// fn main() {
1488-
/// assert_eq!((3..5), std::ops::Range{ start: 3, end: 5 });
1489-
/// assert_eq!(3+4+5, (3..6).sum());
1490-
///
1491-
/// let arr = [0, 1, 2, 3];
1492-
/// assert_eq!(arr[ .. ], [0,1,2,3]);
1493-
/// assert_eq!(arr[ ..3], [0,1,2 ]);
1494-
/// assert_eq!(arr[1.. ], [ 1,2,3]);
1495-
/// assert_eq!(arr[1..3], [ 1,2 ]); // Range
1496-
/// }
1497-
/// ```
1461+
/// A (half-open) range which is bounded at both ends.
14981462
#[derive(Clone, PartialEq, Eq)]
14991463
#[stable(feature = "rust1", since = "1.0.0")]
15001464
pub struct Range<Idx> {
@@ -1513,47 +1477,7 @@ impl<Idx: fmt::Debug> fmt::Debug for Range<Idx> {
15131477
}
15141478
}
15151479

1516-
#[unstable(feature = "range_contains", reason = "recently added as per RFC", issue = "32311")]
1517-
impl<Idx: PartialOrd<Idx>> Range<Idx> {
1518-
/// # Examples
1519-
///
1520-
/// ```
1521-
/// #![feature(range_contains)]
1522-
/// fn main() {
1523-
/// assert!( ! (3..5).contains(2));
1524-
/// assert!( (3..5).contains(3));
1525-
/// assert!( (3..5).contains(4));
1526-
/// assert!( ! (3..5).contains(5));
1527-
///
1528-
/// assert!( ! (3..3).contains(3));
1529-
/// assert!( ! (3..2).contains(3));
1530-
/// }
1531-
/// ```
1532-
pub fn contains(&self, item: Idx) -> bool {
1533-
(self.start <= item) && (item < self.end)
1534-
}
1535-
}
1536-
1537-
/// A range which is only bounded below: { x | start <= x }.
1538-
/// Use `start..` for its shorthand.
1539-
///
1540-
/// See the [`contains()`](#method.contains) method for its characterization.
1541-
///
1542-
/// # Examples
1543-
///
1544-
/// ```
1545-
/// #![feature(iter_arith)]
1546-
/// fn main() {
1547-
/// assert_eq!((2..), std::ops::RangeFrom{ start: 2 });
1548-
/// assert_eq!(2+3+4, (2..).take(3).sum());
1549-
///
1550-
/// let arr = [0, 1, 2, 3];
1551-
/// assert_eq!(arr[ .. ], [0,1,2,3]);
1552-
/// assert_eq!(arr[ ..3], [0,1,2 ]);
1553-
/// assert_eq!(arr[1.. ], [ 1,2,3]); // RangeFrom
1554-
/// assert_eq!(arr[1..3], [ 1,2 ]);
1555-
/// }
1556-
/// ```
1480+
/// A range which is only bounded below.
15571481
#[derive(Clone, PartialEq, Eq)]
15581482
#[stable(feature = "rust1", since = "1.0.0")]
15591483
pub struct RangeFrom<Idx> {
@@ -1569,40 +1493,7 @@ impl<Idx: fmt::Debug> fmt::Debug for RangeFrom<Idx> {
15691493
}
15701494
}
15711495

1572-
#[unstable(feature = "range_contains", reason = "recently added as per RFC", issue = "32311")]
1573-
impl<Idx: PartialOrd<Idx>> RangeFrom<Idx> {
1574-
/// # Examples
1575-
///
1576-
/// ```
1577-
/// #![feature(range_contains)]
1578-
/// fn main() {
1579-
/// assert!( ! (3..).contains(2));
1580-
/// assert!( (3..).contains(3));
1581-
/// assert!( (3..).contains(1_000_000_000));
1582-
/// }
1583-
/// ```
1584-
pub fn contains(&self, item: Idx) -> bool {
1585-
(self.start <= item)
1586-
}
1587-
}
1588-
1589-
/// A range which is only bounded above: { x | x < end }.
1590-
/// Use `..end` (two dots) for its shorthand.
1591-
///
1592-
/// See the [`contains()`](#method.contains) method for its characterization.
1593-
///
1594-
/// It cannot serve as an iterator because it doesn't have a starting point.
1595-
/// ```
1596-
/// fn main() {
1597-
/// assert_eq!((..5), std::ops::RangeTo{ end: 5 });
1598-
///
1599-
/// let arr = [0, 1, 2, 3];
1600-
/// assert_eq!(arr[ .. ], [0,1,2,3]);
1601-
/// assert_eq!(arr[ ..3], [0,1,2 ]); // RangeTo
1602-
/// assert_eq!(arr[1.. ], [ 1,2,3]);
1603-
/// assert_eq!(arr[1..3], [ 1,2 ]);
1604-
/// }
1605-
/// ```
1496+
/// A range which is only bounded above.
16061497
#[derive(Copy, Clone, PartialEq, Eq)]
16071498
#[stable(feature = "rust1", since = "1.0.0")]
16081499
pub struct RangeTo<Idx> {
@@ -1618,41 +1509,7 @@ impl<Idx: fmt::Debug> fmt::Debug for RangeTo<Idx> {
16181509
}
16191510
}
16201511

1621-
#[unstable(feature = "range_contains", reason = "recently added as per RFC", issue = "32311")]
1622-
impl<Idx: PartialOrd<Idx>> RangeTo<Idx> {
1623-
/// # Examples
1624-
///
1625-
/// ```
1626-
/// #![feature(range_contains)]
1627-
/// fn main() {
1628-
/// assert!( (..5).contains(-1_000_000_000));
1629-
/// assert!( (..5).contains(4));
1630-
/// assert!( ! (..5).contains(5));
1631-
/// }
1632-
/// ```
1633-
pub fn contains(&self, item: Idx) -> bool {
1634-
(item < self.end)
1635-
}
1636-
}
1637-
1638-
/// An inclusive range which is bounded at both ends: { x | start <= x <= end }.
1639-
/// Use `start...end` (three dots) for its shorthand.
1640-
///
1641-
/// See the [`contains()`](#method.contains) method for its characterization.
1642-
///
1643-
/// # Examples
1644-
///
1645-
/// ```
1646-
/// #![feature(inclusive_range,inclusive_range_syntax,iter_arith)]
1647-
/// fn main() {
1648-
/// assert_eq!((3...5), std::ops::RangeInclusive::NonEmpty{ start: 3, end: 5 });
1649-
/// assert_eq!(3+4+5, (3...5).sum());
1650-
///
1651-
/// let arr = [0, 1, 2, 3];
1652-
/// assert_eq!(arr[ ...2], [0,1,2 ]);
1653-
/// assert_eq!(arr[1...2], [ 1,2 ]); // RangeInclusive
1654-
/// }
1655-
/// ```
1512+
/// An inclusive range which is bounded at both ends.
16561513
#[derive(Copy, Clone, PartialEq, Eq)]
16571514
#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")]
16581515
pub enum RangeInclusive<Idx> {
@@ -1715,49 +1572,7 @@ impl<Idx: PartialOrd + One + Sub<Output=Idx>> From<Range<Idx>> for RangeInclusiv
17151572
}
17161573
}
17171574

1718-
#[unstable(feature = "range_contains", reason = "recently added as per RFC", issue = "32311")]
1719-
impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
1720-
/// # Examples
1721-
///
1722-
/// ```
1723-
/// #![feature(range_contains,inclusive_range_syntax)]
1724-
/// fn main() {
1725-
/// assert!( ! (3...5).contains(2));
1726-
/// assert!( (3...5).contains(3));
1727-
/// assert!( (3...5).contains(4));
1728-
/// assert!( (3...5).contains(5));
1729-
/// assert!( ! (3...5).contains(6));
1730-
///
1731-
/// assert!( (3...3).contains(3));
1732-
/// assert!( ! (3...2).contains(3));
1733-
/// }
1734-
/// ```
1735-
pub fn contains(&self, item: Idx) -> bool {
1736-
if let &RangeInclusive::NonEmpty{ref start, ref end} = self {
1737-
(*start <= item) && (item <= *end)
1738-
} else { false }
1739-
}
1740-
}
1741-
1742-
/// An inclusive range which is only bounded above: { x | x <= end }.
1743-
/// Use `...end` (three dots) for its shorthand.
1744-
///
1745-
/// See the [`contains()`](#method.contains) method for its characterization.
1746-
///
1747-
/// It cannot serve as an iterator because it doesn't have a starting point.
1748-
///
1749-
/// # Examples
1750-
///
1751-
/// ```
1752-
/// #![feature(inclusive_range,inclusive_range_syntax)]
1753-
/// fn main() {
1754-
/// assert_eq!((...5), std::ops::RangeToInclusive{ end: 5 });
1755-
///
1756-
/// let arr = [0, 1, 2, 3];
1757-
/// assert_eq!(arr[ ...2], [0,1,2 ]); // RangeToInclusive
1758-
/// assert_eq!(arr[1...2], [ 1,2 ]);
1759-
/// }
1760-
/// ```
1575+
/// An inclusive range which is only bounded above.
17611576
#[derive(Copy, Clone, PartialEq, Eq)]
17621577
#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")]
17631578
pub struct RangeToInclusive<Idx> {
@@ -1775,23 +1590,6 @@ impl<Idx: fmt::Debug> fmt::Debug for RangeToInclusive<Idx> {
17751590
}
17761591
}
17771592

1778-
#[unstable(feature = "range_contains", reason = "recently added as per RFC", issue = "32311")]
1779-
impl<Idx: PartialOrd<Idx>> RangeToInclusive<Idx> {
1780-
/// # Examples
1781-
///
1782-
/// ```
1783-
/// #![feature(range_contains,inclusive_range_syntax)]
1784-
/// fn main() {
1785-
/// assert!( (...5).contains(-1_000_000_000));
1786-
/// assert!( (...5).contains(5));
1787-
/// assert!( ! (...5).contains(6));
1788-
/// }
1789-
/// ```
1790-
pub fn contains(&self, item: Idx) -> bool {
1791-
(item <= self.end)
1792-
}
1793-
}
1794-
17951593
// RangeToInclusive<Idx> cannot impl From<RangeTo<Idx>>
17961594
// because underflow would be possible with (..0).into()
17971595

0 commit comments

Comments
 (0)