Skip to content

Commit e8b0717

Browse files
committed
---
yaml --- r: 94068 b: refs/heads/try c: 9d64e46 h: refs/heads/master v: v3
1 parent 3649661 commit e8b0717

37 files changed

+157
-306
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: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5-
refs/heads/try: 5fa6bd526ef66ce9ce80e975340aa98bcc3596b7
5+
refs/heads/try: 9d64e46013096997627da62ecc65225bc22682e8
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/compiletest/procsrv.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ pub fn run(lib_path: &str,
6060
for input in input.iter() {
6161
process.input().write(input.as_bytes());
6262
}
63-
let output = process.finish_with_output();
63+
let run::ProcessOutput { status, output, error } = process.finish_with_output();
6464

6565
Result {
66-
status: output.status,
67-
out: str::from_utf8(output.output),
68-
err: str::from_utf8(output.error)
66+
status: status,
67+
out: str::from_utf8_owned(output),
68+
err: str::from_utf8_owned(error)
6969
}
7070
}
7171

@@ -90,4 +90,3 @@ pub fn run_background(lib_path: &str,
9090

9191
return process;
9292
}
93-

branches/try/src/compiletest/runtest.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
298298

299299
let adb_arg = format!("export LD_LIBRARY_PATH={}; gdbserver :5039 {}/{}",
300300
config.adb_test_dir.clone(), config.adb_test_dir.clone(),
301-
str::from_utf8(exe_file.filename().unwrap())).clone();
301+
str::from_utf8_slice(exe_file.filename().unwrap()));
302302

303303
let mut process = procsrv::run_background("", config.adb_path.clone(),
304304
[~"shell",adb_arg.clone()],~[(~"",~"")], Some(~""));
@@ -1151,4 +1151,3 @@ fn run_codegen_test(config: &config, props: &TestProps,
11511151
(base_lines as f64) / (clang_lines as f64),
11521152
0.001);
11531153
}
1154-

branches/try/src/etc/vim/syntax/rust.vim

Lines changed: 36 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: Patrick Walton <[email protected]>
44
" Maintainer: Ben Blum <[email protected]>
55
" Maintainer: Chris Morgan <[email protected]>
6-
" Last Change: 2013 Dec 04
6+
" Last Change: 2013 Oct 29
77

88
if version < 600
99
syntax clear
@@ -28,7 +28,6 @@ syn keyword rustKeyword use nextgroup=rustModPath skipwhite
2828
" FIXME: Scoped impl's name is also fallen in this category
2929
syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite
3030
syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite
31-
syn keyword rustKeyword proc
3231
syn keyword rustStorage const mut ref static
3332

3433
syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
@@ -90,7 +89,6 @@ syn keyword rustTrait Orderable Signed Unsigned Round
9089
syn keyword rustTrait Primitive Int Float ToStrRadix ToPrimitive FromPrimitive
9190
syn keyword rustTrait GenericPath Path PosixPath WindowsPath
9291
syn keyword rustTrait RawPtr
93-
syn keyword rustTrait Buffer Writer Reader Seek
9492
syn keyword rustTrait SendStr SendStrOwned SendStrStatic IntoSendStr
9593
syn keyword rustTrait Str StrVector StrSlice OwnedStr
9694
syn keyword rustTrait IterBytes
@@ -145,29 +143,38 @@ syn match rustOperator display "&&\|||"
145143
syn match rustMacro '\w\(\w\)*!' contains=rustAssert,rustFail
146144
syn match rustMacro '#\w\(\w\)*' contains=rustAssert,rustFail
147145

148-
syn match rustSpecialError display contained /\\./
146+
syn match rustFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn?]\|\[\^\=.[^]]*\]\)" contained
147+
syn match rustFormat display "%%" contained
149148
syn match rustSpecial display contained /\\\([nrt0\\'"]\|x\x\{2}\|u\x\{4}\|U\x\{8}\)/
150149
syn match rustStringContinuation display contained /\\\n\s*/
151-
syn region rustString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustSpecial,rustSpecialError,rustStringContinuation
150+
syn region rustString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustTodo,rustFormat,rustSpecial,rustStringContinuation
152151
syn region rustString start='r\z(#*\)"' end='"\z1'
153152

154153
syn region rustAttribute start="#\[" end="\]" contains=rustString,rustDeriving
155154
syn region rustDeriving start="deriving(" end=")" contained contains=rustTrait
156155

157156
" Number literals
158-
syn match rustDecNumber display "\<[0-9][0-9_]*\%([iu]\%(8\|16\|32\|64\)\=\)\="
159-
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(8\|16\|32\|64\)\=\)\="
160-
syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(8\|16\|32\|64\)\=\)\="
161-
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(8\|16\|32\|64\)\=\)\="
162-
163-
" To mark it as a float, it must have at least one of the three things integral values don't have:
164-
" a decimal point and more numbers; an exponent; and a type suffix.
165-
syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)\="
166-
syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\=\%([eE][+-]\=[0-9_]\+\)\(f32\|f64\)\="
167-
syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\=\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)"
168-
" Special case for numbers of the form "1." which are float literals, unless followed by
169-
" an identifier, which makes them integer literals with a method call or field access.
170-
syn match rustFloat display "\<[0-9][0-9_]*\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\@!"
157+
syn match rustNumber display "\<[0-9][0-9_]*\>"
158+
syn match rustNumber display "\<[0-9][0-9_]*\(u\|u8\|u16\|u32\|u64\)\>"
159+
syn match rustNumber display "\<[0-9][0-9_]*\(i\|i8\|i16\|i32\|i64\)\>"
160+
161+
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\>"
162+
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\(u\|u8\|u16\|u32\|u64\)\>"
163+
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\(i8\|i16\|i32\|i64\)\>"
164+
syn match rustOctNumber display "\<0o[0-7_]\+\>"
165+
syn match rustOctNumber display "\<0o[0-7_]\+\(u\|u8\|u16\|u32\|u64\)\>"
166+
syn match rustOctNumber display "\<0o[0-7_]\+\(i8\|i16\|i32\|i64\)\>"
167+
syn match rustBinNumber display "\<0b[01_]\+\>"
168+
syn match rustBinNumber display "\<0b[01_]\+\(u\|u8\|u16\|u32\|u64\)\>"
169+
syn match rustBinNumber display "\<0b[01_]\+\(i8\|i16\|i32\|i64\)\>"
170+
171+
syn match rustFloat display "\<[0-9][0-9_]*\(f\|f32\|f64\)\>"
172+
syn match rustFloat display "\<[0-9][0-9_]*\([eE][+-]\=[0-9_]\+\)\>"
173+
syn match rustFloat display "\<[0-9][0-9_]*\([eE][+-]\=[0-9_]\+\)\(f\|f32\|f64\)\>"
174+
syn match rustFloat display "\<[0-9][0-9_]*\.[0-9_]\+\>"
175+
syn match rustFloat display "\<[0-9][0-9_]*\.[0-9_]\+\(f\|f32\|f64\)\>"
176+
syn match rustFloat display "\<[0-9][0-9_]*\.[0-9_]\+\%([eE][+-]\=[0-9_]\+\)\>"
177+
syn match rustFloat display "\<[0-9][0-9_]*\.[0-9_]\+\%([eE][+-]\=[0-9_]\+\)\(f\|f32\|f64\)\>"
171178

172179
" For the benefit of delimitMate
173180
syn region rustLifetimeCandidate display start=/&'\%(\([^'\\]\|\\\(['nrt0\\\"]\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'\)\@!/ end=/[[:cntrl:][:space:][:punct:]]\@=\|$/ contains=rustSigil,rustLifetime
@@ -176,24 +183,12 @@ syn region rustGenericLifetimeCandidate display start=/\%(<\|,\s*\)\@<='/ end=/[
176183

177184
"rustLifetime must appear before rustCharacter, or chars will get the lifetime highlighting
178185
syn match rustLifetime display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*"
179-
syn match rustCharacter /'\([^'\\]\|\\\(.\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'/ contains=rustSpecial,rustSpecialError
180-
181-
syn cluster rustComment contains=rustCommentLine,rustCommentLineDoc,rustCommentBlock,rustCommentBlockDoc
182-
syn region rustCommentLine start="//" end="$" contains=rustTodo
183-
syn region rustCommentLineDoc start="//\%(//\@!\|!\)" end="$" contains=rustTodo
184-
syn region rustCommentBlock matchgroup=rustCommentBlock start="/\*\%(!\|\*[*/]\@!\)\@!" end="\*/" contains=rustTodo,@rustComment keepend extend
185-
syn region rustCommentBlockDoc matchgroup=rustCommentBlockDoc start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=rustTodo,@rustComment keepend extend
186-
" FIXME: this is a really ugly and not fully correct implementation. Most
187-
" importantly, a case like ``/* */*`` should have the final ``*`` not being in
188-
" a comment, but in practice at present it leaves comments open two levels
189-
" deep. But as long as you stay away from that particular case, I *believe*
190-
" the highlighting is correct. Due to the way Vim's syntax engine works
191-
" (greedy for start matches, unlike Rust's tokeniser which is searching for
192-
" the earliest-starting match, start or end), I believe this cannot be solved.
193-
" Oh you who would fix it, don't bother with things like duplicating the Block
194-
" rules and putting ``\*\@<!`` at the start of them; it makes it worse, as
195-
" then you must deal with cases like ``/*/**/*/``. And don't try making it
196-
" worse with ``\%(/\@<!\*\)\@<!``, either...
186+
syn match rustCharacter /'\([^'\\]\|\\\([nrt0\\'"]\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'/ contains=rustSpecial
187+
188+
syn region rustCommentML start="/\*" end="\*/" contains=rustTodo
189+
syn region rustComment start="//" end="$" contains=rustTodo keepend
190+
syn region rustCommentMLDoc start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=rustTodo
191+
syn region rustCommentDoc start="//\%(//\@!\|!\)" end="$" contains=rustTodo keepend
197192

198193
syn keyword rustTodo contained TODO FIXME XXX NB NOTE
199194

@@ -205,16 +200,15 @@ syn region rustFoldBraces start="{" end="}" transparent fold
205200
" It's not enabled by default as it would drive some people mad.
206201

207202
" Default highlighting {{{1
208-
hi def link rustDecNumber rustNumber
209203
hi def link rustHexNumber rustNumber
210204
hi def link rustOctNumber rustNumber
211205
hi def link rustBinNumber rustNumber
212206
hi def link rustIdentifierPrime rustIdentifier
213207
hi def link rustTrait rustType
214208

215209
hi def link rustSigil StorageClass
210+
hi def link rustFormat Special
216211
hi def link rustSpecial Special
217-
hi def link rustSpecialError Error
218212
hi def link rustStringContinuation Special
219213
hi def link rustString String
220214
hi def link rustCharacter Character
@@ -235,10 +229,10 @@ hi def link rustModPathSep Delimiter
235229
hi def link rustFunction Function
236230
hi def link rustFuncName Function
237231
hi def link rustFuncCall Function
238-
hi def link rustCommentLine Comment
239-
hi def link rustCommentLineDoc SpecialComment
240-
hi def link rustCommentBlock rustCommentLine
241-
hi def link rustCommentBlockDoc rustCommentLineDoc
232+
hi def link rustCommentMLDoc rustCommentDoc
233+
hi def link rustCommentDoc SpecialComment
234+
hi def link rustCommentML rustComment
235+
hi def link rustComment Comment
242236
hi def link rustAssert PreCondit
243237
hi def link rustFail PreCondit
244238
hi def link rustMacro Macro

branches/try/src/libextra/base64.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ impl<'self> FromBase64 for &'self str {
162162
* Convert any base64 encoded string (literal, `@`, `&`, or `~`)
163163
* to the byte values it encodes.
164164
*
165-
* You can use the `from_utf8` function in `std::str`
165+
* You can use the `from_utf8_owned` function in `std::str`
166166
* to turn a `[u8]` into a string with characters corresponding to those
167167
* values.
168168
*
@@ -180,7 +180,7 @@ impl<'self> FromBase64 for &'self str {
180180
* println!("base64 output: {}", hello_str);
181181
* let res = hello_str.from_base64();
182182
* if res.is_ok() {
183-
* let optBytes = str::from_utf8_opt(res.unwrap());
183+
* let optBytes = str::from_utf8_owned_opt(res.unwrap());
184184
* if optBytes.is_some() {
185185
* println!("decoded from base64: {}", optBytes.unwrap());
186186
* }

branches/try/src/libextra/hex.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl<'self> FromHex for &'self str {
6262
* Convert any hexadecimal encoded string (literal, `@`, `&`, or `~`)
6363
* to the byte values it encodes.
6464
*
65-
* You can use the `from_utf8` function in `std::str`
65+
* You can use the `from_utf8_owned` function in `std::str`
6666
* to turn a `[u8]` into a string with characters corresponding to those
6767
* values.
6868
*
@@ -80,7 +80,7 @@ impl<'self> FromHex for &'self str {
8080
* println!("{}", hello_str);
8181
* let bytes = hello_str.from_hex().unwrap();
8282
* println!("{:?}", bytes);
83-
* let result_str = str::from_utf8(bytes);
83+
* let result_str = str::from_utf8_owned(bytes);
8484
* println!("{}", result_str);
8585
* }
8686
* ```

branches/try/src/libextra/terminfo/parser/compiled.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,9 @@ pub fn parse(file: &mut io::Reader,
215215
return Err(~"incompatible file: more string offsets than expected");
216216
}
217217

218-
let names_str = str::from_utf8(file.read_bytes(names_bytes as uint - 1)); // don't read NUL
218+
// don't read NUL
219+
let names_str = str::from_utf8_owned(file.read_bytes(names_bytes as uint - 1));
220+
219221
let term_names: ~[~str] = names_str.split('|').map(|s| s.to_owned()).collect();
220222

221223
file.read_byte(); // consume NUL

branches/try/src/libextra/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ fn should_sort_failures_before_printing_them() {
701701

702702
st.write_failures();
703703
let s = match st.out {
704-
Right(ref m) => str::from_utf8(*m.inner_ref()),
704+
Right(ref m) => str::from_utf8_slice(*m.inner_ref()),
705705
Left(_) => unreachable!()
706706
};
707707

branches/try/src/libextra/uuid.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ impl Uuid {
310310
s[i*2+0] = digit[0];
311311
s[i*2+1] = digit[1];
312312
}
313-
str::from_utf8(s)
313+
str::from_utf8_owned(s)
314314
}
315315

316316
/// Returns a string of hexadecimal digits, separated into groups with a hypen

branches/try/src/libextra/workcache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ fn json_encode<'self, T:Encodable<json::Encoder<'self>>>(t: &T) -> ~str {
260260
let mut writer = MemWriter::new();
261261
let mut encoder = json::Encoder::init(&mut writer as &mut io::Writer);
262262
t.encode(&mut encoder);
263-
str::from_utf8(writer.inner_ref().as_slice())
263+
str::from_utf8_owned(writer.inner())
264264
}
265265

266266
// FIXME(#5121)

branches/try/src/librustc/back/archive.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ fn run_ar(sess: Session, args: &str, cwd: Option<&Path>,
4141
let o = Process::new(ar, args.as_slice(), opts).finish_with_output();
4242
if !o.status.success() {
4343
sess.err(format!("{} failed with: {}", ar, o.status));
44-
sess.note(format!("stdout ---\n{}", str::from_utf8(o.output)));
45-
sess.note(format!("stderr ---\n{}", str::from_utf8(o.error)));
44+
sess.note(format!("stdout ---\n{}", str::from_utf8_slice(o.output)));
45+
sess.note(format!("stderr ---\n{}", str::from_utf8_slice(o.error)));
4646
sess.abort_if_errors();
4747
}
4848
o

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ pub mod write {
368368
if !prog.status.success() {
369369
sess.err(format!("linking with `{}` failed: {}", cc, prog.status));
370370
sess.note(format!("{} arguments: '{}'", cc, args.connect("' '")));
371-
sess.note(str::from_utf8(prog.error + prog.output));
371+
sess.note(str::from_utf8_owned(prog.error + prog.output));
372372
sess.abort_if_errors();
373373
}
374374
}
@@ -1079,7 +1079,7 @@ fn link_natively(sess: Session, dylib: bool, obj_filename: &Path,
10791079
if !prog.status.success() {
10801080
sess.err(format!("linking with `{}` failed: {}", cc_prog, prog.status));
10811081
sess.note(format!("{} arguments: '{}'", cc_prog, cc_args.connect("' '")));
1082-
sess.note(str::from_utf8(prog.error + prog.output));
1082+
sess.note(str::from_utf8_owned(prog.error + prog.output));
10831083
sess.abort_if_errors();
10841084
}
10851085

branches/try/src/librustc/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Available lint options:
166166
max_key = num::max(name.len(), max_key);
167167
}
168168
fn padded(max: uint, s: &str) -> ~str {
169-
str::from_utf8(vec::from_elem(max - s.len(), ' ' as u8)) + s
169+
" ".repeat(max - s.len()) + s
170170
}
171171
println("\nAvailable lint checks:\n");
172172
println!(" {} {:7.7s} {}",
@@ -246,7 +246,7 @@ pub fn run_compiler(args: &[~str], demitter: @diagnostic::Emitter) {
246246
1u => {
247247
let ifile = matches.free[0].as_slice();
248248
if "-" == ifile {
249-
let src = str::from_utf8(io::stdin().read_to_end());
249+
let src = str::from_utf8_owned(io::stdin().read_to_end());
250250
str_input(src.to_managed())
251251
} else {
252252
file_input(Path::init(ifile))

branches/try/src/librustc/metadata/decoder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,8 +1274,8 @@ fn family_names_type(fam: Family) -> bool {
12741274
fn read_path(d: ebml::Doc) -> (~str, uint) {
12751275
reader::with_doc_data(d, |desc| {
12761276
let pos = u64_from_be_bytes(desc, 0u, 4u) as uint;
1277-
let pathbytes = desc.slice(4u, desc.len());
1278-
let path = str::from_utf8(pathbytes);
1277+
let pathbytes = desc.slice_from(4u).to_owned();
1278+
let path = str::from_utf8_owned(pathbytes);
12791279

12801280
(path, pos)
12811281
})

branches/try/src/librustc/metadata/encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1902,5 +1902,5 @@ pub fn encoded_ty(tcx: ty::ctxt, t: ty::t) -> ~str {
19021902
abbrevs: tyencode::ac_no_abbrevs};
19031903
let wr = @mut MemWriter::new();
19041904
tyencode::enc_ty(wr, cx, t);
1905-
str::from_utf8(*wr.inner_ref())
1905+
str::from_utf8_owned(wr.inner_ref().to_owned())
19061906
}

branches/try/src/librustc/metadata/tydecode.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ pub fn parse_ident(st: &mut PState, last: char) -> ast::Ident {
9797
}
9898

9999
fn parse_ident_(st: &mut PState, is_last: |char| -> bool) -> ast::Ident {
100-
let rslt = scan(st, is_last, str::from_utf8);
101-
return st.tcx.sess.ident_of(rslt);
100+
scan(st, is_last, |bytes| {
101+
st.tcx.sess.ident_of(str::from_utf8_slice(bytes))
102+
})
102103
}
103104

104105
pub fn parse_state_from_data<'a>(data: &'a [u8], crate_num: ast::CrateNum,
@@ -492,10 +493,11 @@ fn parse_abi_set(st: &mut PState) -> AbiSet {
492493
assert_eq!(next(st), '[');
493494
let mut abis = AbiSet::empty();
494495
while peek(st) != ']' {
495-
// FIXME(#5422) str API should not force this copy
496-
let abi_str = scan(st, |c| c == ',', str::from_utf8);
497-
let abi = abi::lookup(abi_str).expect(abi_str);
498-
abis.add(abi);
496+
scan(st, |c| c == ',', |bytes| {
497+
let abi_str = str::from_utf8_slice(bytes).to_owned();
498+
let abi = abi::lookup(abi_str).expect(abi_str);
499+
abis.add(abi);
500+
});
499501
}
500502
assert_eq!(next(st), ']');
501503
return abis;

branches/try/src/librustc/metadata/tyencode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub fn enc_ty(w: @mut MemWriter, cx: @ctxt, t: ty::t) {
7272
None => {
7373
let wr = @mut MemWriter::new();
7474
enc_sty(wr, cx, &ty::get(t).sty);
75-
let s = str::from_utf8(*wr.inner_ref()).to_managed();
75+
let s = str::from_utf8_slice(*wr.inner_ref()).to_managed();
7676
cx.tcx.short_names_cache.insert(t, s);
7777
s
7878
}

branches/try/src/librustc/middle/privacy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ impl<'self> Visitor<()> for EmbargoVisitor<'self> {
243243
ast::sty_static => public_ty,
244244
_ => true,
245245
} && method.vis == ast::public;
246-
if meth_public || tr.is_some() {
246+
if meth_public || public_trait {
247247
self.exported_items.insert(method.id);
248248
}
249249
}

0 commit comments

Comments
 (0)