Skip to content

Commit df1e02e

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 151231 b: refs/heads/try2 c: e4bf643 h: refs/heads/master i: 151229: cf3eb18 151227: f1e4ed8 151223: 26b7e56 151215: 914dfd5 151199: 7603e9b 151167: d4ea20f v: v3
1 parent d5c9c9f commit df1e02e

Some content is hidden

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

43 files changed

+216
-205
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 9f836d5a53e20fde65aa3469fa1826228e7c273a
8+
refs/heads/try2: e4bf643b9975c4c18da87046a4f99e5a5c058a30
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/RELEASES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Version 0.10 (April 2014)
6363
documentation index page.
6464
* std: `std::condition` has been removed. All I/O errors are now propagated
6565
through the `Result` type. In order to assist with error handling, a
66-
`try!` macro for unwrapping errors with an early return and an lint for
66+
`try!` macro for unwrapping errors with an early return and a lint for
6767
unused results has been added. See #12039 for more information.
6868
* std: The `vec` module has been renamed to `slice`.
6969
* std: A new vector type, `Vec<T>`, has been added in preparation for DST.

branches/try2/src/compiletest/header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ fn parse_compile_flags(line: &str) -> Option<~str> {
170170
}
171171

172172
fn parse_run_flags(line: &str) -> Option<~str> {
173-
parse_name_value_directive(line, "run-flags".to_owned())
173+
parse_name_value_directive(line, ~"run-flags")
174174
}
175175

176176
fn parse_debugger_cmd(line: &str) -> Option<~str> {

branches/try2/src/doc/guide-lifetimes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ process is called *rooting*.
263263
The previous example demonstrated *rooting*, the process by which the
264264
compiler ensures that managed boxes remain live for the duration of a
265265
borrow. Unfortunately, rooting does not work for borrows of owned
266-
boxes, because it is not possible to have two references to a owned
266+
boxes, because it is not possible to have two references to an owned
267267
box.
268268

269269
For owned boxes, therefore, the compiler will only allow a borrow *if
@@ -462,7 +462,7 @@ of a `f64` as if it were a struct with two fields would be a memory
462462
safety violation.
463463

464464
So, in fact, for every `ref` binding, the compiler will impose the
465-
same rules as the ones we saw for borrowing the interior of a owned
465+
same rules as the ones we saw for borrowing the interior of an owned
466466
box: it must be able to guarantee that the `enum` will not be
467467
overwritten for the duration of the borrow. In fact, the compiler
468468
would accept the example we gave earlier. The example is safe because

branches/try2/src/doc/guide-unsafe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ standard library types, e.g. `Cell` and `RefCell`, that provide inner
5656
mutability by replacing compile time guarantees with dynamic checks at
5757
runtime.
5858

59-
An `&mut` reference has a stronger requirement: when a object has an
59+
An `&mut` reference has a stronger requirement: when an object has an
6060
`&mut T` pointing into it, then that `&mut` reference must be the only
6161
such usable path to that object in the whole program. That is, an
6262
`&mut` cannot alias with any other references.

branches/try2/src/doc/rust.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Comments in Rust code follow the general C++ style of line and block-comment for
161161
with no nesting of block-comment delimiters.
162162

163163
Line comments beginning with exactly _three_ slashes (`///`), and block
164-
comments beginning with a exactly one repeated asterisk in the block-open
164+
comments beginning with exactly one repeated asterisk in the block-open
165165
sequence (`/**`), are interpreted as a special syntax for `doc`
166166
[attributes](#attributes). That is, they are equivalent to writing
167167
`#[doc="..."]` around the body of the comment (this includes the comment
@@ -365,7 +365,7 @@ of integer literal suffix:
365365
give the literal the corresponding machine type.
366366

367367
The type of an _unsuffixed_ integer literal is determined by type inference.
368-
If a integer type can be _uniquely_ determined from the surrounding program
368+
If an integer type can be _uniquely_ determined from the surrounding program
369369
context, the unsuffixed integer literal has that type. If the program context
370370
underconstrains the type, the unsuffixed integer literal's type is `int`; if
371371
the program context overconstrains the type, it is considered a static type
@@ -2184,7 +2184,7 @@ Supported traits for `deriving` are:
21842184
* `Hash`, to iterate over the bytes in a data type.
21852185
* `Rand`, to create a random instance of a data type.
21862186
* `Default`, to create an empty instance of a data type.
2187-
* `Zero`, to create an zero instance of a numeric data type.
2187+
* `Zero`, to create a zero instance of a numeric data type.
21882188
* `FromPrimitive`, to create an instance from a numeric primitive.
21892189
* `Show`, to format a value using the `{}` formatter.
21902190

branches/try2/src/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2980,7 +2980,7 @@ fn main() {
29802980
}
29812981
~~~
29822982

2983-
In general, `use` creates an local alias:
2983+
In general, `use` creates a local alias:
29842984
An alternate path and a possibly different name to access the same item,
29852985
without touching the original, and with both being interchangeable.
29862986

branches/try2/src/etc/zsh/_rust

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ _rustc_opts_lint=(
6868
'unsafe-block[usage of an `unsafe` block]'
6969
'unstable[detects use of #\[unstable\] items (incl. items with no stability attribute)]'
7070
'unused-imports[imports that are never used]'
71-
'unused-must-use[unused result of an type flagged as #\[must_use\]]'
71+
'unused-must-use[unused result of a type flagged as #\[must_use\]]'
7272
"unused-mut[detect mut variables which don't need to be mutable]"
7373
'unused-result[unused result of an expression in a statement]'
7474
'unused-unsafe[unnecessary use of an `unsafe` block]'

branches/try2/src/libcollections/hashmap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,13 +698,13 @@ static INITIAL_LOAD_FACTOR: Fraction = (9, 10);
698698
/// book_reviews.insert("The Adventures of Sherlock Holmes", "Eye lyked it alot.");
699699
///
700700
/// // check for a specific one.
701-
/// if !book_reviews.contains_key(&("Les Misérables")) {
701+
/// if !book_reviews.contains_key(& &"Les Misérables") {
702702
/// println!("We've got {} reviews, but Les Misérables ain't one.",
703703
/// book_reviews.len());
704704
/// }
705705
///
706706
/// // oops, this review has a lot of spelling mistakes, let's delete it.
707-
/// book_reviews.remove(&("The Adventures of Sherlock Holmes"));
707+
/// book_reviews.remove(& &"The Adventures of Sherlock Holmes");
708708
///
709709
/// // look up the values associated with some keys.
710710
/// let to_find = ["Pride and Prejudice", "Alice's Adventure in Wonderland"];

branches/try2/src/libcollections/treemap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,10 +1651,10 @@ mod test_set {
16511651

16521652
// FIXME: #5801: this needs a type hint to compile...
16531653
let result: Option<(&uint, & &'static str)> = z.next();
1654-
assert_eq!(result.unwrap(), (&5u, &("bar")));
1654+
assert_eq!(result.unwrap(), (&5u, & &"bar"));
16551655

16561656
let result: Option<(&uint, & &'static str)> = z.next();
1657-
assert_eq!(result.unwrap(), (&11u, &("foo")));
1657+
assert_eq!(result.unwrap(), (&11u, & &"foo"));
16581658

16591659
let result: Option<(&uint, & &'static str)> = z.next();
16601660
assert!(result.is_none());

branches/try2/src/libgetopts/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ mod tests {
14411441
optmulti("l", "", "Desc", "VAL"));
14421442

14431443
let expected =
1444-
"Usage: fruits
1444+
~"Usage: fruits
14451445

14461446
Options:
14471447
-b --banana VAL Desc
@@ -1450,7 +1450,7 @@ Options:
14501450
-k --kiwi Desc
14511451
-p [VAL] Desc
14521452
-l VAL Desc
1453-
".to_owned();
1453+
";
14541454
14551455
let generated_usage = usage("Usage: fruits", optgroups.as_slice());
14561456

@@ -1471,13 +1471,13 @@ Options:
14711471
"This is a long description which _will_ be wrapped..+.."));
14721472

14731473
let expected =
1474-
"Usage: fruits
1474+
~"Usage: fruits
14751475

14761476
Options:
14771477
-k --kiwi This is a long description which won't be wrapped..+..
14781478
-a --apple This is a long description which _will_ be
14791479
wrapped..+..
1480-
".to_owned();
1480+
";
14811481
14821482
let usage = usage("Usage: fruits", optgroups.as_slice());
14831483

@@ -1496,14 +1496,14 @@ Options:
14961496
confuse the line wrapping; an apple costs 0.51€ in some parts of Europe."));
14971497

14981498
let expected =
1499-
"Usage: fruits
1499+
~"Usage: fruits
15001500

15011501
Options:
15021502
-k --k–w– The word kiwi is normally spelled with two i's
15031503
-a --apple This “description” has some characters that could
15041504
confuse the line wrapping; an apple costs 0.51in
15051505
some parts of Europe.
1506-
".to_owned();
1506+
";
15071507
15081508
let usage = usage("Usage: fruits", optgroups.as_slice());
15091509

branches/try2/src/libregex/parse.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,7 @@ impl<'a> Parser<'a> {
220220
try!(self.parse_group_opts())
221221
} else {
222222
self.caps += 1;
223-
self.stack.push(Paren(self.flags,
224-
self.caps,
225-
"".to_owned()))
223+
self.stack.push(Paren(self.flags, self.caps, ~""))
226224
}
227225
}
228226
')' => {
@@ -771,7 +769,7 @@ impl<'a> Parser<'a> {
771769
}
772770
if self.cur() == ':' {
773771
// Save the old flags with the opening paren.
774-
self.stack.push(Paren(self.flags, 0, "".to_owned()));
772+
self.stack.push(Paren(self.flags, 0, ~""));
775773
}
776774
self.flags = flags;
777775
return Ok(())

branches/try2/src/libregex_macros/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl<'a> NfaGen<'a> {
116116
|cx, name| match name {
117117
&Some(ref name) => {
118118
let name = name.as_slice();
119-
quote_expr!(cx, Some($name.to_owned()))
119+
quote_expr!(cx, Some(~$name))
120120
}
121121
&None => quote_expr!(cx, None),
122122
}
@@ -306,7 +306,7 @@ fn exec<'t>(which: ::regex::native::MatchKind, input: &'t str,
306306
}
307307

308308
::regex::Regex {
309-
original: $regex.to_owned(),
309+
original: ~$regex,
310310
names: vec!$cap_names,
311311
p: ::regex::native::Native(exec),
312312
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,7 @@ fn add_upstream_rust_crates(args: &mut Vec<~str>, sess: &Session,
13921392
// If you opted in to dynamic linking and we decided to emit a
13931393
// static output, you should probably be notified of such an event!
13941394
sess.warn("dynamic linking was preferred, but dependencies \
1395-
could not all be found in an dylib format.");
1395+
could not all be found in a dylib format.");
13961396
sess.warn("linking statically instead, using rlibs");
13971397
add_static_crates(args, sess, tmpdir, deps)
13981398
}

branches/try2/src/librustc/driver/driver.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,16 +1059,16 @@ pub fn build_session_(sopts: session::Options,
10591059

10601060
pub fn parse_pretty(sess: &Session, name: &str) -> PpMode {
10611061
match name {
1062-
"normal" => PpmNormal,
1063-
"expanded" => PpmExpanded,
1064-
"typed" => PpmTyped,
1065-
"expanded,identified" => PpmExpandedIdentified,
1066-
"identified" => PpmIdentified,
1067-
_ => {
1068-
sess.fatal("argument to `pretty` must be one of `normal`, \
1069-
`expanded`, `typed`, `identified`, \
1070-
or `expanded,identified`");
1071-
}
1062+
&"normal" => PpmNormal,
1063+
&"expanded" => PpmExpanded,
1064+
&"typed" => PpmTyped,
1065+
&"expanded,identified" => PpmExpandedIdentified,
1066+
&"identified" => PpmIdentified,
1067+
_ => {
1068+
sess.fatal("argument to `pretty` must be one of `normal`, \
1069+
`expanded`, `typed`, `identified`, \
1070+
or `expanded,identified`");
1071+
}
10721072
}
10731073
}
10741074

branches/try2/src/librustc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ pub fn run_compiler(args: &[~str]) {
300300
None::<d::PpMode> => {/* continue */ }
301301
}
302302

303-
if r.contains(&("ls".to_owned())) {
303+
if r.contains(&~"ls") {
304304
match input {
305305
d::FileInput(ref ifile) => {
306306
let mut stdout = io::stdout();

branches/try2/src/librustc/middle/lint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ fn check_crate_attrs_usage(cx: &Context, attrs: &[ast::Attribute]) {
10361036
if !iter.any(|other_attr| { name.equiv(other_attr) }) {
10371037
cx.span_lint(AttributeUsage, attr.span, "unknown crate attribute");
10381038
}
1039-
if name.equiv(&("link")) {
1039+
if name.equiv(& &"link") {
10401040
cx.tcx.sess.span_err(attr.span,
10411041
"obsolete crate `link` attribute");
10421042
cx.tcx.sess.note("the link attribute has been superceded by the crate_id \

branches/try2/src/librustc/middle/trans/reflect.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ impl<'a, 'b> Reflector<'a, 'b> {
189189
ty::ty_rptr(_, ref mt) => {
190190
match ty::get(mt.ty).sty {
191191
ty::ty_vec(ref mt, None) => {
192-
let (name, extra) = ("slice".to_owned(), Vec::new());
192+
let (name, extra) = (~"slice", Vec::new());
193193
let extra = extra.append(self.c_mt(mt).as_slice());
194-
self.visit("evec_".to_owned() + name, extra.as_slice())
194+
self.visit(~"evec_" + name, extra.as_slice())
195195
}
196196
ty::ty_str => self.visit("estr_slice".to_owned(), &[]),
197197
_ => {

branches/try2/src/librustc/middle/typeck/check/_match.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,8 +647,8 @@ pub fn check_pat(pcx: &pat_ctxt, pat: &ast::Pat, expected: ty::t) {
647647
ty::ty_vec(mt, None) => {
648648
fcx.type_error_message(pat.span,
649649
|_| {
650-
"unique vector patterns are no \
651-
longer supported".to_owned()
650+
~"unique vector patterns are no \
651+
longer supported"
652652
},
653653
expected,
654654
None);

0 commit comments

Comments
 (0)