Skip to content

Commit 135970e

Browse files
committed
---
yaml --- r: 80690 b: refs/heads/try c: cbe79bb h: refs/heads/master v: v3
1 parent 56f781a commit 135970e

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
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: 4c6bf4872012c010f84dc7fa2cdfe87522533f89
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cbd1eefbd350797b783df119fed7956d7e1c74ad
5-
refs/heads/try: 62166611e7510b86f395dbf19973e442fd43c403
5+
refs/heads/try: cbe79bbbd3062973add9306e958af4d87de98065
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librust/rust.rs

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,14 @@ struct Command<'self> {
6060
usage_full: UsageSource<'self>,
6161
}
6262

63-
static NUM_OF_COMMANDS: uint = 7;
64-
65-
// FIXME(#7617): should just be &'static [Command<'static>]
66-
// but mac os doesn't seem to like that and tries to loop
67-
// past the end of COMMANDS in usage thus passing garbage
68-
// to str::repeat and eventually malloc and crashing.
69-
static COMMANDS: [Command<'static>, .. NUM_OF_COMMANDS] = [
70-
Command{
63+
static COMMANDS: &'static [Command<'static>] = &'static [
64+
Command {
7165
cmd: "build",
7266
action: CallMain("rustc", rustc::main_args),
7367
usage_line: "compile rust source files",
7468
usage_full: UsgCall(rustc_help),
7569
},
76-
Command{
70+
Command {
7771
cmd: "run",
7872
action: Call(cmd_run),
7973
usage_line: "build an executable, and run it",
@@ -83,7 +77,7 @@ static COMMANDS: [Command<'static>, .. NUM_OF_COMMANDS] = [
8377
\n\nUsage:\trust run <filename> [<arguments>...]"
8478
)
8579
},
86-
Command{
80+
Command {
8781
cmd: "test",
8882
action: Call(cmd_test),
8983
usage_line: "build a test executable, and run it",
@@ -93,25 +87,25 @@ static COMMANDS: [Command<'static>, .. NUM_OF_COMMANDS] = [
9387
./<filestem>test~\"\n\nUsage:\trust test <filename>"
9488
)
9589
},
96-
Command{
90+
Command {
9791
cmd: "doc",
9892
action: CallMain("rustdoc", rustdoc::main_args),
9993
usage_line: "generate documentation from doc comments",
10094
usage_full: UsgCall(rustdoc::config::usage),
10195
},
102-
Command{
96+
Command {
10397
cmd: "pkg",
10498
action: CallMain("rustpkg", rustpkg::main_args),
10599
usage_line: "download, build, install rust packages",
106100
usage_full: UsgCall(rustpkg::usage::general),
107101
},
108-
Command{
102+
Command {
109103
cmd: "sketch",
110104
action: CallMain("rusti", rusti::main_args),
111105
usage_line: "run a rust interpreter",
112106
usage_full: UsgStr("\nUsage:\trusti"),
113107
},
114-
Command{
108+
Command {
115109
cmd: "help",
116110
action: Call(cmd_help),
117111
usage_line: "show detailed usage of a command",

0 commit comments

Comments
 (0)