Skip to content

Commit 7c2b740

Browse files
author
Oliver Schneider
committed
---
yaml --- r: 193759 b: refs/heads/beta c: 6584ae5 h: refs/heads/master i: 193757: f77998c 193755: f4d6e46 193751: 1192311 193743: 02f7015 193727: 25287cb v: v3
1 parent 99c83c5 commit 7c2b740

File tree

207 files changed

+4171
-4332
lines changed

Some content is hidden

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

207 files changed

+4171
-4332
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: f7453f940b6cbc2b07a2c0d7612a11fa435aad95
34+
refs/heads/beta: 6584ae54917a74d8bf83c1047f273d5210d2a015
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: de8a23bbc3a7b9cbd7574b5b91a34af59bf030e6

branches/beta/mk/llvm.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ $$(LLVM_STAMP_$(1)): $(S)src/rustllvm/llvm-auto-clean-trigger
4444
touch -r $$@.start_time $$@ && rm $$@.start_time
4545

4646
ifeq ($$(CFG_ENABLE_LLVM_STATIC_STDCPP),1)
47-
LLVM_STDCPP_RUSTFLAGS_$(1) = -L "$$(dir $$(shell $$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \
48-
-print-file-name=libstdc++.a))"
47+
LLVM_STDCPP_LOCATION_$(1) = $$(shell $$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \
48+
-print-file-name=libstdc++.a)
4949
else
50-
LLVM_STDCPP_RUSTFLAGS_$(1) =
50+
LLVM_STDCPP_LOCATION_$(1) =
5151
endif
5252

5353

branches/beta/mk/main.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)
3030
CFG_DISABLE_UNSTABLE_FEATURES=1
3131
endif
3232
ifeq ($(CFG_RELEASE_CHANNEL),beta)
33-
CFG_RELEASE=$(CFG_RELEASE_NUM)-beta$(CFG_PRERELEASE_VERSION)
34-
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-beta$(CFG_PRERELEASE_VERSION)
33+
CFG_RELEASE=$(CFG_RELEASE_NUM)-beta(CFG_PRERELEASE_VERSION)
34+
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-beta(CFG_PRERELEASE_VERSION)
3535
CFG_DISABLE_UNSTABLE_FEATURES=1
3636
endif
3737
ifeq ($(CFG_RELEASE_CHANNEL),nightly)

branches/beta/mk/target.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
8585
$$(RUST_LIB_FLAGS_ST$(1)) \
8686
-L "$$(RT_OUTPUT_DIR_$(2))" \
8787
-L "$$(LLVM_LIBDIR_$(2))" \
88-
$$(LLVM_STDCPP_RUSTFLAGS_$(2)) \
88+
-L "$$(dir $$(LLVM_STDCPP_LOCATION_$(2)))" \
8989
$$(RUSTFLAGS_$(4)) \
9090
--out-dir $$(@D) \
9191
-C extra-filename=-$$(CFG_FILENAME_EXTRA) \

branches/beta/src/compiletest/compiletest.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#![feature(std_misc)]
2121
#![feature(test)]
2222
#![feature(core)]
23+
#![feature(path)]
24+
#![feature(io)]
2325
#![feature(net)]
2426
#![feature(path_ext)]
2527

@@ -33,6 +35,7 @@ extern crate log;
3335

3436
use std::env;
3537
use std::fs;
38+
use std::old_io;
3639
use std::path::{Path, PathBuf};
3740
use std::thunk::Thunk;
3841
use getopts::{optopt, optflag, reqopt};
@@ -244,11 +247,7 @@ pub fn run_tests(config: &Config) {
244247
// sadly osx needs some file descriptor limits raised for running tests in
245248
// parallel (especially when we have lots and lots of child processes).
246249
// For context, see #8904
247-
#[allow(deprecated)]
248-
fn raise_fd_limit() {
249-
std::old_io::test::raise_fd_limit();
250-
}
251-
raise_fd_limit();
250+
old_io::test::raise_fd_limit();
252251
// Prevent issue #21352 UAC blocking .exe containing 'patch' etc. on Windows
253252
// If #11207 is resolved (adding manifest to .exe) this becomes unnecessary
254253
env::set_var("__COMPAT_LAYER", "RunAsInvoker");

branches/beta/src/compiletest/procsrv.rs

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

11-
#![allow(deprecated)] // for old path, for dynamic_lib
12-
1311
use std::process::{ExitStatus, Command, Child, Output, Stdio};
1412
use std::io::prelude::*;
1513
use std::dynamic_lib::DynamicLibrary;

branches/beta/src/compiletest/runtest.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ use std::io::BufReader;
2626
use std::io::prelude::*;
2727
use std::iter::repeat;
2828
use std::net::TcpStream;
29+
use std::old_io::timer;
2930
use std::path::{Path, PathBuf};
3031
use std::process::{Command, Output, ExitStatus};
3132
use std::str;
@@ -451,11 +452,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
451452
.expect(&format!("failed to exec `{:?}`", config.adb_path));
452453
loop {
453454
//waiting 1 second for gdbserver start
454-
#[allow(deprecated)]
455-
fn sleep() {
456-
::std::old_io::timer::sleep(Duration::milliseconds(1000));
457-
}
458-
sleep();
455+
timer::sleep(Duration::milliseconds(1000));
459456
if TcpStream::connect("127.0.0.1:5039").is_ok() {
460457
break
461458
}

branches/beta/src/doc/reference.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -229,14 +229,14 @@ cases mentioned in [Number literals](#number-literals) below.
229229

230230
##### Characters and strings
231231

232-
| | Example | `#` sets | Characters | Escapes |
233-
|----------------------------------------------|-----------------|------------|-------------|---------------------|
234-
| [Character](#character-literals) | `'H'` | `N/A` | All Unicode | `\'` & [Byte](#byte-escapes) & [Unicode](#unicode-escapes) |
235-
| [String](#string-literals) | `"hello"` | `N/A` | All Unicode | `\"` & [Byte](#byte-escapes) & [Unicode](#unicode-escapes) |
236-
| [Raw](#raw-string-literals) | `r#"hello"#` | `0...` | All Unicode | `N/A` |
237-
| [Byte](#byte-literals) | `b'H'` | `N/A` | All ASCII | `\'` & [Byte](#byte-escapes) |
238-
| [Byte string](#byte-string-literals) | `b"hello"` | `N/A` | All ASCII | `\"` & [Byte](#byte-escapes) |
239-
| [Raw byte string](#raw-byte-string-literals) | `br#"hello"#` | `0...` | All ASCII | `N/A` |
232+
| | Example | # sets | Characters | Escapes |
233+
|----------------------------------------------|---------------|--------|-------------|---------------------|
234+
| [Character](#character-literals) | 'H' | N/A | All Unicode | \' & [Byte](#byte-escapes) & [Unicode](#unicode-escapes) |
235+
| [String](#string-literals) | "hello" | N/A | All Unicode | \" & [Byte](#byte-escapes) & [Unicode](#unicode-escapes) |
236+
| [Raw](#raw-string-literals) | r#"hello"# | 0... | All Unicode | N/A |
237+
| [Byte](#byte-literals) | b'H' | N/A | All ASCII | \' & [Byte](#byte-escapes) |
238+
| [Byte string](#byte-string-literals) | b"hello" | N/A | All ASCII | \" & [Byte](#byte-escapes) |
239+
| [Raw byte string](#raw-byte-string-literals) | br#"hello"# | 0... | All ASCII | N/A |
240240

241241
##### Byte escapes
242242

branches/beta/src/doc/trpl/hello-cargo.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,9 @@ Hello, world!
8585
Bam! We build our project with `cargo build`, and run it with
8686
`./target/debug/hello_world`. This hasn't bought us a whole lot over our simple use
8787
of `rustc`, but think about the future: when our project has more than one
88-
file, we would need to call `rustc` more than once and pass it a bunch of options to
88+
file, we would need to call `rustc` more than once, and pass it a bunch of options to
8989
tell it to build everything together. With Cargo, as our project grows, we can
90-
just `cargo build`, and it'll work the right way. When your project is finally
91-
ready for release, you can use `cargo build --release` to compile your crates with
92-
optimizations.
90+
just `cargo build` and it'll work the right way. When you're project is finally ready for release, you can use `cargo build --release` to compile your crates with optimizations.
9391

9492
You'll also notice that Cargo has created a new file: `Cargo.lock`.
9593

branches/beta/src/etc/gdb_rust_pretty_printing.py

Lines changed: 1 addition & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,9 @@ def rust_pretty_printer_lookup_function(val):
2727
if type_code == gdb.TYPE_CODE_STRUCT:
2828
struct_kind = classify_struct(val.type)
2929

30-
if struct_kind == STRUCT_KIND_SLICE:
31-
return RustSlicePrinter(val)
32-
3330
if struct_kind == STRUCT_KIND_STR_SLICE:
3431
return RustStringSlicePrinter(val)
3532

36-
if struct_kind == STRUCT_KIND_STD_VEC:
37-
return RustStdVecPrinter(val)
38-
39-
if struct_kind == STRUCT_KIND_STD_STRING:
40-
return RustStdStringPrinter(val)
41-
4233
if struct_kind == STRUCT_KIND_TUPLE:
4334
return RustTuplePrinter(val)
4435

@@ -181,28 +172,6 @@ def children(self):
181172
def display_hint(self):
182173
return "array"
183174

184-
class RustSlicePrinter:
185-
def __init__(self, val):
186-
self.val = val
187-
188-
def display_hint(self):
189-
return "array"
190-
191-
def to_string(self):
192-
length = int(self.val["length"])
193-
return self.val.type.tag + ("(len: %i)" % length)
194-
195-
def children(self):
196-
cs = []
197-
length = int(self.val["length"])
198-
data_ptr = self.val["data_ptr"]
199-
assert data_ptr.type.code == gdb.TYPE_CODE_PTR
200-
pointee_type = data_ptr.type.target()
201-
202-
for index in range(0, length):
203-
cs.append((str(index), (data_ptr + index).dereference()))
204-
205-
return cs
206175

207176
class RustStringSlicePrinter:
208177
def __init__(self, val):
@@ -212,35 +181,6 @@ def to_string(self):
212181
slice_byte_len = self.val["length"]
213182
return '"%s"' % self.val["data_ptr"].string(encoding="utf-8", length=slice_byte_len)
214183

215-
class RustStdVecPrinter:
216-
def __init__(self, val):
217-
self.val = val
218-
219-
def display_hint(self):
220-
return "array"
221-
222-
def to_string(self):
223-
length = int(self.val["len"])
224-
cap = int(self.val["cap"])
225-
return self.val.type.tag + ("(len: %i, cap: %i)" % (length, cap))
226-
227-
def children(self):
228-
cs = []
229-
(length, data_ptr) = extract_length_and_data_ptr_from_std_vec(self.val)
230-
pointee_type = data_ptr.type.target()
231-
232-
for index in range(0, length):
233-
cs.append((str(index), (data_ptr + index).dereference()))
234-
return cs
235-
236-
class RustStdStringPrinter:
237-
def __init__(self, val):
238-
self.val = val
239-
240-
def to_string(self):
241-
(length, data_ptr) = extract_length_and_data_ptr_from_std_vec(self.val["vec"])
242-
return '"%s"' % data_ptr.string(encoding="utf-8", length=length)
243-
244184

245185
class RustCStyleEnumPrinter:
246186
def __init__(self, val):
@@ -264,38 +204,19 @@ def to_string(self):
264204
STRUCT_KIND_TUPLE_VARIANT = 3
265205
STRUCT_KIND_STRUCT_VARIANT = 4
266206
STRUCT_KIND_CSTYLE_VARIANT = 5
267-
STRUCT_KIND_SLICE = 6
268-
STRUCT_KIND_STR_SLICE = 7
269-
STRUCT_KIND_STD_VEC = 8
270-
STRUCT_KIND_STD_STRING = 9
207+
STRUCT_KIND_STR_SLICE = 6
271208

272209

273210
def classify_struct(type):
274-
# print("\nclassify_struct: tag=%s\n" % type.tag)
275211
if type.tag == "&str":
276212
return STRUCT_KIND_STR_SLICE
277213

278-
if type.tag.startswith("&[") and type.tag.endswith("]"):
279-
return STRUCT_KIND_SLICE
280-
281214
fields = list(type.fields())
282215
field_count = len(fields)
283216

284217
if field_count == 0:
285218
return STRUCT_KIND_REGULAR_STRUCT
286219

287-
if (field_count == 3 and
288-
fields[0].name == "ptr" and
289-
fields[1].name == "len" and
290-
fields[2].name == "cap" and
291-
type.tag.startswith("Vec<")):
292-
return STRUCT_KIND_STD_VEC
293-
294-
if (field_count == 1 and
295-
fields[0].name == "vec" and
296-
type.tag == "String"):
297-
return STRUCT_KIND_STD_STRING
298-
299220
if fields[0].name == "RUST$ENUM$DISR":
300221
if field_count == 1:
301222
return STRUCT_KIND_CSTYLE_VARIANT
@@ -333,11 +254,3 @@ def get_field_at_index(val, index):
333254
return field
334255
i += 1
335256
return None
336-
337-
def extract_length_and_data_ptr_from_std_vec(vec_val):
338-
length = int(vec_val["len"])
339-
vec_ptr_val = vec_val["ptr"]
340-
unique_ptr_val = vec_ptr_val[first_field(vec_ptr_val)]
341-
data_ptr = unique_ptr_val[first_field(unique_ptr_val)]
342-
assert data_ptr.type.code == gdb.TYPE_CODE_PTR
343-
return (length, data_ptr)

0 commit comments

Comments
 (0)