Skip to content

Commit d213559

Browse files
committed
std: Use util::unreachable
1 parent 2c8c8f9 commit d213559

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/libstd/generic_os.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ fn getenv(n: str) -> option<str> {
8080
ret option::some(str::from_bytes(v)); // UTF-8 or fail
8181
} else { nsize = res; }
8282
}
83-
fail;
83+
util::unreachable();
8484
}
8585

8686
#[cfg(target_os = "win32")]

src/libstd/rope.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ mod node {
10281028
}
10291029
}
10301030
}
1031-
fail;//Note: unreachable
1031+
util::unreachable();
10321032
}
10331033

10341034
/*
@@ -1092,7 +1092,7 @@ mod node {
10921092
}
10931093
}
10941094
}
1095-
fail;
1095+
util::unreachable();
10961096
}
10971097

10981098
fn concat2(left: @node, right: @node) -> @node {
@@ -1176,7 +1176,7 @@ mod node {
11761176
}
11771177
}
11781178
}
1179-
fail;//unreachable
1179+
util::unreachable();
11801180
}
11811181

11821182
/*
@@ -1209,7 +1209,7 @@ mod node {
12091209
}
12101210
}
12111211
}
1212-
fail;//unreachable
1212+
util::unreachable();
12131213
}
12141214

12151215
mod leaf_iterator {
@@ -1248,7 +1248,7 @@ mod node {
12481248
}
12491249
}
12501250
}
1251-
fail;//unreachable
1251+
util::unreachable();
12521252
}
12531253
}
12541254

@@ -1292,7 +1292,7 @@ mod node {
12921292
}
12931293
}
12941294
}
1295-
fail;//unreachable
1295+
util::unreachable();
12961296
}
12971297

12981298
fn get_current_or_next_leaf(it: t) -> option<leaf> {

0 commit comments

Comments
 (0)