Skip to content

Commit 6af64ac

Browse files
committed
---
yaml --- r: 65165 b: refs/heads/master c: d4724c1 h: refs/heads/master i: 65163: 36143d1 v: v3
1 parent f6a2484 commit 6af64ac

File tree

4 files changed

+30
-30
lines changed

4 files changed

+30
-30
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: d543354d6c56e8962b0c03397d43df3f16b07d03
2+
refs/heads/master: d4724c1a178252c240c9ad012fc3cba93f18babc
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/src/librustpkg/rustpkg.rc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ impl<'self> PkgScript<'self> {
126126
&exe, @copy os::args()[0],
127127
driver::cu_everything);
128128
debug!("Running program: %s %s %s", exe.to_str(), root.to_str(), what);
129-
let status = run::run_program(exe.to_str(), ~[root.to_str(), what]);
129+
let status = run::run_program(exe.to_str(), [root.to_str(), what]);
130130
if status != 0 {
131131
return (~[], status);
132132
}
133133
else {
134134
debug!("Running program (configs): %s %s %s",
135-
exe.to_str(), root.to_str(), ~"configs");
136-
let output = run::program_output(exe.to_str(), ~[root.to_str(), ~"configs"]);
135+
exe.to_str(), root.to_str(), "configs");
136+
let output = run::program_output(exe.to_str(), [root.to_str(), ~"configs"]);
137137
// Run the configs() function to get the configs
138138
let mut cfgs = ~[];
139139
for str::each_word(output.out) |w| {
@@ -360,9 +360,9 @@ pub fn main() {
360360
io::println("WARNING: The Rust package manager is experimental and may be unstable");
361361

362362
let args = os::args();
363-
let opts = ~[getopts::optflag(~"h"), getopts::optflag(~"help"),
364-
getopts::optflag(~"j"), getopts::optflag(~"json"),
365-
getopts::optmulti(~"c"), getopts::optmulti(~"cfg")];
363+
let opts = ~[getopts::optflag("h"), getopts::optflag("help"),
364+
getopts::optflag("j"), getopts::optflag("json"),
365+
getopts::optmulti("c"), getopts::optmulti("cfg")];
366366
let matches = &match getopts::getopts(args, opts) {
367367
result::Ok(m) => m,
368368
result::Err(f) => {
@@ -371,10 +371,10 @@ pub fn main() {
371371
return;
372372
}
373373
};
374-
let help = getopts::opt_present(matches, ~"h") ||
375-
getopts::opt_present(matches, ~"help");
376-
let json = getopts::opt_present(matches, ~"j") ||
377-
getopts::opt_present(matches, ~"json");
374+
let help = getopts::opt_present(matches, "h") ||
375+
getopts::opt_present(matches, "help");
376+
let json = getopts::opt_present(matches, "j") ||
377+
getopts::opt_present(matches, "json");
378378
let mut args = copy matches.free;
379379

380380
args.shift();
@@ -428,7 +428,7 @@ pub impl Crate {
428428

429429
fn flag(&self, flag: ~str) -> Crate {
430430
Crate {
431-
flags: vec::append(copy self.flags, ~[flag]),
431+
flags: vec::append(copy self.flags, [flag]),
432432
.. copy *self
433433
}
434434
}
@@ -442,7 +442,7 @@ pub impl Crate {
442442

443443
fn cfg(&self, cfg: ~str) -> Crate {
444444
Crate {
445-
cfgs: vec::append(copy self.cfgs, ~[cfg]),
445+
cfgs: vec::append(copy self.cfgs, [cfg]),
446446
.. copy *self
447447
}
448448
}
@@ -546,7 +546,7 @@ impl PkgSrc {
546546
let url = fmt!("https://%s", self.id.remote_path.to_str());
547547
util::note(fmt!("git clone %s %s", url, local.to_str()));
548548

549-
if run::program_output(~"git", ~[~"clone", copy url, local.to_str()]).status != 0 {
549+
if run::program_output("git", [~"clone", copy url, local.to_str()]).status != 0 {
550550
util::note(fmt!("fetching %s failed: can't clone repository", url));
551551
return false;
552552
}

trunk/src/librustpkg/usage.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use core::io;
1212

1313
pub fn general() {
14-
io::println(~"Usage: rustpkg [options] <cmd> [args..]
14+
io::println("Usage: rustpkg [options] <cmd> [args..]
1515
1616
Where <cmd> is one of:
1717
build, clean, do, info, install, prefer, test, uninstall, unprefer
@@ -23,7 +23,7 @@ Options:
2323
}
2424

2525
pub fn build() {
26-
io::println(~"rustpkg [options..] build
26+
io::println("rustpkg [options..] build
2727
2828
Build all targets described in the package script in the current
2929
directory.
@@ -33,21 +33,21 @@ Options:
3333
}
3434

3535
pub fn clean() {
36-
io::println(~"rustpkg clean
36+
io::println("rustpkg clean
3737
3838
Remove all build files in the work cache for the package in the current
3939
directory.");
4040
}
4141

4242
pub fn do_cmd() {
43-
io::println(~"rustpkg do <cmd>
43+
io::println("rustpkg do <cmd>
4444
4545
Runs a command in the package script. You can listen to a command
4646
by tagging a function with the attribute `#[pkg_do(cmd)]`.");
4747
}
4848

4949
pub fn info() {
50-
io::println(~"rustpkg [options..] info
50+
io::println("rustpkg [options..] info
5151
5252
Probe the package script in the current directory for information.
5353
@@ -56,7 +56,7 @@ Options:
5656
}
5757

5858
pub fn install() {
59-
io::println(~"rustpkg [options..] install [url] [target]
59+
io::println("rustpkg [options..] install [url] [target]
6060
6161
Install a package from a URL by Git or cURL (FTP, HTTP, etc.).
6262
If target is provided, Git will checkout the branch or tag before
@@ -76,14 +76,14 @@ Options:
7676
}
7777

7878
pub fn uninstall() {
79-
io::println(~"rustpkg uninstall <id|name>[@version]
79+
io::println("rustpkg uninstall <id|name>[@version]
8080
8181
Remove a package by id or name and optionally version. If the package(s)
8282
is/are depended on by another package then they cannot be removed.");
8383
}
8484

8585
pub fn prefer() {
86-
io::println(~"rustpkg [options..] prefer <id|name>[@version]
86+
io::println("rustpkg [options..] prefer <id|name>[@version]
8787
8888
By default all binaries are given a unique name so that multiple versions can
8989
coexist. The prefer command will symlink the uniquely named binary to
@@ -101,7 +101,7 @@ Example:
101101
}
102102

103103
pub fn unprefer() {
104-
io::println(~"rustpkg [options..] unprefer <id|name>[@version]
104+
io::println("rustpkg [options..] unprefer <id|name>[@version]
105105
106106
Remove all symlinks from the store to the binary directory for a package
107107
name and optionally version. If version is not supplied, the latest version
@@ -110,7 +110,7 @@ information.");
110110
}
111111

112112
pub fn test() {
113-
io::println(~"rustpkg [options..] test
113+
io::println("rustpkg [options..] test
114114
115115
Build all targets described in the package script in the current directory
116116
with the test flag. The test bootstraps will be run afterwards and the output

trunk/src/librustpkg/util.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ fn fold_item(ctx: @mut ReadyCtx,
208208
fold: @fold::ast_fold) -> Option<@ast::item> {
209209
ctx.path.push(item.ident);
210210

211-
let attrs = attr::find_attrs_by_name(item.attrs, ~"pkg_do");
211+
let attrs = attr::find_attrs_by_name(item.attrs, "pkg_do");
212212

213213
if attrs.len() > 0 {
214214
let mut cmds = ~[];
@@ -281,7 +281,7 @@ pub fn note(msg: ~str) {
281281

282282
if term::color_supported() {
283283
term::fg(out, term::color_green);
284-
out.write_str(~"note: ");
284+
out.write_str("note: ");
285285
term::reset(out);
286286
out.write_line(msg);
287287
} else {
@@ -294,7 +294,7 @@ pub fn warn(msg: ~str) {
294294
295295
if term::color_supported() {
296296
term::fg(out, term::color_yellow);
297-
out.write_str(~"warning: ");
297+
out.write_str("warning: ");
298298
term::reset(out);
299299
out.write_line(msg);
300300
} else {
@@ -307,7 +307,7 @@ pub fn error(msg: ~str) {
307307
308308
if term::color_supported() {
309309
term::fg(out, term::color_red);
310-
out.write_str(~"error: ");
310+
out.write_str("error: ");
311311
term::reset(out);
312312
out.write_line(msg);
313313
} else {
@@ -353,8 +353,8 @@ pub fn compile_input(sysroot: Option<@Path>,
353353
debug!("compiling %s into %s",
354354
in_file.to_str(),
355355
out_file.to_str());
356-
debug!("flags: %s", str::connect(flags, ~" "));
357-
debug!("cfgs: %s", str::connect(cfgs, ~" "));
356+
debug!("flags: %s", str::connect(flags, " "));
357+
debug!("cfgs: %s", str::connect(cfgs, " "));
358358
debug!("compile_input's sysroot = %?", sysroot);
359359

360360
let crate_type = match what {

0 commit comments

Comments
 (0)