Commit Graph

53743 Commits

Author SHA1 Message Date
Eduard Burtescu
04464db954 trans: remove item_symbols from metadata and CrateContext. 2016-05-25 01:56:49 +03:00
Eduard Burtescu
b03bde9c2a trans: move the linker support to compute symbols on-demand. 2016-05-25 01:45:25 +03:00
Eduard Burtescu
c9a10bd26b trans: move exported_symbol to Instance::symbol_name. 2016-05-25 01:34:20 +03:00
Eduard Burtescu
a6a5e4884a trans: force absolute item paths within symbols. 2016-05-25 01:34:20 +03:00
Eduard Burtescu
14133d33bc trans: move exported_name's logic into symbol_names. 2016-05-25 01:34:17 +03:00
Alex Crichton
33dfd0fb16 std: Use memalign, not posix_memalign, on Android
We've gotten requests to move our Android support as far back as API level 9
where unfortunately the `posix_memalign` API wasn't implemented yet. Thankfully,
however, the `memalign` API was and it appears to be usable with `free` on the
Android platform (see comments included in commit).

This should help fix some of the last few test failures when compiling against
API level 9.
2016-05-24 15:21:01 -07:00
Eduard Burtescu
39184741bc trans: remove unused symbol_names::exported_name_with_suffix. 2016-05-25 01:20:55 +03:00
Eduard Burtescu
7462da5c38 rustc: use a simpler scheme for plugin registrar symbol names. 2016-05-25 01:20:55 +03:00
Felix S. Klock II
4412c7ab37 placate tidy in compile-fail test. 2016-05-24 23:08:34 +02:00
Felix S. Klock II
fe49b41f83 placate tidy in mir::gather_moves. 2016-05-24 23:08:24 +02:00
Felix S. Klock II
ac6ea44549 placate tidy in mir::dataflow. 2016-05-24 23:08:16 +02:00
Felix S. Klock II
a82676eefa placate tidy in mir::dataflow::graphviz. 2016-05-24 23:08:07 +02:00
Felix S. Klock II
ad1294dbe7 threaded a ty::ParameterEnvironment for the current node id via the associated Ctxt item.
used this to address a long-standing wart/bug in how filtering-out of
values with type impl'ing `Copy` was done.
2016-05-24 23:03:52 +02:00
Ariel Ben-Yehuda
c209d44c34 refactor autoderef to avoid registering obligations
Refactor `FnCtxt::autoderef` to use an external iterator and to not
register any obligation from the main autoderef loop, but rather to
register them after (and if) the loop successfully completes.

Fixes #24819
Fixes #25801
Fixes #27631
Fixes #31258
Fixes #31964
Fixes #32320
Fixes #33515
Fixes #33755
2016-05-25 00:03:33 +03:00
Vadim Petrochenkov
40285ca717 Apply visit_path to import prefixes by default 2016-05-24 23:49:08 +03:00
Niko Matsakis
be7b576cc5 correct typo in comment 2016-05-24 15:08:07 -04:00
bors
8393d99c35 Auto merge of #33833 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 7 pull requests

- Successful merges: #33692, #33759, #33779, #33781, #33797, #33810, #33832
- Failed merges:
2016-05-24 10:39:00 -07:00
Alex Crichton
0f3e8650f7 test: Use set sysroot for more NDK compatibility
Recent versions of the Android NDK no longer ship debuggers like
`arm-linux-androideabi-gdb`, but instead one prebuilt binary `gdb`. We can
symlink this into place at least to get our detection still working, but it now
needs to be told what the sysroot is so it can correctly do... something. Long
story short, tests didn't pass with this change and after this change they pass.
2016-05-24 09:51:29 -07:00
Alex Crichton
cae91d7c8c std: Stabilize APIs for the 1.10 release
This commit applies the FCP decisions made by the libs team for the 1.10 cycle,
including both new stabilizations and deprecations. Specifically, the list of
APIs is:

Stabilized:

* `os::windows::fs::OpenOptionsExt::access_mode`
* `os::windows::fs::OpenOptionsExt::share_mode`
* `os::windows::fs::OpenOptionsExt::custom_flags`
* `os::windows::fs::OpenOptionsExt::attributes`
* `os::windows::fs::OpenOptionsExt::security_qos_flags`
* `os::unix::fs::OpenOptionsExt::custom_flags`
* `sync::Weak::new`
* `Default for sync::Weak`
* `panic::set_hook`
* `panic::take_hook`
* `panic::PanicInfo`
* `panic::PanicInfo::payload`
* `panic::PanicInfo::location`
* `panic::Location`
* `panic::Location::file`
* `panic::Location::line`
* `ffi::CStr::from_bytes_with_nul`
* `ffi::CStr::from_bytes_with_nul_unchecked`
* `ffi::FromBytesWithNulError`
* `fs::Metadata::modified`
* `fs::Metadata::accessed`
* `fs::Metadata::created`
* `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange`
* `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak`
* `collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key`
* `os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}`
* `SocketAddr::is_unnamed`
* `SocketAddr::as_pathname`
* `UnixStream::connect`
* `UnixStream::pair`
* `UnixStream::try_clone`
* `UnixStream::local_addr`
* `UnixStream::peer_addr`
* `UnixStream::set_read_timeout`
* `UnixStream::set_write_timeout`
* `UnixStream::read_timeout`
* `UnixStream::write_Timeout`
* `UnixStream::set_nonblocking`
* `UnixStream::take_error`
* `UnixStream::shutdown`
* Read/Write/RawFd impls for `UnixStream`
* `UnixListener::bind`
* `UnixListener::accept`
* `UnixListener::try_clone`
* `UnixListener::local_addr`
* `UnixListener::set_nonblocking`
* `UnixListener::take_error`
* `UnixListener::incoming`
* RawFd impls for `UnixListener`
* `UnixDatagram::bind`
* `UnixDatagram::unbound`
* `UnixDatagram::pair`
* `UnixDatagram::connect`
* `UnixDatagram::try_clone`
* `UnixDatagram::local_addr`
* `UnixDatagram::peer_addr`
* `UnixDatagram::recv_from`
* `UnixDatagram::recv`
* `UnixDatagram::send_to`
* `UnixDatagram::send`
* `UnixDatagram::set_read_timeout`
* `UnixDatagram::set_write_timeout`
* `UnixDatagram::read_timeout`
* `UnixDatagram::write_timeout`
* `UnixDatagram::set_nonblocking`
* `UnixDatagram::take_error`
* `UnixDatagram::shutdown`
* RawFd impls for `UnixDatagram`
* `{BTree,Hash}Map::values_mut`
* `<[_]>::binary_search_by_key`

Deprecated:

* `StaticCondvar` - this, and all other static synchronization primitives
                    below, are usable today through the lazy-static crate on
                    stable Rust today. Additionally, we'd like the non-static
                    versions to be directly usable in a static context one day,
                    so they're unlikely to be the final forms of the APIs in any
                    case.
* `CONDVAR_INIT`
* `StaticMutex`
* `MUTEX_INIT`
* `StaticRwLock`
* `RWLOCK_INIT`
* `iter::Peekable::is_empty`

Closes #27717
Closes #27720
cc #27784 (but encode methods still exist)
Closes #30014
Closes #30425
Closes #30449
Closes #31190
Closes #31399
Closes #31767
Closes #32111
Closes #32281
Closes #32312
Closes #32551
Closes #33018
2016-05-24 09:00:39 -07:00
Jonathan Turner
df87a781de Satisfy tidy 2016-05-24 10:57:44 -04:00
Felix S. Klock II
fdf80bc60c Removed type Bit and fn interpret items from trait BitDenotation.
Also got rid of the `trait HasMoveData`, since I am now just imposing
the constraint that `BitDenotation<Ctxt=MoveData<'tcx>>` where
necessary instead.
2016-05-24 16:46:19 +02:00
Jonathan Turner
00b78d0d6a Back to single line between errors. Add header space to secondary files 2016-05-24 10:42:32 -04:00
Felix S. Klock II
0cf5f1023e Replaced use of interpret method in mir::dataflow::graphviz with a client-provided closure. 2016-05-24 16:16:42 +02:00
Kamal Marhubi
3bef085ea8 syntax: Make codemap::get_filemap() return an Option
This is more idiomatic, putting the caller in charge of whether or not
to panic.
2016-05-24 16:08:01 +02:00
Felix S. Klock II
221cce915a move the tcx and mir parts of associated Ctxt onto each BitDenotation impl. 2016-05-24 15:01:48 +02:00
Georg Brandl
2e812e10f4 syntax/hir: give loop labels a span
This makes the "shadowing labels" warning *not* print the entire loop
as a span, but only the lifetime.

Also makes #31719 go away, but does not fix its root cause (the span
of the expanded loop is still wonky, but not used anymore).
2016-05-24 14:22:14 +02:00
Jeffrey Seyfried
e9c0283369 Add comments and fix a nit 2016-05-24 11:48:00 +00:00
Jonathan Turner
9cc8debeb7 Move issue-26480 cfail to ui test. Fix #33763 2016-05-24 07:40:09 -04:00
Felix S. Klock II
ae09c5e36e Moved the four impls of BitDenotation to their own module, mod impls. 2016-05-24 13:26:54 +02:00
Guillaume Gomez
46138352e6 Rollup merge of #33810 - tmr232:patch-1, r=Manishearth
Fixed link in Rust Book (no-stdlib)

Closes #33806
2016-05-24 12:58:19 +02:00
Guillaume Gomez
1e4a77bef2 Rollup merge of #33797 - alex-ozdemir:rustdoc, r=GuillaumeGomez
Changed toggle all sections key to `T`

Allows both `T` and `t`.

It had been [Shift]+[+] before.

In response to #33791.

cc @Manishearth
r? @GuillaumeGomez
2016-05-24 12:58:18 +02:00
Guillaume Gomez
5e0d493097 Rollup merge of #33781 - GuillaumeGomez:err-codes, r=steveklabnik
Add new error code tests

r? @steveklabnik
2016-05-24 12:58:18 +02:00
Guillaume Gomez
94b16f123f Rollup merge of #33779 - GuillaumeGomez:repr-simd, r=steveklabnik
Update repr_simd

r? @steveklabnik
2016-05-24 12:58:17 +02:00
Guillaume Gomez
66faadaf33 Rollup merge of #33759 - aakloxu:patch-2, r=steveklabnik
Fix references links

There are duplicate link references in the article and just remove one of them.
2016-05-24 12:58:17 +02:00
Guillaume Gomez
890c3f9641 Rollup merge of #33692 - nham:fix_E0207, r=GuillaumeGomez
Improve the long explanation of E0207.

The previous explanation does not seem to explain what it means for an
implementation parameter to be used or unused. The new explanation lists
the three ways specific ways by which an impl parameter becomes constrained
(taken from RFC 447).

This also adds a link to RFC 447.

The explanation has two different examples. The first is adapted from RFC 447,
and shows an instance of E0207 on a impl for a type. The second one is a trait
impl example adapted from issue #22834.

Closes #33650

cc #32777

r? @GuillaumeGomez
2016-05-24 12:58:17 +02:00
Felix S. Klock II
ede29581d2 mir::dataflow::sanity_check: extract an fn each_block to simplify presentation.
As a drive-by: unified pair of match arms that flowed to `bug!`, and
replaced `bug!` invocation with a diagnostic `span_err` invocation.
2016-05-24 12:56:02 +02:00
Felix S. Klock II
b8c6d1c708 Fix comment within sanity_check. 2016-05-24 12:37:39 +02:00
Felix S. Klock II
c48650d14e bug fix to borrowck::indexed_set: wanted bit-count not byte-count. 2016-05-24 12:35:35 +02:00
Leo Testard
7d521445fd Avoid iterating two times over the list of LHSes. 2016-05-24 11:21:37 +02:00
Leo Testard
eb364e9c29 Make sure that macros that didn't pass LHS checking are not expanded.
This avoids duplicate errors for things like invalid fragment specifiers, or
parsing errors for ambiguous macros. Fixes #29231.
2016-05-24 11:21:28 +02:00
Mátyás Mustoha
ba8d46eac8 Fix asm-misplaced-option on ARM/AArch64 2016-05-24 10:56:03 +02:00
Alex Crichton
09859692ff rustbuild: Add support for --enable-local-rust
This commit adds support for the `--enable-local-rust` `./configure` switch
which uses the locally installed `rustc` to bootstrap the compiler.
2016-05-23 22:57:33 -07:00
diwic
86a6256270 panic.rs: fix docs (recover -> catch_unwind)
The current docs are a bit inconsistent. First, change all references of "recover" to "catch_unwind" because the function was renamed. Second, consistently use the term "unwind safe" instead of "panic safe", "exception safe" and "recover safe" (all these terms were used previously).
2016-05-24 07:28:32 +02:00
Alex Crichton
a2434eb950 mk: Fix bootstrapping cross-hosts on beta
The beta builds are currently failing, unfortunately, due to what is presumably
some odd behavior with our makefiles. The wrong bootstrap key is being used to
generate the stage1 cross-compiled libraries, which fails the build.
Interestingly enough if the targets are directly specified as part of the build
then it works just fine! Just a bare `make` fails...

Instead of trying to understand what's happening in the makefiles instead just
tweak how we configure the bootstrap key in a way that's more likely to work.
2016-05-23 22:21:21 -07:00
bors
dd6e8d45e1 Auto merge of #33787 - cuviper:local-rebuild, r=alexcrichton
Add --enable-local-rebuild to bootstrap from the current release

In Linux distributions, it is often necessary to rebuild packages for cases like applying new patches or linking against new system libraries.  In this scenario, the rustc in the distro build environment may already match the current release that we're trying to rebuild.  Thus we don't want to use the prior release's bootstrap key, nor `--cfg stage0` for the prior unstable features.

The new `configure --enable-local-rebuild` option specifies that we are rebuilding from the current release.  The current bootstrap key is used for the local rustc, and current stage1 features are also assumed.  Both the makefiles and rustbuild support this configuration.

Fixes #29556
r? @alexcrichton
2016-05-23 20:02:23 -07:00
Srinivas Reddy Thatiparthy
69db6e6032 format with [rustfmt_skip] and addressed a few comments 2016-05-24 07:39:55 +05:30
Guillaume Gomez
22d626f555 Fix invalid background color in stability elements 2016-05-24 00:33:16 +02:00
bors
57ef015132 Auto merge of #33664 - huonw:abs_sub, r=alexcrichton
Deprecate {f32,f64}::abs_sub.

The abs_sub name is misleading: the function actually computes the
positive difference (`fdim` in C), not the `(x - y).abs()` that *many* people expect
from the name.

This function can be replaced with just `(x - y).max(0.0)`, mirroring
the `abs` version, but this behaves differently with NAN: `NAN.max(0.0)
== 0.0`, while `NAN.positive_diff(0.0) == NAN`. People who absolutely
need that behaviour can use the C function directly and/or talk to the libs
team (we haven't encountered a concrete use-case for this functionality).

Closes #30315.
2016-05-23 13:31:59 -07:00
Jonathan Turner
428099233a Fix #33819 and update ui test 2016-05-23 14:48:11 -04:00
Carol (Nichols || Goulding)
1e809f57a4 "the trait Hash" => "the Hash trait" 2016-05-23 14:39:41 -04:00