Skip to content

Commit 7e3f895

Browse files
killerswanbrson
authored andcommitted
---
yaml --- r: 7989 b: refs/heads/snap-stage3 c: fceec03 h: refs/heads/master i: 7987: d528ab1 v: v3
1 parent 32d56ab commit 7e3f895

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 6156bc56cbd1f40e538b59ff91ce9b8d89969ff3
4+
refs/heads/snap-stage3: fceec03da005edc82c90f1cbe1d102e8f365bad0
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/snap-stage3/src/comp/back/link.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,9 +562,9 @@ fn mangle_internal_name_by_seq(ccx: @crate_ctxt, flav: str) -> str {
562562
fn link_binary(sess: session,
563563
obj_filename: str,
564564
out_filename: str,
565-
lm: link_meta) unsafe {
565+
lm: link_meta) {
566566
// Converts a library file name into a gcc -l argument
567-
fn unlib(config: @session::config, filename: str) -> str {
567+
fn unlib(config: @session::config, filename: str) -> str unsafe {
568568
let rmlib = fn@(filename: str) -> str {
569569
if config.os == session::os_macos ||
570570
(config.os == session::os_linux ||

branches/snap-stage3/src/comp/syntax/codemap.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ fn span_to_lines(sp: span, cm: codemap::codemap) -> @file_lines {
108108
ret @{name: lo.filename, lines: lines};
109109
}
110110

111-
fn get_line(fm: filemap, line: int) -> str {
111+
fn get_line(fm: filemap, line: int) -> str unsafe {
112112
let begin: uint = fm.lines[line].byte - fm.start_pos.byte;
113113
let end: uint;
114114
if line as uint < vec::len(fm.lines) - 1u {
@@ -118,11 +118,11 @@ fn get_line(fm: filemap, line: int) -> str {
118118
// parsed. If we just slice the rest of the string, we'll print out
119119
// the remainder of the file, which is undesirable.
120120
end = str::byte_len(*fm.src);
121-
let rest = str::slice(*fm.src, begin, end);
121+
let rest = str::unsafe::slice(*fm.src, begin, end);
122122
let newline = str::index(rest, '\n' as u8);
123123
if newline != -1 { end = begin + (newline as uint); }
124124
}
125-
ret str::slice(*fm.src, begin, end);
125+
ret str::unsafe::slice(*fm.src, begin, end);
126126
}
127127

128128
fn get_filemap(cm: codemap, filename: str) -> filemap {

branches/snap-stage3/src/comp/syntax/parse/lexer.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,8 @@ fn all_whitespace(s: str, begin: uint, end: uint) -> bool {
579579
ret true;
580580
}
581581

582-
fn trim_whitespace_prefix_and_push_line(&lines: [str], s: str, col: uint) unsafe {
582+
fn trim_whitespace_prefix_and_push_line(&lines: [str],
583+
s: str, col: uint) unsafe {
583584
let s1;
584585
if all_whitespace(s, 0u, col) {
585586
if col < str::byte_len(s) {

branches/snap-stage3/src/compiletest/errors.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn load_errors(testfile: str) -> [expected_error] {
2222
ret error_patterns;
2323
}
2424

25-
fn parse_expected(line_num: uint, line: str) -> [expected_error] {
25+
fn parse_expected(line_num: uint, line: str) -> [expected_error] unsafe {
2626
let error_tag = "//!";
2727
let idx0 = str::find(line, error_tag);
2828
if idx0 < 0 { ret []; }
@@ -41,11 +41,11 @@ fn parse_expected(line_num: uint, line: str) -> [expected_error] {
4141
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
4242
let start_kind = idx;
4343
while idx < len && line[idx] != (' ' as u8) { idx += 1u; }
44-
let kind = str::to_lower(str::slice(line, start_kind, idx));
44+
let kind = str::to_lower(str::unsafe::slice(line, start_kind, idx));
4545

4646
// Extract msg:
4747
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
48-
let msg = str::slice(line, idx, len);
48+
let msg = str::unsafe::slice(line, idx, len);
4949

5050
#debug("line=%u kind=%s msg=%s", line_num - adjust_line, kind, msg);
5151

branches/snap-stage3/src/compiletest/header.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ fn parse_name_directive(line: str, directive: str) -> bool {
104104
}
105105

106106
fn parse_name_value_directive(line: str,
107-
directive: str) -> option<str> {
107+
directive: str) -> option<str> unsafe {
108108
let keycolon = directive + ":";
109109
if str::find(line, keycolon) >= 0 {
110110
let colon = str::find(line, keycolon) as uint;
111111
let value =
112-
str::slice(line, colon + str::byte_len(keycolon),
112+
str::unsafe::slice(line, colon + str::byte_len(keycolon),
113113
str::byte_len(line));
114114
#debug("%s: %s", directive, value);
115115
option::some(value)

0 commit comments

Comments
 (0)