Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 30 pull requests #52937

Merged
merged 86 commits into from
Aug 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
acdafa0
Document From conversions for OsString and OsStr
cypher Jul 11, 2018
b81ee0b
Document From conversions for CString and CStr
cypher Jul 11, 2018
ed5edcb
Seperate summaries from rest of the comment
cypher Jul 23, 2018
7fb0a52
Update clippy to latest master
cmdln Jul 26, 2018
922bf1d
Clarify thread::park semantics
matklad Jul 27, 2018
5f87f78
Fix ws
matklad Jul 27, 2018
7750a0d
Improve readability of serialize.rs
ljedrz Jul 27, 2018
173c330
Don't make "fake" match variables mutable
matthewjasper Jul 28, 2018
b6d3143
pretty print for std::collections::vecdeque
fukatani Jul 29, 2018
ea25cf1
Fix From<LocalWaker>
MajorBreakfast Jul 29, 2018
9ccd7ee
Fix -Wpessimizing-move warnings in rustllvm/PassWrapper
varkor Jul 29, 2018
90165b8
Make sure #47772 does not regress
RalfJung Jul 29, 2018
9845ee0
fix coding style
fukatani Jul 29, 2018
2b25ee0
update comment
toidiu Jul 30, 2018
2994b27
Add timeout to use of `curl` in bootstrap.py.
kennytm Jul 30, 2018
c57deb9
Remove references to AUTHORS.txt file
dsciarra Jul 29, 2018
4b466ee
Introduce the declare_tool_lint macro
flip1995 Jul 30, 2018
f8d1dc8
improve --stage documentation
RalfJung Jul 30, 2018
aa7d7d0
improve test stage documentation
RalfJung Jul 30, 2018
e50f4ee
Add targets for HermitCore (https://hermitcore.org) to the Rust compi…
ColinFinck Jul 30, 2018
57c7742
Check if the lint_name is from a tool and if the tool_lint exists
flip1995 Jul 30, 2018
d4ff949
Add a test for the declare_tool_lint macro
flip1995 Jul 30, 2018
7b9388b
Explain that the tool is responsible for unknown tool_lints
flip1995 Jul 30, 2018
d933174
releases.md: fix 2 typos
matthiaskrgr Jul 30, 2018
b6b025b
Fix wrong issue number in the test name
Jul 30, 2018
d8b3c83
Remove the unstable std_unicode crate, deprecated since 1.27
SimonSapin Jul 26, 2018
4ca77f7
Remove unstable and deprecated APIs
SimonSapin Jul 26, 2018
cbbcecb
Implement Unpin for FutureObj and LocalFutureObj
cramertj Jul 30, 2018
9169934
Use Vec::extend in SmallVec::extend when applicable
ljedrz Jul 30, 2018
1ea2765
run-pass/const-endianness: negate before to_le()
cuviper Jul 30, 2018
c883edf
Include lifetime in mutability suggestion in NLL messages
estebank Jul 30, 2018
4ad4ad0
Fix coding style.
ColinFinck Jul 31, 2018
5077399
make sure that the no-panic test tests what it is supposed to test
RalfJung Jul 29, 2018
fb7d8a1
hopefully make test pass on windows
RalfJung Jul 31, 2018
ca52648
Benchmarks for SmallVec
ljedrz Jul 31, 2018
e8c2995
Sort NLL error diagnostics by span in an attempt to make them match s…
pnkfelix Jul 31, 2018
6787e25
Blindly update the `#[rustc_region]` tests which got touched by the N…
pnkfelix Jul 31, 2018
2677685
Update tests that use `-Z borrowck=compare` or `#[feature(nll)]` to a…
pnkfelix Jul 31, 2018
faf841a
Update the `.nll.stderr` files under new sorted-by-span scheme.
pnkfelix Jul 31, 2018
830ac8c
Fix a typo in unsize.rs
pravic Jul 31, 2018
a5a3f76
NLL: On "cannot move out of type" error, print original source before…
pnkfelix Jul 31, 2018
0af5a6b
Pull out nightly checking to edges
Mark-Simulacrum Jul 21, 2018
ad40e45
Provide warnings for invalid code blocks in markdown files
Mark-Simulacrum Jul 21, 2018
de5cebd
Provide test configuration through struct
Mark-Simulacrum Jul 21, 2018
03e34f8
Remove dependency on error handling from find_testable_code
Mark-Simulacrum Jul 21, 2018
01d9555
Further extract error code switch
Mark-Simulacrum Jul 22, 2018
2216db9
Format code for easier editing
Mark-Simulacrum Jul 22, 2018
40a6046
Only run the sparc-abi test on sparc
nagisa Jul 31, 2018
779792f
address review feedback (`sort_by_key` is so much cleaner here than `…
pnkfelix Jul 31, 2018
6b138f5
Backport 1.27.2 release notes
pietroalbini Jul 31, 2018
75ff0dd
Use suggestions for shell format arguments
estebank Jul 30, 2018
7bea518
Remove global derive_id and reset_ids functions
Mark-Simulacrum Jul 22, 2018
8e65a46
Cleanup highlighting code
Mark-Simulacrum Jul 22, 2018
4cd0047
Add dyn to Write
Mark-Simulacrum Jul 29, 2018
0f680b3
Fixup test case
Mark-Simulacrum Jul 29, 2018
bcab7e2
Update compatibility note for 1.28.0 to be correct
Havvy Aug 1, 2018
b7ee110
Rollup merge of #52340 - cypher:document-from-trait-in-ffi, r=stevekl…
pietroalbini Aug 1, 2018
03df573
Rollup merge of #52628 - Mark-Simulacrum:rustdoc-cleanup-1, r=QuietMi…
pietroalbini Aug 1, 2018
acff794
Rollup merge of #52732 - SimonSapin:spring, r=Mark-Simulacrum
pietroalbini Aug 1, 2018
dafe335
Rollup merge of #52745 - commandline:master, r=oli-obk
pietroalbini Aug 1, 2018
06b91a4
Rollup merge of #52771 - matklad:patch-1, r=kennytm
pietroalbini Aug 1, 2018
714fd37
Rollup merge of #52778 - ljedrz:readable_serialize, r=kennytm
pietroalbini Aug 1, 2018
333d8c4
Rollup merge of #52810 - matthewjasper:more-immutablity, r=pnkfelix
pietroalbini Aug 1, 2018
39406ee
Rollup merge of #52821 - fukatani:gdb-vecdeque-print, r=michaelwoerister
pietroalbini Aug 1, 2018
9e43ebd
Rollup merge of #52822 - MajorBreakfast:fix-from-local-waker, r=cramertj
pietroalbini Aug 1, 2018
61b9a51
Rollup merge of #52824 - varkor:fix-llvm-ret-move-warnings, r=rkruppe
pietroalbini Aug 1, 2018
fe4358a
Rollup merge of #52825 - RalfJung:codegen, r=alexcrichton
pietroalbini Aug 1, 2018
8b31f00
Rollup merge of #52831 - dsciarra:rm-ref-to-author-file, r=alexcrichton
pietroalbini Aug 1, 2018
a819a6c
Rollup merge of #52842 - toidiu:ak-commentUpdate, r=estebank
pietroalbini Aug 1, 2018
c9aca03
Rollup merge of #52846 - kennytm:bootstrap-curl-timeout, r=Mark-Simul…
pietroalbini Aug 1, 2018
5fb7c65
Rollup merge of #52851 - flip1995:tool_lints, r=oli-obk
pietroalbini Aug 1, 2018
6767886
Rollup merge of #52853 - RalfJung:bootstrap-help, r=alexcrichton
pietroalbini Aug 1, 2018
eb71c35
Rollup merge of #52859 - ljedrz:smallvec_true_extend, r=Mark-Simulacrum
pietroalbini Aug 1, 2018
f47a764
Rollup merge of #52861 - ColinFinck:master, r=alexcrichton
pietroalbini Aug 1, 2018
51e744b
Rollup merge of #52867 - matthiaskrgr:release_typos, r=Mark-Simulacrum
pietroalbini Aug 1, 2018
341f882
Rollup merge of #52870 - cramertj:unpin-futureobj, r=aturon
pietroalbini Aug 1, 2018
b3d6050
Rollup merge of #52876 - cuviper:const-endianness-be, r=kennytm
pietroalbini Aug 1, 2018
9443dd5
Rollup merge of #52878 - mikhail-m1:master, r=kennytm
pietroalbini Aug 1, 2018
312f18c
Rollup merge of #52883 - estebank:nll-diag-mut, r=oli-obk
pietroalbini Aug 1, 2018
a8ed603
Rollup merge of #52888 - estebank:shell-sugg, r=oli-obk
pietroalbini Aug 1, 2018
2d29c44
Rollup merge of #52904 - pnkfelix:issue-51167-sort-by-span, r=petroch…
pietroalbini Aug 1, 2018
ac2b3c3
Rollup merge of #52905 - pravic:unsize-typo, r=alexcrichton
pietroalbini Aug 1, 2018
14546cd
Rollup merge of #52907 - pnkfelix:issue-52877-original-source-should-…
pietroalbini Aug 1, 2018
52b52f3
Rollup merge of #52914 - nagisa:sparc-is-sparc’s-own-business, r=alex…
pietroalbini Aug 1, 2018
7759199
Rollup merge of #52918 - pietroalbini:1.27.2-notes, r=Mark-Simulacrum
pietroalbini Aug 1, 2018
850b613
Rollup merge of #52929 - Havvy:patch-1, r=alexcrichton
pietroalbini Aug 1, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions COPYRIGHT
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Copyrights in the Rust project are retained by their contributors. No
copyright assignment is required to contribute to the Rust project.

Some files include explicit copyright notices and/or license notices.
For full authorship information, see AUTHORS.txt and the version control
history.
For full authorship information, see the version control history or
https://thanks.rust-lang.org

Except as otherwise noted (below and/or in individual files), Rust is
licensed under the Apache License, Version 2.0 <LICENSE-APACHE> or
Expand Down
21 changes: 16 additions & 5 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ Misc

Compatibility Notes
-------------------
- [Rust will no longer consider trait objects with duplicated constraints to
have implementations.][51276] For example the below code will now fail
to compile.
- [Rust will consider trait objects with duplicated constraints to be the same
type as without the duplicated constraint.][51276] For example the below code will
now fail to compile.
```rust
trait Trait {}

Expand Down Expand Up @@ -160,6 +160,17 @@ Compatibility Notes
[`{Any + Send + Sync}::downcast_ref`]: https://doc.rust-lang.org/std/any/trait.Any.html#method.downcast_ref-2
[`{Any + Send + Sync}::is`]: https://doc.rust-lang.org/std/any/trait.Any.html#method.is-2

Version 1.27.2 (2018-07-20)
===========================

Compatibility Notes
-------------------

- The borrow checker was fixed to avoid potential unsoundness when using
match ergonomics: [#52213][52213].

[52213]: https://github.com/rust-lang/rust/issues/52213

Version 1.27.1 (2018-07-10)
===========================

Expand Down Expand Up @@ -190,7 +201,7 @@ Version 1.27.0 (2018-06-21)
Language
--------
- [Removed 'proc' from the reserved keywords list.][49699] This allows `proc` to
be used as an identifer.
be used as an identifier.
- [The dyn syntax is now available.][49968] This syntax is equivalent to the
bare `Trait` syntax, and should make it clearer when being used in tandem with
`impl Trait`. Since it is equivalent to the following syntax:
Expand Down Expand Up @@ -4795,7 +4806,7 @@ Language
--------

* Patterns with `ref mut` now correctly invoke [`DerefMut`] when
matching against dereferencable values.
matching against dereferenceable values.

Libraries
---------
Expand Down
9 changes: 0 additions & 9 deletions src/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2612,18 +2612,9 @@ dependencies = [
"rustc_lsan 0.0.0",
"rustc_msan 0.0.0",
"rustc_tsan 0.0.0",
"std_unicode 0.0.0",
"unwind 0.0.0",
]

[[package]]
name = "std_unicode"
version = "0.0.0"
dependencies = [
"compiler_builtins 0.0.0",
"core 0.0.0",
]

[[package]]
name = "string_cache"
version = "0.7.3"
Expand Down
5 changes: 4 additions & 1 deletion src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ def _download(path, url, probably_big, verbose, exception):
option = "-#"
else:
option = "-s"
run(["curl", option, "--retry", "3", "-Sf", "-o", path, url],
run(["curl", option,
"-y", "30", "-Y", "10", # timeout if speed is < 10 bytes/sec for > 30 seconds
"--connect-timeout", "30", # timeout if cannot connect within 30 seconds
"--retry", "3", "-Sf", "-o", path, url],
verbose=verbose,
exception=exception)

Expand Down
1 change: 0 additions & 1 deletion src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ pub fn std_cargo(builder: &Builder,
cargo.arg("--features").arg("c mem")
.args(&["-p", "alloc"])
.args(&["-p", "compiler_builtins"])
.args(&["-p", "std_unicode"])
.arg("--manifest-path")
.arg(builder.src.join("src/rustc/compiler_builtins_shim/Cargo.toml"));
} else {
Expand Down
1 change: 0 additions & 1 deletion src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,6 @@ impl Step for Src {
"src/librustc_msan",
"src/librustc_tsan",
"src/libstd",
"src/libstd_unicode",
"src/libunwind",
"src/rustc/compiler_builtins_shim",
"src/rustc/libc_shim",
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ impl Step for Std {
// Keep a whitelist so we do not build internal stdlib crates, these will be
// build by the rustc step later if enabled.
cargo.arg("--no-deps");
for krate in &["alloc", "core", "std", "std_unicode"] {
for krate in &["alloc", "core", "std"] {
cargo.arg("-p").arg(krate);
// Create all crate output directories first to make sure rustdoc uses
// relative links.
Expand Down
13 changes: 10 additions & 3 deletions src/bootstrap/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`"
opts.optmulti("", "exclude", "build paths to exclude", "PATH");
opts.optopt("", "on-fail", "command to run on failure", "CMD");
opts.optflag("", "dry-run", "dry run; don't build anything");
opts.optopt("", "stage", "stage to build", "N");
opts.optopt("", "stage",
"stage to build (indicates compiler to use/test, e.g. stage 0 uses the \
bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)",
"N");
opts.optmulti("", "keep-stage", "stage(s) to keep without recompiling", "N");
opts.optopt("", "src", "path to the root of the rust checkout", "DIR");
opts.optopt("j", "jobs", "number of jobs to run in parallel", "JOBS");
Expand Down Expand Up @@ -258,7 +261,7 @@ Arguments:

./x.py build --stage 1 src/libtest

This will first build everything once (like --stage 0 without further
This will first build everything once (like `--stage 0` without further
arguments would), and then use the compiler built in stage 0 to build
src/libtest and its dependencies.
Once this is done, build/$ARCH/stage1 contains a usable compiler.",
Expand Down Expand Up @@ -290,10 +293,14 @@ Arguments:

./x.py test src/test/run-pass
./x.py test src/libstd --test-args hash_map
./x.py test src/libstd --stage 0
./x.py test src/libstd --stage 0 --no-doc
./x.py test src/test/ui --bless
./x.py test src/test/ui --compare-mode nll

Note that `test src/test/* --stage N` does NOT depend on `build src/rustc --stage N`;
just like `build src/libstd --stage N` it tests the compiler produced by the previous
stage.

If no arguments are passed then the complete artifacts for that stage are
compiled and tested.

Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/rustdoc.1
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ See <\fBhttps://github.com/rust\-lang/rust/issues\fR>
for issues.

.SH "AUTHOR"
See \fIAUTHORS.txt\fR in the Rust source distribution.
See the version control history or <\fBhttps://thanks.rust\-lang.org\fR>

.SH "COPYRIGHT"
This work is dual\[hy]licensed under Apache\ 2.0 and MIT terms.
Expand Down
33 changes: 33 additions & 0 deletions src/etc/debugger_pretty_printers_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
TYPE_KIND_FIXED_SIZE_VEC = 16
TYPE_KIND_REGULAR_UNION = 17
TYPE_KIND_OS_STRING = 18
TYPE_KIND_STD_VECDEQUE = 19

ENCODED_ENUM_PREFIX = "RUST$ENCODED$ENUM$"
ENUM_DISR_FIELD_NAME = "RUST$ENUM$DISR"
Expand All @@ -62,6 +63,14 @@
STD_VEC_FIELD_NAMES = [STD_VEC_FIELD_NAME_BUF,
STD_VEC_FIELD_NAME_LENGTH]

# std::collections::VecDeque<> related constants
STD_VECDEQUE_FIELD_NAME_TAIL = "tail"
STD_VECDEQUE_FIELD_NAME_HEAD = "head"
STD_VECDEQUE_FIELD_NAME_BUF = "buf"
STD_VECDEQUE_FIELD_NAMES = [STD_VECDEQUE_FIELD_NAME_TAIL,
STD_VECDEQUE_FIELD_NAME_HEAD,
STD_VECDEQUE_FIELD_NAME_BUF]

# std::String related constants
STD_STRING_FIELD_NAMES = ["vec"]

Expand Down Expand Up @@ -161,6 +170,11 @@ def __classify_struct(self):
self.__conforms_to_field_layout(STD_VEC_FIELD_NAMES)):
return TYPE_KIND_STD_VEC

# STD COLLECTION VECDEQUE
if (unqualified_type_name.startswith("VecDeque<") and
self.__conforms_to_field_layout(STD_VECDEQUE_FIELD_NAMES)):
return TYPE_KIND_STD_VECDEQUE

# STD STRING
if (unqualified_type_name.startswith("String") and
self.__conforms_to_field_layout(STD_STRING_FIELD_NAMES)):
Expand Down Expand Up @@ -325,6 +339,25 @@ def extract_length_ptr_and_cap_from_std_vec(vec_val):
assert data_ptr.type.get_dwarf_type_kind() == DWARF_TYPE_CODE_PTR
return (length, data_ptr, capacity)


def extract_tail_head_ptr_and_cap_from_std_vecdeque(vec_val):
assert vec_val.type.get_type_kind() == TYPE_KIND_STD_VECDEQUE
tail_field_index = STD_VECDEQUE_FIELD_NAMES.index(STD_VECDEQUE_FIELD_NAME_TAIL)
head_field_index = STD_VECDEQUE_FIELD_NAMES.index(STD_VECDEQUE_FIELD_NAME_HEAD)
buf_field_index = STD_VECDEQUE_FIELD_NAMES.index(STD_VECDEQUE_FIELD_NAME_BUF)

tail = vec_val.get_child_at_index(tail_field_index).as_integer()
head = vec_val.get_child_at_index(head_field_index).as_integer()
buf = vec_val.get_child_at_index(buf_field_index)

vec_ptr_val = buf.get_child_at_index(0)
capacity = buf.get_child_at_index(1).as_integer()
unique_ptr_val = vec_ptr_val.get_child_at_index(0)
data_ptr = unique_ptr_val.get_child_at_index(0)
assert data_ptr.type.get_dwarf_type_kind() == DWARF_TYPE_CODE_PTR
return (tail, head, data_ptr, capacity)


def extract_length_and_ptr_from_slice(slice_val):
assert (slice_val.type.get_type_kind() == TYPE_KIND_SLICE or
slice_val.type.get_type_kind() == TYPE_KIND_STR_SLICE)
Expand Down
25 changes: 25 additions & 0 deletions src/etc/gdb_rust_pretty_printing.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ def rust_pretty_printer_lookup_function(gdb_val):
if type_kind == rustpp.TYPE_KIND_STD_VEC:
return RustStdVecPrinter(val)

if type_kind == rustpp.TYPE_KIND_STD_VECDEQUE:
return RustStdVecDequePrinter(val)

if type_kind == rustpp.TYPE_KIND_STD_STRING:
return RustStdStringPrinter(val)

Expand Down Expand Up @@ -274,6 +277,28 @@ def children(self):
yield (str(index), (gdb_ptr + index).dereference())


class RustStdVecDequePrinter(object):
def __init__(self, val):
self.__val = val

@staticmethod
def display_hint():
return "array"

def to_string(self):
(tail, head, data_ptr, cap) = \
rustpp.extract_tail_head_ptr_and_cap_from_std_vecdeque(self.__val)
return (self.__val.type.get_unqualified_type_name() +
("(len: %i, cap: %i)" % (head - tail, cap)))

def children(self):
(tail, head, data_ptr, cap) = \
rustpp.extract_tail_head_ptr_and_cap_from_std_vecdeque(self.__val)
gdb_ptr = data_ptr.get_wrapped_value()
for index in xrange(tail, head):
yield (str(index), (gdb_ptr + index).dereference())


class RustStdStringPrinter(object):
def __init__(self, val):
self.__val = val
Expand Down
10 changes: 8 additions & 2 deletions src/liballoc_system/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ mod platform {
}
}

#[cfg(any(target_os = "android", target_os = "redox", target_os = "solaris"))]
#[cfg(any(target_os = "android",
target_os = "hermit",
target_os = "redox",
target_os = "solaris"))]
#[inline]
unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 {
// On android we currently target API level 9 which unfortunately
Expand All @@ -197,7 +200,10 @@ mod platform {
libc::memalign(layout.align(), layout.size()) as *mut u8
}

#[cfg(not(any(target_os = "android", target_os = "redox", target_os = "solaris")))]
#[cfg(not(any(target_os = "android",
target_os = "hermit",
target_os = "redox",
target_os = "solaris")))]
#[inline]
unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 {
let mut out = ptr::null_mut();
Expand Down
Loading