Commit Graph

70772 Commits

Author SHA1 Message Date
Manish Goregaokar
4ef6847d4d Use memchr for [i8]::contains as well 2017-12-31 20:35:39 +05:30
Manish Goregaokar
1d818a4d8c Support 16 bit platforms 2017-12-13 10:40:11 -06:00
Manish Goregaokar
f8f28886e0 Use memchr in [u8]::contains 2017-12-13 09:11:42 -06:00
Manish Goregaokar
2bf0df777b Move rust memchr impl to libcore 2017-12-13 01:15:18 -06:00
bors
707d070815 Auto merge of #46647 - varkor:contrib-1, r=sfackler
Add `std::fmt::Pointer` implementation for `AtomicPtr`

Resolves #29212.
2017-12-12 15:54:13 +00:00
bors
4c2819d326 Auto merge of #46250 - canndrew:rename-never-type-impl-gate, r=petrochenkov
Rename never_type_impls gate

We no longer need a separately-named `never_type_impls` gate thanks to https://github.com/rust-lang/rust/issues/43089.
2017-12-12 13:16:30 +00:00
bors
3ece2d94d3 Auto merge of #46674 - malbarbo:undist-armv5te, r=alexcrichton
Remove armv5te target from dist-various-1

Reverts https://github.com/rust-lang/rust/pull/46498

I must have made some mistake when I tested that commit and thought armv5te target worked. but testing it now the produced binaries segfaults (https://github.com/rust-lang/rust/pull/46498#issuecomment-350599233).

I tried using crosstool-ng and buildroot toolchain (for armv5te) but the produced binaries also segfaults. Maybe there is a issue with the target, but I cannot investigate it any further.

I think the best for now is not to distribute the armv5te target.

I'm sorry for what happened.
2017-12-12 08:45:28 +00:00
bors
724500626b Auto merge of #46598 - davidtwco:issue-46471, r=arielb1
MIR borrowck: error message confuses locals and temporaries

Fixes #46471 and fixes #46472 (see [this Gitter comment](https://gitter.im/rust-impl-period/WG-compiler-nll?at=5a2d5cb53ae2aa6b3facf0c2)).

r? @arielb1
2017-12-12 06:11:33 +00:00
Andrew Cann
b9df045b79 Rename never_type_impls gate to never_type 2017-12-12 14:03:03 +08:00
bors
3a0b652846 Auto merge of #46411 - rillian:str_ascii, r=kennytm
Mark ascii methods on primitive types stable in 1.23.0 not 1.21.0.

The ascii_methods_on_intrinsics feature stabilization
didn't land in time for 1.21.0. Update the annotation
so the documentation is correct about when these
methods became available.
2017-12-12 03:30:43 +00:00
bors
5951f8d1ba Auto merge of #46657 - nikomatsakis:resolve-lifetimes-query, r=arielb1
move `resolve_lifetimes` into a proper query

Now that we made `resolve_lifetimes` into a query, elision errors no
longer abort compilation, which affects some tests.

Also, remove `dep_graph_crosscontaminate_tables` -- there is no a path in
the dep-graph, though red-green handles it. The same scenario
is (correctly) tested by issue-42602.rs in any case.

r? @michaelwoerister
2017-12-12 00:52:20 +00:00
Marco A L Barbosa
73e5334df3 Remove armv5te target from dist-various-1
Reverts https://github.com/rust-lang/rust/pull/46498

I must have made some mistake when I tested that commit and thought
armv5te target worked. but testing it now the produced binaries
segfaults
(https://github.com/rust-lang/rust/pull/46498#issuecomment-350599233).

I tried using crosstool-ng and buildroot toolchain (for armv5te) but
the produced binaries also segfaults. Maybe there is a issue with the
target, but I cannot investigate it any further.

I think the best for now is not to distribute the armv5te target.

I'm sorry for what happened.
2017-12-11 22:00:25 -02:00
David Wood
3dbc11bc63
Updated existing tests with new error messages. 2017-12-11 22:20:15 +00:00
David Wood
00c7a3f4dc
Refactored and tidied up report function 2017-12-11 22:20:12 +00:00
bors
9fe7aa353f Auto merge of #46608 - estebank:resolve-return, r=nikomatsakis
Resolve type on return type suggestion

Partially address #45871.
2017-12-11 21:14:13 +00:00
Niko Matsakis
fdbd9b0dd5 make krate infallible 2017-12-11 15:52:46 -05:00
David Wood
baf68d3a37
Fixed case where borrowed value lives until after scope 2017-12-11 20:41:27 +00:00
David Wood
52442d4d8a
Fix error does not know about free/named lifetimes 2017-12-11 20:34:39 +00:00
David Wood
15b8fbdfb3
Added test for #46472 2017-12-11 20:26:06 +00:00
David Wood
d78e8a730a
Fix error message confuses locals and temporaries 2017-12-11 20:14:06 +00:00
David Wood
4651d1e3cf
Added test for #46471 2017-12-11 19:46:01 +00:00
bors
ddbb27a241 Auto merge of #46558 - arielb1:union-borrow-refactor, r=nikomatsakis
Clean up the MIR borrowck code

I want to avoid the new code to start with so much technical debt.

r? @nikomatsakis
2017-12-11 16:43:40 +00:00
Niko Matsakis
b7794c0d3f move resolve_lifetimes into a proper query
Now that we made `resolve_lifetimes` into a query, elision errors no
longer abort compilation, which affects some tests.

Also, remove `dep_graph_crosscontaminate_tables` -- there is no a path in
the dep-graph, though red-green handles it. The same scenario
is (correctly) tested by issue-42602.rs in any case.
2017-12-11 10:11:13 -05:00
Niko Matsakis
d737ea7902 resolve_lifetime: rustfmt 2017-12-11 09:00:05 -05:00
bors
33245fe682 Auto merge of #46640 - tommyip:ui_tests, r=estebank
Enforce successful ui tests to have must-compile-successfully flag.

r? @nikomatsakis
cc @oli-obk

Fixes #46587
2017-12-11 06:54:24 +00:00
bors
5f3bd73d81 Auto merge of #46625 - emilio:moar-nits, r=kennytm
infer: Fix typo in README.

Was just reading through it and found this, not a big deal but...
2017-12-11 04:27:58 +00:00
bors
830599b195 Auto merge of #46624 - emilio:nit, r=kennytm
rustc_trans: Fix indentation in trans_set_discr.

Just noticed this while reading through #46521, which introduced this weird
alignment.
2017-12-11 02:04:56 +00:00
bors
ea16814761 Auto merge of #46248 - zackmdavis:one_time_private_enum_variant_reexport_error, r=estebank
one-time diagnostics for private enum variants glob reëxport

![private_enum_reexport](https://user-images.githubusercontent.com/1076988/33224719-4e5805f0-d121-11e7-8bc0-a708a277a5db.png)

r? @estebank
2017-12-10 23:32:09 +00:00
varkor
e4dc11d98d Add std::fmt::Pointer implementation for AtomicPtr
Resolves #29212.
2017-12-10 23:21:26 +00:00
Tommy Ip
2ad5bf056c Update ui tests' line numbers. 2017-12-10 21:14:57 +00:00
Tommy Ip
76d9b309ae Add must-compile-successfully comment to appropriate ui tests. 2017-12-10 21:14:57 +00:00
Tommy Ip
81b8db2180 Imply must-compile-successfully in ui-tests when the run-pass flag is present. 2017-12-10 21:14:57 +00:00
Tommy Ip
5990b8b57c Enforce successful ui tests to have must-compile-successfully flag. 2017-12-10 21:14:57 +00:00
bors
2d4df9584b Auto merge of #46232 - canndrew:never-docs, r=QuietMisdreavus
Add docs for never primitive

cc @nikomatsakis, @QuietMisdreavus
2017-12-10 19:04:25 +00:00
Emilio Cobos Álvarez
2fe24882a2
rustc_trans: Fix indentation in trans_set_discr.
Just noticed this while reading through #46521, which introduced this weird
alignment.
2017-12-10 19:58:17 +01:00
Emilio Cobos Álvarez
6852999188
infer: Fix typo in README.
Was just reading through it and found this, not a big deal but...
2017-12-10 17:32:51 +01:00
bors
2537a499c2 Auto merge of #46620 - bjorn3:remove-test-metric, r=kennytm
Remove *MetricFn

fixes #44808
2017-12-10 16:31:32 +00:00
Ariel Ben-Yehuda
e798cb0e52 centralize does_not_live_long_enough error reporting 2017-12-10 17:46:32 +02:00
Ariel Ben-Yehuda
ed636c5c5a remove is_unique 2017-12-10 17:46:31 +02:00
Ariel Ben-Yehuda
b64ddecae8 use places_conflict to handle reassignment
This fixes the handling of reassignment of struct fields.
2017-12-10 17:46:31 +02:00
Ariel Ben-Yehuda
97c58ed66c avoid passing the gen/kill bits to start_block_effects
If the gen/kill bits are set there, the effects of `start_block_effects`
will not be seen when using `FlowAtLocation` etc. to go over the MIR.

EverInitializedLvals is the only pass that got this wrong, but this
fixes the footgun for everyone.
2017-12-10 17:46:31 +02:00
Ariel Ben-Yehuda
733e95444f clean up reassignment duplicate error prevention 2017-12-10 17:46:31 +02:00
Ariel Ben-Yehuda
5a3f7cdcc7 move FlowAtLocation to be a dataflow abstraction
We can now use it in e.g. drop elaboration if we want to.
2017-12-10 17:46:31 +02:00
Ariel Ben-Yehuda
157231183c start extracting things into modules
The borrow_check module is too big for its own good
2017-12-10 17:46:29 +02:00
bjorn3
83c08d2174 Remove *MetricFn 2017-12-10 14:30:08 +01:00
Andrew Cann
172f16bc9d Update never_type docs based on feedback 2017-12-10 15:13:55 +08:00
bors
02b4d3ddfb Auto merge of #46611 - GuillaumeGomez:type-mismatch, r=petrochenkov
Fix switched types in type mismatch

Fixes #46609.
2017-12-10 04:01:00 +00:00
bors
c89e206eed Auto merge of #46602 - mbrubeck:try, r=kennytm
Replace option_try macros and match with ? operator

None
2017-12-10 00:57:40 +00:00
Zack M. Davis
4fb57e0796 one-time diagnostic and suggestion for reëxporting private variant error
We issue just one message for an erroneous glob private variant reëxport
(using the Session's one-time-diagnostics capability), but individual
(non-glob) such erroneous reëxports still get their own messages. The
suggestion to make the enum public is also one-time.

The enum variant reëxport error didn't have an associated error code
(and remedying this here is deemed out of the scope of this commit), so
we resort to the expediency of using 0 as the `DiagnosticMessageId`
value.

Adding Debug to NameResolution was helpful in development.

This resolves #46209.
2017-12-09 16:33:32 -08:00
Zack M. Davis
883f5e5e65 one-time diagnostics: span_suggestion, generalize methods for non-lints
304c8b1eda made the Session's one-time-diagnostics set take a
special-purpose `DiagnosticMessageId` enum rather than a LintID so that
it could support more than just lints, but the `diag_span_note_once` and
`diag_note_once` methods continued to take references to lints: for API
consistency, we now make these methods take a `DiagnosticMessageId`
while we add support for one-time span-suggestions.
2017-12-09 16:33:32 -08:00