Commit Graph

51941 Commits

Author SHA1 Message Date
Michael Woerister c2ede7e185 Add run-make test for stable symbol-name generation. 2016-04-03 00:44:17 -04:00
Michael Woerister 6bd7299964 Fix typo in TxCtxt::crate_disambiguator(). 2016-04-01 13:56:40 -04:00
bors b0d31707cc Auto merge of #32643 - Amanieu:arc_compare_exchange, r=alexcrichton
Change Arc to use compare_exchange instead of compare_and_swap

This should slightly improve code generation on architectures with a weak memory model like ARM.
2016-04-01 01:46:06 -07:00
bors 53498eca50 Auto merge of #32635 - gereeter:hashmap-iter-variance, r=alexcrichton
Make HashMap, HashSet, and their iterators properly covariant

See #30642. `Drain` is the only type left invariant.
2016-03-31 23:31:58 -07:00
bors 3b342fae8e Auto merge of #32586 - seanmonstar:speialize-to-string, r=alexcrichton
specialize ToString for str

If there was some conditional compiling we could do, such that this impl only exists in nightly, and is turned off in beta/stable, I think that'd be an improvement here, as we could test specialization out without affecting stable builds.
2016-03-31 21:18:29 -07:00
bors a2f0cc6b0c Auto merge of #32550 - tbu-:pr_ref_cell_as_unsafe_cell, r=alexcrichton
Remove `unsafe` qualifier from `RefCell::as_unsafe_cell`

This method is no longer unsafe because the field of `UnsafeCell` is no
longer public.
2016-03-31 17:52:25 -07:00
bors e1195c24bb Auto merge of #32506 - petrochenkov:use, r=Manishearth
syntax: Extra diagnostics for `_` used in an identifier position

Closes https://github.com/rust-lang/rust/issues/32501
2016-03-31 14:08:44 -07:00
bors 3399d19a2c Auto merge of #31938 - jseyfried:autoderef_privacy, r=nikomatsakis
Integrate privacy into field and method selection

This PR integrates privacy checking into field and method selection so that an inaccessible field/method can not stop an accessible field/method from being used (fixes #12808 and fixes #22684).
r? @eddyb
2016-03-31 09:09:34 -07:00
Amanieu d'Antras 9a28d4edc9 Change Arc to use compare_exchange instead of compare_and_swap 2016-03-31 13:15:20 +01:00
Vadim Petrochenkov 1cbdf4e7d3 syntax: Extra diagnostics for `_` used in an identifier position 2016-03-31 10:15:36 +03:00
bors 4583dc9b13 Auto merge of #32439 - jseyfried:visible_suggestions, r=nrc
diagnostics: make paths to external items more visible

This PR changes the reported path for an external item so that it is visible from at least one local module (i.e. it does not use any inaccessible external modules) if possible. If the external item's crate was declared with an `extern crate`, the path is guarenteed to use the `extern crate`.

Fixes #23224, fixes #23355, fixes #26635, fixes #27165.

r? @nrc
2016-03-30 21:13:43 -07:00
Jonathan S 589108baf6 Test that HashMap, HashSet, and their iterators are properly covariant 2016-03-30 22:02:36 -05:00
Jonathan S 1639f2d289 Fix the variances of HashMap and HashSet iterators 2016-03-30 22:02:36 -05:00
Jonathan S 285a40a906 Make HashMap's RawBucket covariant 2016-03-30 22:01:31 -05:00
bors 30a3849f22 Auto merge of #32628 - Manishearth:rollup, r=Manishearth
Rollup of 4 pull requests

- Successful merges: #32259, #32494, #32612, #32618
- Failed merges: #32562
2016-03-30 16:41:08 -07:00
Manish Goregaokar 458fae709c Rollup merge of #32618 - ProgVal:patch-1, r=steveklabnik
Book: Fix phrasing: “an associated type” → “an object with an associated type”.

From what I understood, `graph` is the object from which we create a trait object, and the associated types are `Graph::N` and `Graph::E`.
2016-03-31 05:04:59 +05:30
Manish Goregaokar cb5af8901a Rollup merge of #32612 - frewsxcv:unnecessary-coercions, r=alexcrichton
Remove no longer necessary coercions to fn pointer types.

Originally added in 8fe9e4dff6.

Everything appears to build fine without the coercions, so they can
presumably be removed.
2016-03-31 05:04:59 +05:30
Manish Goregaokar 74546e8ab7 Rollup merge of #32494 - pnkfelix:gate-parser-recovery-via-debugflag, r=nrc
Gate parser recovery via debugflag

Gate parser recovery via debugflag

Put in `-Z continue_parse_after_error`

This works by adding a method, `fn abort_if_no_parse_recovery`, to the
diagnostic handler in `syntax::errors`, and calling it after each
error is emitted in the parser.

(We might consider adding a debugflag to do such aborts in other
places where we are currently attempting recovery, such as resolve,
but I think the parser is the really important case to handle in the
face of #31994 and the parser bugs of varying degrees that were
injected by parse error recovery.)

r? @nikomatsakis
2016-03-31 05:04:59 +05:30
Manish Goregaokar 9957081e78 Rollup merge of #32259 - oli-obk:move_const_eval, r=alexcrichton
move `const_eval` and `check_match` out of `librustc` into their own crate

r? @arielb1
2016-03-31 05:04:59 +05:30
Jeffrey Seyfried da41e583d6 Fix fallout in tests 2016-03-30 22:00:48 +00:00
Jeffrey Seyfried 0c6f067961 Add method `visible_item_path` to `CStore` 2016-03-30 22:00:46 +00:00
Jeffrey Seyfried 48c20b0e73 Improve tests 2016-03-30 21:26:35 +00:00
Vadim Petrochenkov 38bef43652 privacy: Cleanup check_field 2016-03-30 21:26:35 +00:00
Jeffrey Seyfried 48b048deb7 Clean up the privacy visitor 2016-03-30 21:26:35 +00:00
Jeffrey Seyfried 8762fc31db Add tests for #12808 and #22684 2016-03-30 21:26:35 +00:00
Jeffrey Seyfried 09af5036da Fix fallout in tests 2016-03-30 21:26:35 +00:00
Jeffrey Seyfried 6f16c5c81f Autoderef privacy for methods 2016-03-30 21:26:35 +00:00
Jeffrey Seyfried 62d181f474 Autoderef privacy for fields 2016-03-30 21:26:32 +00:00
Felix S. Klock II e1d8ad3fb0 fix compile-fail and parse-fail tests by blindly opting back into
parser recovery (so that expected errors match up)

I'm opting into parser recovery in all these cases out of expediency,
not because the error messages you get with recovery enabled are
actually all that usable in all cases listed.
2016-03-30 22:23:54 +02:00
Felix S. Klock II 2646663b5a Put in `-Z continue-parse-after-error`
This works by adding a boolean flag, `continue_after_error`, to
`syntax::errors::Handler` that can be imperatively set to `true` or
`false` via a new `fn set_continue_after_error`.

The flag starts off true (since we generally try to recover from
compiler errors, and `Handler` is shared across all phases).

Then, during the `phase_1_parse_input`, we consult the setting of the
`-Z continue-parse-after-error` debug flag to determine whether we
should leave the flag set to `true` or should change it to `false`.

----

(We might consider adding a debugflag to do such aborts in other
places where we are currently attempting recovery, such as resolve,
but I think the parser is the really important case to handle in the
face of #31994 and the parser bugs of varying degrees that were
injected by parse error recovery.)
2016-03-30 22:23:48 +02:00
bors bfacabc6a2 Auto merge of #32621 - steveklabnik:rollup, r=steveklabnik
Rollup of 7 pull requests

- Successful merges: #32580, #32591, #32603, #32605, #32606, #32607, #32608
- Failed merges:
2016-03-30 11:33:31 -07:00
Sean McArthur fc8cf9c5af specialize ToString for str 2016-03-30 10:40:06 -07:00
Valentin Lorentz b1b37384cd Book: Fix phrasing: “an associated type” → “a trait with an associated type”. 2016-03-30 19:34:53 +02:00
Steve Klabnik 2ba860677c Rollup merge of #32608 - tshepang:grammar, r=aturon
doc: "of the" seems more correct than "to the"

It's also less ambiguous
2016-03-30 10:16:55 -07:00
Steve Klabnik 709be98804 Rollup merge of #32607 - tshepang:we-gots-intoiterator, r=apasel422
doc: no need for an explicit iter()
2016-03-30 10:16:55 -07:00
Steve Klabnik 1978a9951b Rollup merge of #32606 - tshepang:typo, r=bluss
doc: fix typo
2016-03-30 10:16:55 -07:00
Steve Klabnik 45d633db26 Rollup merge of #32605 - tshepang:not-needed, r=Manishearth
doc: "mut" not needed for the examples
2016-03-30 10:16:54 -07:00
Steve Klabnik 662e7af0f9 Rollup merge of #32603 - tshepang:capitalise, r=bluss
doc: first letter should be upper case
2016-03-30 10:16:54 -07:00
Steve Klabnik 6f885c3c15 Rollup merge of #32591 - CryZe:patch-1, r=steveklabnik
Fix panic_fmt in the Book

While implementing panic_fmt for the GameCube I noticed that the parameters given to it were completely broken. Turns out that panic_fmt requires the C ABI to work correctly. This should be fixed in the documentation, so that others don't make the same mistake. Thanks to mbrubeck in the IRC for helping me figure this out.

Not specifying extern for lang_items correctly should potentially also be a compiler error.
2016-03-30 10:16:54 -07:00
Steve Klabnik 9f403abba2 Rollup merge of #32580 - durka:patch-17, r=steveklabnik
verb agreement in core::convert docs
2016-03-30 10:16:54 -07:00
Corey Farwell 99501e6177 Remove no longer necessary coercions to fn pointer types.
Originally added in 8fe9e4dff6.

Everything appears to build fine without the coercions, so they can
presumably be removed.
2016-03-30 09:50:55 -04:00
bors 102a5be712 Auto merge of #32603 - tshepang:capitalise, r=bluss
doc: first letter should be upper case
2016-03-30 06:18:59 -07:00
Oliver Schneider 3eac64747f move `const_eval` and `check_match` out of `librustc` 2016-03-30 13:43:36 +02:00
Tshepang Lekhonkhobe fd78ae860f doc: no need for an explicit iter() 2016-03-30 13:35:52 +02:00
Oliver Schneider 6cc449ad24 rename `rustc_const_eval` to `rustc_const_math` 2016-03-30 11:10:21 +02:00
bors 70b8b9487a Auto merge of #32581 - GuillaumeGomez:patch-3, r=steveklabnik
Add doc examples on pointer types

r? @steveklabnik

Fixes #29336
2016-03-30 00:53:57 -07:00
Tshepang Lekhonkhobe 65cdf5d44d doc: "of the" seems more correct than "to the"
It's also less ambiguous
2016-03-30 09:01:22 +02:00
bors a48c9a11a6 Auto merge of #32593 - alexcrichton:fix-i586-msvc, r=brson
mk: A few build fixes for i586-pc-windows-msvc

Detect the triple in the configure script for probing MSVC shenanigans and also
be sure to use `llvm-config` from the build host and not the target when
configuring compiler-rt.
2016-03-29 21:25:52 -07:00
bors b678600ac9 Auto merge of #32576 - alexcrichton:metadata-for-our-crates, r=brson
mk: Fix cross-host builds

The change in b20e748 had the unintended consequence of breaking cross-host
builds as we apparently relied on the incorrect definition of this variable in
the makefiles. That change, however, was required to get tests passing so we
couldn't just revert it.

This commit fixes the underlying bug by leaving the "more correct" definition of
`LD_LIBRARY_PATH_ENV_TARGETDIR` (also fixing it with a hardcoded reference to
`CFG_BUILD`) and updating the `RPATH_VAR` definition below. Turned out we
already had special-casing logic for passing `--cfg stage1` during the
well-we-print-this-as-stage0 build of a cross-host. That logic was just updated
to pull from a different variable as opposed to relying on the definition of
that variable to accommodate this.

Closes #32568
2016-03-29 18:03:35 -07:00
Alex Crichton 7668b4bec2 mk: A few build fixes for i586-pc-windows-msvc
Detect the triple in the configure script for probing MSVC shenanigans and also
be sure to use `llvm-config` from the build host and not the target when
configuring compiler-rt.
2016-03-29 16:43:49 -07:00