Eduard Burtescu
09ad993a25
tests: add two new run-pass tests for method behavior after UFCS.
2015-02-24 14:16:02 +02:00
Eduard Burtescu
d31b9ebef5
Implement <T>::method UFCS expression syntax.
2015-02-24 14:16:02 +02:00
Eduard Burtescu
fdfb532d78
tests: remove warnings from and rename const-polymorphic-paths to ufcs-polymorphic-paths.
2015-02-24 14:16:02 +02:00
Eduard Burtescu
06f362aeb3
rustc_resolve: don't handle impl items as if they were modules.
2015-02-24 14:16:01 +02:00
Eduard Burtescu
fe4f9b8e3a
Use partial path resolutions in expressions for UFCS desugaring.
2015-02-24 14:16:01 +02:00
Eduard Burtescu
7a3054f55c
rustc_resolve: remove the distinction between DefStaticMethod and DefMethod.
2015-02-24 14:14:17 +02:00
Eduard Burtescu
0f49254b31
rustc: use partially resolved definitions to replace the T::A hack.
2015-02-24 14:14:17 +02:00
Eduard Burtescu
5809f8ae74
rustc_resolve: use the visitor model more, remove redundant repeated lookups.
2015-02-24 14:14:16 +02:00
Eduard Burtescu
326711e9bd
rustc_resolve: use DefAssociatedTy for TyQPath.
2015-02-24 14:14:16 +02:00
Eduard Burtescu
9a69378e8b
rustc: load DefAssociatedTy from cross-crate metadata. Fixes #20542 .
2015-02-24 14:14:16 +02:00
Eduard Burtescu
004df413aa
syntax: don't use TraitRef in QPath.
2015-02-24 14:14:16 +02:00
Manish Goregaokar
2d74b53a03
Rollup merge of #22720 - edwardw:enum-struct-ident-walk-into-a-bar, r=nick29581
...
Closes #22589
Closes #22647
Closes #22665
Closes #22712
2015-02-24 12:33:40 +05:30
Edward Wang
a1396d250a
Add tests for expect ident but find enum or struct panic
...
Closes #22589
Closes #22647
Closes #22665
Closes #22712
2015-02-24 14:59:24 +08:00
Manish Goregaokar
89d5d2448d
Rollup merge of #22213 - eddyb:ty_open-case-closed, r=nikomatsakis
...
This type wasn't necessary, as there was no place using it and unsized types not wrapped in it, at the same time.
r? @nikomatsakis
2015-02-24 12:26:01 +05:30
Eduard Burtescu
3b0cafbcd7
tests: update expected recursion limit errors for the temporary lack of spans.
2015-02-24 08:40:15 +02:00
Manish Goregaokar
54041c2711
Rollup merge of #22594 - alexcrichton:issue-22577, r=aturon
...
The windows/unix modules were currently inconsistent about the traits being
implemented for `DirEntry` and there isn't much particular reason why the traits
*couldn't* be implemented for `ReadDir` and `DirEntry`, so this commit ensures
that they are implemented.
Closes #22577
2015-02-24 12:08:36 +05:30
Manish Goregaokar
d7df353377
Rollup merge of #22580 - pnkfelix:guard-pat-cfg2, r=pnkfelix
...
aatch's cfg revisions, namely to match expressions
Revise handling of match expressions so that arms branch to next arm.
Update the graphviz tests accordingly.
Fixes #22073 . (Includes regression test for the issue.)
2015-02-24 12:08:35 +05:30
Manish Goregaokar
5676f6084b
Rollup merge of #22301 - nikomatsakis:object-safe-sized-methods, r=huonw
...
RFC 817 is not yet accepted, but I wanted to put this code up so people can see how it works. And to be ready lest it should be accepted.
cc rust-lang/rfcs#817
2015-02-24 12:08:35 +05:30
Manish Goregaokar
cf2c14f81b
Rollup merge of #22730 - ipetkov:lint-docs, r=alexcrichton
...
This is a breaking change if missing docs are forbidden in any module or crate.
I had to add documentation to undocumented associated types in libstd and libcore, please let me know if the documentation is inadequate anywhere!
Fixes #20648
2015-02-24 12:08:35 +05:30
Manish Goregaokar
eaacc7aad5
Rollup merge of #22632 - nagisa:kill-show-string-with-fire!, r=alexcrichton
...
Toss the tomatoes!
r? @aturon
Fixes #22478 . The underlying bug(?) behind that issue still exists though and there’s another issue that reports it.
2015-02-24 12:08:33 +05:30
Manish Goregaokar
47377904a1
Rollup merge of #22680 - FlaPer87:type_builtin, r=nikomatsakis
...
Fixes #20302
2015-02-24 12:08:21 +05:30
bors
2890508d97
Auto merge of #21689 - FlaPer87:oibit-send-and-friends, r=nikomatsakis
...
This is one more step towards completing #13231
This series of commits add support for default trait implementations. The changes in this PR don't break existing code and they are expected to preserve the existing behavior in the compiler as far as built-in bounds checks go.
The PR adds negative implementations of `Send`/`Sync` for some types and it removes the special cases for `Send`/`Sync` during the trait obligations checks. That is, it now fully relies on the traits check rather than lang items.
Once this patch lands and a new snapshot is created, it'll be possible to add default impls for `Send` and `Sync` and remove entirely the use of `BuiltinBound::{BoundSend,BoundSync}` for positive implementations as well.
This PR also removes the restriction on negative implementations. That is, it is now possible to add negative implementations for traits other than `Send`/`Sync`
2015-02-24 02:22:44 +00:00
Niko Matsakis
fd9f7da68e
Make traits with by-value-self be considered object safe.
2015-02-23 15:28:27 -05:00
Niko Matsakis
fe512dacc8
Remove awful hack concerning Trait impl Trait in method resolution code that I've been longing to remove for quite some time.
2015-02-23 15:28:27 -05:00
Niko Matsakis
8f5d225933
Extend object safety so that methods with Sized:Self are exempt.
2015-02-23 15:28:26 -05:00
Manish Goregaokar
d6d33770da
Rollup merge of #22723 - alexcrichton:less-flaky-windows-test, r=alexcrichton
...
If these tests exit while a thread is panicking it often leads to situations
like #22628 .
2015-02-23 11:44:00 -08:00
Manish Goregaokar
f17a5220cb
Add marker trait to test (fixup #22538 )
2015-02-23 11:43:59 -08:00
Manish Goregaokar
3b69d1b941
Rollup merge of #22490 - nagisa:inline-args, r=alexcrichton
2015-02-23 11:43:58 -08:00
Manish Goregaokar
bf7cde449b
Rollup merge of #22538 - nagisa:properise-trans-asserts, r=nikomatsakis
2015-02-23 11:43:58 -08:00
Manish Goregaokar
f1a6d67e5e
Rollup merge of #22544 - bombless:fix-pattern, r=pnkfelix
2015-02-23 11:43:57 -08:00
Manish Goregaokar
bff94bd3c5
Rollup merge of #22624 - vadimcn:iss-13361, r=alexcrichton
...
This test appears to pass cleanly on master.
Closes #13361
2015-02-23 11:43:57 -08:00
Manish Goregaokar
8f921502bd
Rollup merge of #22667 - dotdash:retslot_cast.rs, r=huonw
...
We already do this for the function arguments, but miss it for the
retslot pointer, which can lead to LLVM assertions because the retslot
has the wrong type.
Fixes #22663
2015-02-23 11:43:56 -08:00
Manish Goregaokar
5a41536462
Rollup merge of #22664 - lfairy:just-say-no, r=alexcrichton
...
Leading hyphens already don't work (#22661 ), so no code should break from this change.
Closes #22661 .
2015-02-23 11:43:56 -08:00
Ivan Petkov
2e9521c126
Update missing-doc test to explicitly check errors
...
This way we can be sure the correct error is displayed for the
respective code type.
2015-02-23 11:33:52 -08:00
Ivan Petkov
717a91d665
Update missing-docs lint to check associated type declarations
...
[breaking-change]
Fixes #20648
2015-02-23 11:07:37 -08:00
Manish Goregaokar
af81ec2f43
Rollup merge of #22559 - kmcallister:borrowck-readme, r=nikomatsakis
...
And minor fixes to other docs.
r? @nikomatsakis
2015-02-23 23:28:46 +05:30
Alex Crichton
2408436eb4
test: Make two tests less flaky on windows
...
If these tests exit while a thread is panicking it often leads to situations
like #22628 .
2015-02-23 09:53:03 -08:00
bors
f0f7ca27de
Auto merge of #21769 - brooksbp:column-line-macro, r=nick29581
...
Please see discussion in #19284 .
2015-02-23 01:53:38 +00:00
Flavio Percoco
7ff11d7be8
Unify lifetime/type arguments error messages for (non-)builtin bounds
2015-02-22 16:31:19 +01:00
Flavio Percoco
a1945197c3
continue when builtin bounds are registered
2015-02-22 16:31:19 +01:00
Ahmed Charles
3ebdbac265
Do not permit type parameters on builtin bounds.
2015-02-22 16:31:19 +01:00
Simonas Kazlauskas
9be8ec82ce
Properly translate methods with foreign CC
...
This fixes a general issue of trying to define extern functions inside impl blocks resulting in
ICE.
Fixes #21238
Fixes #20734
Fixes #19047
2015-02-22 16:04:18 +02:00
Niko Matsakis
3dcc631dee
Add additional test case for superregion
2015-02-22 13:17:50 +01:00
Björn Steinbrink
b593c60c33
Add missing cast for retslots in case of "subtyping" due to trait bounds
...
We already do this for the function arguments, but miss it for the
retslot pointer, which can lead to LLVM assertions because the retslot
has the wrong type.
Fixes #22663
2015-02-22 12:47:27 +01:00
Simonas Kazlauskas
c9d0967383
Validate inline attribute arguments
2015-02-22 13:44:28 +02:00
James Miller
4bae133070
revise handling of match expressions so that arms branch to next arm.
...
Update the graphviz tests accordingly.
Fixes #22073 . (Includes regression test for the issue.)
(Factoring of aatch CFG code, Part 4.)
2015-02-22 12:43:08 +01:00
bors
dcc6ce2c77
Auto merge of #22574 - huonw:remove-lame-statics, r=alexcirchton
...
Add a basic test that checks that the types catch the most glaring
errors that could occur.
cc #22444
2015-02-22 10:27:08 +00:00
Chris Wong
a7594f2d5b
Disallow crate names with leading hyphens
...
Leading hyphens already don't work (#22661 ), so no code should break
from this change.
Closes #22661 .
2015-02-22 20:05:05 +13:00
Flavio Percoco
038d7e69e8
Fix test fallouts
2015-02-22 02:14:27 +01:00
Flavio Percoco
753db88914
allow negative impls for traits that have a default impl
2015-02-22 02:14:27 +01:00