Commit Graph

50560 Commits

Author SHA1 Message Date
Ariel Ben-Yehuda
a61963ab08 TODO -> FIXME 2016-02-20 01:54:58 +02:00
Ariel Ben-Yehuda
ae919d0f4b type-check lvalues 2016-02-20 01:54:58 +02:00
Ariel Ben-Yehuda
880b6c260a fix a few remaining bugs - make check runs! 2016-02-20 01:54:58 +02:00
Ariel Ben-Yehuda
3c6f41026b store the normalized types of field accesses
Fixes #31504
2016-02-20 01:54:58 +02:00
Ariel Ben-Yehuda
350b50df00 deref the argument of overloaded MIR autoderef
Fixes #31466
2016-02-20 01:54:58 +02:00
Ariel Ben-Yehuda
76608c8e0a make *mut T -> *const T a coercion
rather than being implicit quasi-subtyping. Nothing good can come out
of quasi-subtyping.
2016-02-20 01:54:58 +02:00
Ariel Ben-Yehuda
6f633ef128 tuple arguments to overloaded calls
also fix translation of "rust-call" functions, although that could use
more optimizations
2016-02-20 01:54:58 +02:00
Ariel Ben-Yehuda
b7cbbc374c be more type-safe in panic/panic_bounds_check
TODO: find a correct borrow region

Fixes #31482
2016-02-20 01:45:13 +02:00
Ariel Ben-Yehuda
67d1cf1122 introduce an early pass to clear dead blocks
this makes the the MIR assignment pass complete successfully
2016-02-20 01:45:13 +02:00
Ariel Ben-Yehuda
999f1767ca add -Z mir-opt-level to disable MIR optimizations
setting -Z mir-opt-level=0 will disable all MIR optimizations
for easier debugging
2016-02-20 01:38:27 +02:00
Ariel Ben-Yehuda
addc653da5 begin implementing mir-typeck 2016-02-19 19:13:53 +02:00
bors
15611f75ca Auto merge of #31736 - bluss:write-char, r=alexcrichton
fmt: Make sure write_fmt's implementation can use write_char

It looks like the Adapter inside write_fmt was never updated to forward
the write_char method.
2016-02-19 08:04:11 +00:00
bors
463e42701a Auto merge of #31735 - aliclark:freebsd-link-defs, r=alexcrichton
The FreeBSD linker config is missing some options present in the other BSD configs.

This seems accidental, with other BSDs having the flags added in platform-specific commits, or with the flags present from day 1.

Some other BSD commits for reference:
fcb30a0b67 (diff-db69d903e469b7769aefaa31786fc2c4R1)
0b7c4f57f6 (diff-1c7b74536ce0291d1f89953035f26a71R1)

cfd2a5cfa1
2016-02-19 05:15:17 +00:00
bors
917db28b55 Auto merge of #31716 - jseyfried:fix_privacy_for_def_err, r=nrc
Fixes #31714
2016-02-19 02:18:25 +00:00
Jeffrey Seyfried
08b9097197 Improve dummy bindings for unresolved imports 2016-02-19 00:43:52 +00:00
bors
8842e28be8 Auto merge of #31684 - tmiasko:alternate-stack, r=alexcrichton
Remove alternate stack with sigaltstack before unmaping it.

Also reuse existing signal stack if already set, this is especially
useful when working with sanitizers that configure alternate stack
themselves.

This change depends on SS_DISABLE recently introduced in libc crate and updates
this git submodule accordingly.
2016-02-18 23:23:22 +00:00
bors
de366b5218 Auto merge of #31600 - nagisa:mir-msvc-seh-2, r=nikomatsakis
r? @alexcrichton for the translator changes and @nikomatsakis for the no-landing-pads pass.
2016-02-18 20:46:28 +00:00
bors
6b076c2daa Auto merge of #31734 - aliclark:bsd-stat-fixes, r=alexcrichton
In https://github.com/rust-lang/rust/issues/25155 the os::freebsd::raw stat was split for the x86 vs. x86-64 cases, which appears to have been done to implement the padding on the end of struct stat for the x86 case (the struct is otherwise the same notwistanding the size of long).

This PR de-duplicates the struct using #[cfg(target_arch = "x86")] for the __unused field, which also fixes the definitions which had sinced changed with the LFS work d088b67187.

Also changed definitions to c_long for dragonfly and freebsd where appropriate.

Also removes some unused imports that the compiler was complaining about.

dragonfly's long time_t:
https://gitweb.dragonflybsd.org/dragonfly.git/blob/a2a57c243ff8016578bc559f8603fb25bbcf1768:/lib/libstand/machine/stdint.h

freebsd's long time_t:
https://svnweb.freebsd.org/base/release/10.1.0/sys/x86/include/_types.h?view=markup
d088b67187/src/liblibc/lib.rs (L980)

freebsd's padding for i686 stat:
https://svnweb.freebsd.org/base/release/10.1.0/sys/sys/stat.h?view=markup#l139
d088b67187/src/liblibc/lib.rs (L1038)
2016-02-18 16:29:55 +00:00
bors
8e2a577804 Auto merge of #31394 - nikomatsakis:incr-comp-variance, r=pnkfelix
Make the dep. graph edges created by variance just mirror the constraint graph.

Note that this extends <https://github.com/rust-lang/rust/pull/31304>, so the first few commits are on a different topic.

r? @pnkfelix
2016-02-18 13:28:27 +00:00
bors
f075698ea5 Auto merge of #31728 - Amanieu:recoversafe_into_inner, r=alexcrichton
This allows a `FnOnce` to be wrapped in an `AssertRecoverSafe`.
2016-02-18 10:35:25 +00:00
Niko Matsakis
01ebc37fa1 Change how dep-graph edges are handled in variance to
be more fine-grained, fixing the `dep-graph-struct-signature`
test.
2016-02-18 05:27:27 -05:00
Niko Matsakis
daa7408267 Fix a weird case in the HIR map, where fields are not present in the
map. Perhaps I ought to just add them instead, but this seems harmless
enough.
2016-02-18 05:26:30 -05:00
Niko Matsakis
a80d449026 Break the variance module into submodules for ease of comprehension. 2016-02-18 05:26:30 -05:00
bors
7dd3b20119 Auto merge of #31727 - semarie:openbsd-llvm-cpu, r=alexcrichton
The initial purpose is to workaround the LLVM bug
https://llvm.org/bugs/show_bug.cgi?id=26554 for OpenBSD.

By default, the `cpu` is defined to `generic`. But with a 64bit
processor, the optimization for `generic` will use invalid asm code as
NOP (the generated code for NOP isn't a NOP).

According to #20777, "x86-64" is the right thing to do for x86_64
builds.

Closes: #31363

r? @alexcrichton
2016-02-18 07:35:49 +00:00
Tomasz Miąsko
77922b817e Remove alternate stack with sigaltstack before unmapping it.
Also reuse existing signal stack if already set, this is especially
useful when working with sanitizers that configure alternate stack
themselves.
2016-02-18 08:22:53 +01:00
bors
a9430a359f Auto merge of #31641 - petrochenkov:reach, r=alexcrichton
Fixes https://github.com/rust-lang/rust/issues/16734 and probably some other issues

This is a continuation of https://github.com/rust-lang/rust/pull/29822, but the algorithm is mostly a copy of https://github.com/rust-lang/rust/pull/29973, so
r? @alexcrichton or @nikomatsakis
2016-02-18 03:35:21 +00:00
bors
e18f7a1c5a Auto merge of #31739 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #31565, #31679, #31694, #31695, #31703, #31720, #31733
- Failed merges:
2016-02-18 00:33:58 +00:00
Steve Klabnik
27ede43c89 Rollup merge of #31733 - gkoz:strip_prefix_docs, r=alexcrichton
It wasn't fixed after copy-pasting. This probably needs to be backported to beta.
2016-02-17 18:14:36 -05:00
Steve Klabnik
b85033a7eb Rollup merge of #31720 - frewsxcv:std-mem-transmute-copy-example, r=steveklabnik
Prior to this commit, it was a trivial example that did not demonstrate
the effects of using the function.

Fixes https://github.com/rust-lang/rust/issues/31094
2016-02-17 18:14:36 -05:00
Steve Klabnik
216081d048 Rollup merge of #31703 - WiSaGaN:bugfix/fix-link-in-release-notes, r=alexcrichton 2016-02-17 18:14:36 -05:00
Steve Klabnik
96c8a67a17 Rollup merge of #31695 - oconnor663:chardocs, r=alexcrichton
Previously the docs suggested that '❤️' doesn't fit in a char because
it's 6 bytes. But that's misleading. 'a̚' also doesn't fit in a char,
even though it's only 3 bytes. The important thing is the number of code
points, not the number of bytes. Clarify the primitive char docs around
this.
2016-02-17 18:14:36 -05:00
Steve Klabnik
27ef9df824 Rollup merge of #31694 - oconnor663:insertdocs, r=steveklabnik
The first time I read the docs for `insert()`, I thought it was saying it didn't update existing *values*, and I was confused. Reword the docs to make it clear that `insert()` does update values.
2016-02-17 18:14:36 -05:00
Steve Klabnik
0a88c8fb19 Rollup merge of #31679 - GuillaumeGomez:long_error_explanation, r=Manishearth
r? @Manishearth
2016-02-17 18:14:36 -05:00
Steve Klabnik
9f0e39ba16 Rollup merge of #31565 - SDX2000:docfixes4, r=steveklabnik
See title and diff for more information.
2016-02-17 18:14:35 -05:00
Vadim Petrochenkov
fadc95e60a Check reachability insead of publicity for fields and inherent impl items
Purely for consistency with other items, it doesn't make any semantic difference
2016-02-18 01:10:21 +03:00
Vadim Petrochenkov
34737e3536 Add more tests for unnameable reachable items 2016-02-18 01:04:28 +03:00
Vadim Petrochenkov
767a447470 privacy: Mark reachable but unnameable items as reachable 2016-02-18 01:04:28 +03:00
Ulrik Sverdrup
403fc4186e fmt: Make sure write_fmt's implementation can use write_char
It looks like the Adapter inside write_fmt was never updated to forward
the write_char method.
2016-02-17 22:26:44 +01:00
Simonas Kazlauskas
1752615591 MSVC SEH in MIR is implemented here 2016-02-17 21:46:05 +02:00
bors
4d3eebff9d Auto merge of #31707 - GuillaumeGomez:macro_name, r=sfackler
I'm wondering if instead of a second help message, a note would be better. I let it up to reviewers.
2016-02-17 19:15:53 +00:00
Ali Clark
6115f2effe bring freebsd linker config up-to-date (same as dragonfly) 2016-02-17 18:46:16 +00:00
Gleb Kozyrev
f82c984764 Update Path::strip_prefix doc 2016-02-17 20:16:12 +02:00
Ali Clark
90afb85a0c re-add freebsd padding
reproduces the padding found here:
https://svnweb.freebsd.org/base/release/10.1.0/sys/sys/stat.h?view=markup#l139
2016-02-17 16:59:03 +00:00
Ali Clark
3c534188f0 time_t is long on freebsd and dragonfly (and nsec should be long)
This becomes less relevant for dragonfly a i686 support is dropped since
release 40, but using long allows some compatibility for older versions.
2016-02-17 16:55:43 +00:00
bors
2051a92134 Auto merge of #31718 - apasel422:issue-31711, r=bluss
This changes the performance of `drop` from linear to constant time for such `HashMap`s.

Closes #31711.

r? @bluss
2016-02-17 16:18:54 +00:00
Sandeep Datta
1536195ce6 Made v2 mutable so that we can actually truncate it. 2016-02-17 20:47:24 +05:30
Ali Clark
c99409f793 unfork freebsd stat definitions, fixes x86 2016-02-17 14:10:02 +00:00
Ali Clark
cf144d16e9 remove unused import from dragonfly os raw 2016-02-17 14:09:22 +00:00
bors
b54770c245 Auto merge of #31696 - apasel422:placement, r=pnkfelix
CC #30172.

r? @pnkfelix
CC @nagisa
2016-02-17 13:25:15 +00:00
Amanieu d'Antras
b6a65df6d5 Add into_inner to AssertRecoverSafe 2016-02-17 11:29:18 +00:00