Skip to content

Commit 6cb8555

Browse files
committed
---
yaml --- r: 124855 b: refs/heads/master c: 19e1f5c h: refs/heads/master i: 124853: 19047c5 124851: 451c21e 124847: 2d6f7ec v: v3
1 parent 163d1cd commit 6cb8555

File tree

505 files changed

+7244
-18955
lines changed

Some content is hidden

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

505 files changed

+7244
-18955
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 32f4d996ea2bea69fe363dca4e6e09b91bbd83f3
2+
refs/heads/master: 19e1f5cdb6a47070fd5f12993e947ea6db0eb5dd
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 9fc8394d3bce22ab483f98842434c84c396212ae
55
refs/heads/try: ac70b438a8382389c9c9b59c66b14774bff46e10

trunk/.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

trunk/man/rustc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ AST nodes and blocks with IDs), or flowgraph=<nodeid> (graphviz
6868
formatted flowgraph for node)
6969
.TP
7070
\fB\-\-dep-info\fR [FILENAME]
71-
Output dependency info to <filename> after compiling, in a format suitable
71+
Output dependency info to <filename> after compiling, in o format suitable
7272
for use by Makefiles.
7373
.TP
7474
\fB\-\-sysroot\fR PATH

trunk/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

trunk/mk/docs.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ DOCS := index intro tutorial guide guide-ffi guide-macros guide-lifetimes \
3030
guide-tasks guide-container guide-pointers guide-testing \
3131
guide-runtime complement-bugreport \
3232
complement-lang-faq complement-design-faq complement-project-faq rust \
33-
rustdoc guide-unsafe guide-strings
33+
rustdoc guide-unsafe
3434

3535
PDF_DOCS := tutorial rust
3636

@@ -112,8 +112,8 @@ HTML_DEPS += doc/version_info.html
112112
doc/version_info.html: $(D)/version_info.html.template $(MKFILE_DEPS) \
113113
$(wildcard $(D)/*.*) | doc/
114114
@$(call E, version-info: $@)
115-
$(Q)sed -e "s/VERSION/$(CFG_RELEASE)/; s/SHORT_HASH/$(\
116-
CFG_SHORT_VER_HASH)/;\
115+
$(Q)sed -e "s/VERSION/$(CFG_RELEASE)/; s/SHORT_HASH/$(shell echo \
116+
$(CFG_VER_HASH) | head -c 8)/;\
117117
s/STAMP/$(CFG_VER_HASH)/;" $< >$@
118118

119119
GENERATED += doc/version.tex doc/version_info.html

trunk/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)

trunk/mk/main.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT))),)
4646
ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT_DIR))),)
4747
CFG_VER_DATE = $(shell git --git-dir='$(CFG_GIT_DIR)' log -1 --pretty=format:'%ci')
4848
CFG_VER_HASH = $(shell git --git-dir='$(CFG_GIT_DIR)' rev-parse HEAD)
49-
CFG_SHORT_VER_HASH = $(shell git --git-dir='$(CFG_GIT_DIR)' rev-parse --short=9 HEAD)
50-
CFG_VERSION += ($(CFG_SHORT_VER_HASH) $(CFG_VER_DATE))
49+
CFG_VERSION += ($(CFG_VER_HASH) $(CFG_VER_DATE))
5150
endif
5251
endif
5352

@@ -378,7 +377,7 @@ define SREQ_CMDS
378377
ifeq ($$(OSTYPE_$(3)),apple-darwin)
379378
LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3) := DYLD_LIBRARY_PATH
380379
else
381-
ifeq ($$(CFG_WINDOWSY_$(3)),1)
380+
ifeq ($$(CFG_WINDOWSY_$(2)),1)
382381
LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3) := PATH
383382
else
384383
LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3) := LD_LIBRARY_PATH

trunk/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 $$@

trunk/src/compiletest/compiletest.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use std::io::fs;
3030
use std::from_str::FromStr;
3131
use getopts::{optopt, optflag, reqopt};
3232
use common::Config;
33-
use common::{Pretty, DebugInfoGdb, DebugInfoLldb, Codegen};
33+
use common::{Pretty, DebugInfoGdb, Codegen};
3434
use util::logv;
3535
use regex::Regex;
3636

@@ -89,9 +89,9 @@ pub fn parse_config(args: Vec<String> ) -> Config {
8989
optflag("h", "help", "show this message"));
9090

9191
assert!(!args.is_empty());
92-
let argv0 = args[0].clone();
92+
let argv0 = (*args.get(0)).clone();
9393
let args_ = args.tail();
94-
if args[1].as_slice() == "-h" || args[1].as_slice() == "--help" {
94+
if args.get(1).as_slice() == "-h" || args.get(1).as_slice() == "--help" {
9595
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
9696
println!("{}", getopts::usage(message.as_slice(), groups.as_slice()));
9797
println!("");
@@ -116,7 +116,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
116116
}
117117

118118
let filter = if !matches.free.is_empty() {
119-
let s = matches.free[0].as_slice();
119+
let s = matches.free.get(0).as_slice();
120120
match regex::Regex::new(s) {
121121
Ok(re) => Some(re),
122122
Err(e) => {
@@ -241,16 +241,6 @@ pub fn run_tests(config: &Config) {
241241
os::setenv("RUST_TEST_TASKS","1");
242242
}
243243

244-
match config.mode {
245-
DebugInfoLldb => {
246-
// Some older versions of LLDB seem to have problems with multiple
247-
// instances running in parallel, so only run one test task at a
248-
// time.
249-
os::setenv("RUST_TEST_TASKS", "1");
250-
}
251-
_ => { /* proceed */ }
252-
}
253-
254244
let opts = test_opts(config);
255245
let tests = make_tests(config);
256246
// sadly osx needs some file descriptor limits raised for running tests in

trunk/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

trunk/src/compiletest/runtest.rs

Lines changed: 19 additions & 29 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;
@@ -167,7 +167,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
167167
let proc_res = print_source(config,
168168
props,
169169
testfile,
170-
srcs[round].to_string(),
170+
(*srcs.get(round)).to_string(),
171171
"normal");
172172

173173
if !proc_res.status.success() {
@@ -185,11 +185,11 @@ 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[srcs.len() - 2u].clone() }
191-
};
192-
let mut actual = srcs[srcs.len() - 1u].clone();
188+
str::from_utf8(s.as_slice()).unwrap().to_string()
189+
}
190+
None => { (*srcs.get(srcs.len() - 2u)).clone() }
191+
};
192+
let mut actual = (*srcs.get(srcs.len() - 1u)).clone();
193193

194194
if props.pp_exact.is_some() {
195195
// Now we have to care about line endings
@@ -209,7 +209,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
209209
if props.no_pretty_expanded { return }
210210

211211
// additionally, run `--pretty expanded` and try to build it.
212-
let proc_res = print_source(config, props, testfile, srcs[round].clone(), "expanded");
212+
let proc_res = print_source(config, props, testfile, (*srcs.get(round)).clone(), "expanded");
213213
if !proc_res.status.success() {
214214
fatal_proc_rec("pretty-printing (expanded) failed", &proc_res);
215215
}
@@ -536,16 +536,6 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
536536
// We don't want to hang when calling `quit` while the process is still running
537537
let mut script_str = String::from_str("settings set auto-confirm true\n");
538538

539-
// Make LLDB emit its version, so we have it documented in the test output
540-
script_str.push_str("version\n");
541-
542-
// Switch LLDB into "Rust mode"
543-
script_str.push_str("command script import ./src/etc/lldb_rust_formatters.py\n");
544-
script_str.push_str("type summary add --no-value ");
545-
script_str.push_str("--python-function lldb_rust_formatters.print_val ");
546-
script_str.push_str("-x \".*\" --category Rust\n");
547-
script_str.push_str("type category enable Rust\n");
548-
549539
// Set breakpoints on every line that contains the string "#break"
550540
for line in breakpoint_lines.iter() {
551541
script_str.push_str(format!("breakpoint set --line {}\n",
@@ -592,8 +582,8 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
592582
process.wait_with_output().unwrap();
593583

594584
(status,
595-
String::from_utf8(output).unwrap(),
596-
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())
597587
},
598588
Err(e) => {
599589
fatal(format!("Failed to setup Python process for \
@@ -702,7 +692,7 @@ fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String])
702692
let mut rest = line.trim();
703693
let mut first = true;
704694
let mut failed = false;
705-
for frag in check_fragments[i].iter() {
695+
for frag in check_fragments.get(i).iter() {
706696
let found = if first {
707697
if rest.starts_with(frag.as_slice()) {
708698
Some(0)
@@ -752,7 +742,7 @@ fn check_error_patterns(props: &TestProps,
752742
}
753743

754744
let mut next_err_idx = 0u;
755-
let mut next_err_pat = &props.error_patterns[next_err_idx];
745+
let mut next_err_pat = props.error_patterns.get(next_err_idx);
756746
let mut done = false;
757747
let output_to_check = if props.check_stdout {
758748
format!("{}{}", proc_res.stdout, proc_res.stderr)
@@ -761,14 +751,14 @@ fn check_error_patterns(props: &TestProps,
761751
};
762752
for line in output_to_check.as_slice().lines() {
763753
if line.contains(next_err_pat.as_slice()) {
764-
debug!("found error pattern {}", next_err_pat);
754+
debug!("found error pattern {}", *next_err_pat);
765755
next_err_idx += 1u;
766756
if next_err_idx == props.error_patterns.len() {
767757
debug!("found all error patterns");
768758
done = true;
769759
break;
770760
}
771-
next_err_pat = &props.error_patterns[next_err_idx];
761+
next_err_pat = props.error_patterns.get(next_err_idx);
772762
}
773763
}
774764
if done { return; }
@@ -823,7 +813,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
823813
c
824814
}
825815
} ).collect();
826-
String::from_chars(c.as_slice())
816+
str::from_chars(c.as_slice()).to_string()
827817
}
828818

829819
#[cfg(target_os = "win32")]
@@ -847,13 +837,13 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
847837
for line in proc_res.stderr.as_slice().lines() {
848838
let mut was_expected = false;
849839
for (i, ee) in expected_errors.iter().enumerate() {
850-
if !found_flags[i] {
840+
if !*found_flags.get(i) {
851841
debug!("prefix={} ee.kind={} ee.msg={} line={}",
852-
prefixes[i].as_slice(),
842+
prefixes.get(i).as_slice(),
853843
ee.kind,
854844
ee.msg,
855845
line);
856-
if prefix_matches(line, prefixes[i].as_slice()) &&
846+
if prefix_matches(line, prefixes.get(i).as_slice()) &&
857847
line.contains(ee.kind.as_slice()) &&
858848
line.contains(ee.msg.as_slice()) {
859849
*found_flags.get_mut(i) = true;
@@ -877,7 +867,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
877867

878868
for (i, &flag) in found_flags.iter().enumerate() {
879869
if !flag {
880-
let ee = &expected_errors[i];
870+
let ee = expected_errors.get(i);
881871
fatal_proc_rec(format!("expected {} on line {} not found: {}",
882872
ee.kind, ee.line, ee.msg).as_slice(),
883873
proc_res);

trunk/src/doc/complement-lang-faq.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ You may also be interested in browsing [GitHub's Rust][github-rust] page.
3131

3232
## Does it run on Windows?
3333

34-
Yes. All development happens in lock-step on all 3 target platforms. Using MinGW, not Cygwin. Note that the windows implementation currently has some limitations: in particular 64-bit build is [not fully supported yet][win64], and all executables created by rustc [depend on libgcc DLL at runtime][libgcc].
34+
Yes. All development happens in lock-step on all 3 target platforms. Using MinGW, not Cygwin. Note that the windows implementation currently has some limitations: in particular 64-bit build is [not fully supported yet][win64], and all executables created by rustc [depends on libgcc DLL at runtime][libgcc].
3535

3636
[win64]: https://github.com/rust-lang/rust/issues/1237
3737
[libgcc]: https://github.com/rust-lang/rust/issues/11782
@@ -68,7 +68,7 @@ Cleanup through RAII-style destructors is more likely to work than in catch bloc
6868

6969
## Why aren't modules type-parametric?
7070

71-
We want to maintain the option to parametrize at runtime. We may eventually change this limitation, but initially this is how type parameters were implemented.
71+
We want to maintain the option to parametrize at runtime. We may make eventually change this limitation, but initially this is how type parameters were implemented.
7272

7373
## Why aren't values type-parametric? Why only items?
7474

trunk/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)