Skip to content

Commit 908919a

Browse files
committed
---
yaml --- r: 124159 b: refs/heads/auto c: 2bc6547 h: refs/heads/master i: 124157: ea6f0cd 124155: 78a06c3 124151: 5038b27 124143: a023444 124127: 24f33ca 124095: e90f90a 124031: 89d553b 123903: 6b21faf v: v3
1 parent 7b81427 commit 908919a

File tree

153 files changed

+3709
-6519
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+3709
-6519
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: c523d86552d6797ad52acece4e2e65cb319ee4f2
16+
refs/heads/auto: 2bc6547a5a293d61a2485090fd1d1d8a57b6baee
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,5 @@ src/etc/dl
8686
.settings/
8787
/build
8888
i686-pc-mingw32/
89-
src/librustc_llvm/llvmdeps.rs
89+
src/librustc/lib/llvmdeps.rs
9090
*.pot

branches/auto/mk/crates.mk

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ TARGET_CRATES := libc std green rustuv native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time rand \
5454
url log regex graphviz core rlibc alloc debug rustrt \
5555
unicode
56-
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros \
57-
rustc_llvm rustc_back
56+
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros
5857
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5958
TOOLS := compiletest rustdoc rustc
6059

@@ -71,10 +70,8 @@ DEPS_green := std native:context_switch
7170
DEPS_rustuv := std native:uv native:uv_support
7271
DEPS_native := std
7372
DEPS_syntax := std term serialize log fmt_macros debug
74-
DEPS_rustc := syntax flate arena serialize getopts \
75-
time log graphviz debug rustc_llvm rustc_back
76-
DEPS_rustc_llvm := native:rustllvm libc std
77-
DEPS_rustc_back := std syntax rustc_llvm flate log libc
73+
DEPS_rustc := syntax native:rustllvm flate arena serialize getopts \
74+
time log graphviz debug
7875
DEPS_rustdoc := rustc native:hoedown serialize getopts \
7976
test time debug
8077
DEPS_flate := std native:miniz

branches/auto/mk/llvm.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ $(foreach host,$(CFG_HOST), \
5757
$(foreach host,$(CFG_HOST), \
5858
$(eval LLVM_CONFIGS := $(LLVM_CONFIGS) $(LLVM_CONFIG_$(host))))
5959

60-
$(S)src/librustc_llvm/llvmdeps.rs: \
60+
$(S)src/librustc/lib/llvmdeps.rs: \
6161
$(LLVM_CONFIGS) \
6262
$(S)src/etc/mklldeps.py \
6363
$(MKFILE_DEPS)

branches/auto/mk/target.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ SNAPSHOT_RUSTC_POST_CLEANUP=$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD))
134134

135135
define TARGET_HOST_RULES
136136

137-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.rustc_llvm: $(S)src/librustc_llvm/llvmdeps.rs
137+
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.rustc: $(S)src/librustc/lib/llvmdeps.rs
138138

139139
$$(TBIN$(1)_T_$(2)_H_$(3))/:
140140
mkdir -p $$@

branches/auto/src/compiletest/procsrv.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
use std::str;
1112
use std::io::process::{ProcessExit, Command, Process, ProcessOutput};
1213
use std::dynamic_lib::DynamicLibrary;
1314

@@ -24,7 +25,7 @@ fn add_target_env(cmd: &mut Command, lib_path: &str, aux_path: Option<&str>) {
2425
// Add the new dylib search path var
2526
let var = DynamicLibrary::envvar();
2627
let newpath = DynamicLibrary::create_path(path.as_slice());
27-
let newpath = String::from_utf8(newpath).unwrap();
28+
let newpath = str::from_utf8(newpath.as_slice()).unwrap().to_string();
2829
cmd.env(var.to_string(), newpath);
2930
}
3031

@@ -54,8 +55,8 @@ pub fn run(lib_path: &str,
5455

5556
Some(Result {
5657
status: status,
57-
out: String::from_utf8(output).unwrap(),
58-
err: String::from_utf8(error).unwrap()
58+
out: str::from_utf8(output.as_slice()).unwrap().to_string(),
59+
err: str::from_utf8(error.as_slice()).unwrap().to_string()
5960
})
6061
},
6162
Err(..) => None

branches/auto/src/compiletest/runtest.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
158158
match props.pp_exact { Some(_) => 1, None => 2 };
159159

160160
let src = File::open(testfile).read_to_end().unwrap();
161-
let src = String::from_utf8(src.clone()).unwrap();
161+
let src = str::from_utf8(src.as_slice()).unwrap().to_string();
162162
let mut srcs = vec!(src);
163163

164164
let mut round = 0;
@@ -185,10 +185,10 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
185185
Some(ref file) => {
186186
let filepath = testfile.dir_path().join(file);
187187
let s = File::open(&filepath).read_to_end().unwrap();
188-
String::from_utf8(s).unwrap()
189-
}
190-
None => { (*srcs.get(srcs.len() - 2u)).clone() }
191-
};
188+
str::from_utf8(s.as_slice()).unwrap().to_string()
189+
}
190+
None => { (*srcs.get(srcs.len() - 2u)).clone() }
191+
};
192192
let mut actual = (*srcs.get(srcs.len() - 1u)).clone();
193193

194194
if props.pp_exact.is_some() {
@@ -582,8 +582,8 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
582582
process.wait_with_output().unwrap();
583583

584584
(status,
585-
String::from_utf8(output).unwrap(),
586-
String::from_utf8(error).unwrap())
585+
str::from_utf8(output.as_slice()).unwrap().to_string(),
586+
str::from_utf8(error.as_slice()).unwrap().to_string())
587587
},
588588
Err(e) => {
589589
fatal(format!("Failed to setup Python process for \
@@ -813,7 +813,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
813813
c
814814
}
815815
} ).collect();
816-
String::from_chars(c.as_slice())
816+
str::from_chars(c.as_slice()).to_string()
817817
}
818818

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

branches/auto/src/doc/guide-ffi.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ the same stack as the rust stack. This means that there is no extra
173173
stack-switching mechanism in place because it is assumed that the large stack
174174
for the rust task is plenty for the C function to have.
175175

176-
A planned future improvement (not yet implemented at the time of this writing)
176+
A planned future improvement (net yet implemented at the time of this writing)
177177
is to have a guard page at the end of every rust stack. No rust function will
178178
hit this guard page (due to Rust's usage of LLVM's `__morestack`). The intention
179179
for this unmapped page is to prevent infinite recursion in C from overflowing
@@ -201,7 +201,7 @@ It is possible to pass functions defined in Rust to an external library.
201201
The requirement for this is that the callback function is marked as `extern`
202202
with the correct calling convention to make it callable from C code.
203203

204-
The callback function can then be sent through a registration call
204+
The callback function that can then be sent to through a registration call
205205
to the C library and afterwards be invoked from there.
206206

207207
A basic example is:
@@ -243,14 +243,14 @@ void trigger_callback() {
243243
}
244244
~~~~
245245
246-
In this example Rust's `main()` will call `do_callback()` in C,
247-
which would, in turn, call back to `callback()` in Rust.
246+
In this example will Rust's `main()` will call `do_callback()` in C,
247+
which would call back to `callback()` in Rust.
248248
249249
250-
## Targeting callbacks to Rust objects
250+
## Targetting callbacks to Rust objects
251251
252252
The former example showed how a global function can be called from C code.
253-
However it is often desired that the callback is targeted to a special
253+
However it is often desired that the callback is targetted to a special
254254
Rust object. This could be the object that represents the wrapper for the
255255
respective C object.
256256
@@ -334,7 +334,7 @@ it is also absolutely necessary that no more callbacks are performed by the
334334
C library after the respective Rust object gets destroyed.
335335
This can be achieved by unregistering the callback in the object's
336336
destructor and designing the library in a way that guarantees that no
337-
callback will be performed after deregistration.
337+
callback will be performed after unregistration.
338338
339339
# Linking
340340

0 commit comments

Comments
 (0)