Commit Graph

76808 Commits

Author SHA1 Message Date
bors
32428808b4 Auto merge of #49861 - pnkfelix:compare-mode-nll-followup-2, r=nikomatsakis
Blindly checkpoint status of NLL mode ui tests

This takes the next (and potentially final?) step with #48879.

Namely, this PR got things to the point where I can successfully run `compiletest` on `src/test/ui` with `--compile-mode=nll`.

Here are the main pieces of it:

 1. To figure out how to even run `compiletest` normally on the ui directory, I ran `x.py test -vv`, and then looked for the `compiletest` invocation that mentioned `src/test/ui`.
 2. I took the aforementioned `compiletest` invocation and used it, adding `--compile-mode=nll` to the end. It had 170 failing cases.
 3. Due to #49855, I had to edit some of the tests so that they fail even under NLL, via `#[rustc_error]`. That's the first commit. (Then goto 2 to double-check no such tests remain.)
 4. I took the generated `build/target/test/foo.stderr` file for every case that failed, and blindly copied it to `src/test/foo.nll.stderr`. That's the second commit.
 5. Goto 2 until there were no failing cases.
 6. Remove any stamp files, and re-run `x.py test` to make sure that the edits and new `.nll.stderr` files haven't broken the pre-existing test suite.
2018-04-11 14:37:39 +00:00
Cameron Hart
15d1c4d213 Implementation of #[repr(packed(n))] RFC 1399. 2018-04-11 22:13:13 +10:00
kennytm
4dbca4c8ac
Rollup merge of #49809 - Mark-Simulacrum:no-color-for-dumb, r=alexcrichton
Stop emitting color codes on TERM=dumb

These terminals generally don't support color.

Fixes #49191

cc @nikomatsakis

r? @alexcrichton
2018-04-11 19:56:48 +08:00
kennytm
6eb66fc315
Rollup merge of #49795 - nox:niche-with-uninhabited-fields, r=eddyb
Properly look for uninhabitedness of variants in niche-filling check
2018-04-11 19:56:47 +08:00
kennytm
f4b9fdace5
Rollup merge of #49781 - Robbepop:master, r=nikomatsakis
add regression test for #16223 (NLL): use of collaterally moved value

Adds regression test for https://github.com/rust-lang/rust/issues/16223 which NLL fixes.

The current downside of this test is that it uses the `#![feature(box_patterns)]` and I haven't come up with a proper test that only uses the `#![feature(nll)]` - however, I don't know if this is even possible to test without `#![feature(box_syntax)]` or `#![feature(box_patterns)]`.
2018-04-11 19:56:46 +08:00
kennytm
1bdb9a5cfa
Rollup merge of #49665 - draganmladjenovic:mips_tests, r=nikomatsakis
Small nits to make couple of tests pass on mips targets.
2018-04-11 19:56:44 +08:00
kennytm
63c4d50e8a
Rollup merge of #49614 - zackmdavis:the_phantom_menace, r=petrochenkov
in which the non-shorthand patterns lint keeps its own counsel in macros

In issue #49588, Michael Lamparski pointed out a scenario in which the
non-shorthand-field-patterns lint could be triggered by a macro-expanded
pattern, in a way which was direly unwieldy for the macro author to guard
against and unreasonable to expect the macro user to take into account. We can
avoid this by not linting patterns that come from macro-expansions. Although
this entails accepting "false negatives" where the lint could genuinely improve
macro-templated code, avoiding the reported "true-but-super-annoying positive"
may be worth the trade? (Some precedent for these relative priorities exists as
no. 47775 (5985b0b0).)

Resolves #49588.
2018-04-11 19:56:43 +08:00
kennytm
5ee5de10d2
Rollup merge of #49575 - tmccombs:option-filter-stabilize, r=withoutboats
Stabilize `Option::filter`.

Fixes #45860
2018-04-11 19:56:42 +08:00
kennytm
77777b4528
Rollup merge of #49525 - varkor:sort_by_cached_key-conversion, r=scottmcm
Use sort_by_cached_key where appropriate

A follow-up to https://github.com/rust-lang/rust/pull/48639, converting various slice sorting calls to `sort_by_cached_key` when the key functions are more expensive.
2018-04-11 19:56:41 +08:00
Oliver Schneider
3b04823dc1
Update clippy and rls 2018-04-11 13:36:31 +02:00
bors
ca26ef321c Auto merge of #49681 - tmccombs:take-set-limit-stable, r=sfackler
Stabilize take_set_limit

Fixes #42781
2018-04-11 06:03:46 +00:00
bors
43e994c8b8 Auto merge of #49715 - Mark-Simulacrum:deny-warnings, r=alexcrichton
Move deny(warnings) into rustbuild

This permits easier iteration without having to worry about warnings
being denied.

Fixes #49517
2018-04-11 03:30:04 +00:00
Scott McMurray
311ff5b441 Tweak span for ok-wrapping in no-tail block 2018-04-10 20:03:40 -07:00
Scott McMurray
c88efe46b8 Fix the unstable book to account for ok-wrapping 2018-04-10 20:03:40 -07:00
Scott McMurray
aeb2353df5 Add a UI test that the span for the catch type error is in the right place 2018-04-10 20:03:40 -07:00
Scott McMurray
c4b6521327 Add ok-wrapping to catch blocks, per RFC 2018-04-10 20:03:40 -07:00
Mark Simulacrum
53718d2ef1 Allow incorrectly reported unused attribute warning 2018-04-10 20:04:57 -06:00
bors
88ebd97d65 Auto merge of #49695 - michaelwoerister:unhygienic-ty-min, r=nikomatsakis
Use InternedString instead of Symbol for type parameter types (2)

Reduced alternative to #49266. Let's see if this causes a performance regression.
2018-04-11 00:51:38 +00:00
memoryleak47
a648267dff fixed typo 2018-04-11 01:34:10 +02:00
Felix S. Klock II
746d63a203 Checkpoint the current status of NLL on ui tests via compare-mode=nll. 2018-04-11 00:38:35 +02:00
Felix S. Klock II
1c8d2bdda1 Workaround rust-lang/rust#49855 by forcing rustc_error in any mode, including NLL.
NOTE: I was careful to make each change in a manner that preserves the
existing diagnostic output (usually by ensuring that no lines were
added or removed). This means that the resulting source files are not
as nice to read as they were at the start. But we will have to review
these cases by hand anyway as follow-up work, so cleanup could
reasonably happen then (or not at all).
2018-04-11 00:20:05 +02:00
Amanieu d'Antras
5e5374677a Fix "fp" feature for AArch64 2018-04-10 22:34:15 +01:00
varkor
6e0089ea77 Do not uppercase-lint no_mangle statics 2018-04-10 22:30:23 +01:00
bors
0b72d48f8e Auto merge of #48914 - gaurikholkar:e0389, r=nikomatsakis
Modify compile-fail/E0389 error message WIP

This fixes #47388

cc @nikomatsakis @estebank

r? @nikomatsakis

Certain ui tests were failing locally. I'll check if the same happens here too.
2018-04-10 19:00:19 +00:00
Alec Mocatta
18e9532098
Add --enable-debug flag to musl CI build script
Building for x86_64-unknown-linux-musl currently results in an executable lacking debug information for musl libc itself. If you request a backtrace in GDB while control flow is within musl – including sycalls made by musl – the result looks like:

#0  0x0000000000434b46 in __cp_end ()
#1  0x0000000000432dbd in __syscall_cp_c ()
#2  0x0000000000000000 in ?? ()

i.e. not very helpful. Adding --enable-debug resolves this, and --enable-optimize re-enables optimisations which default to off given the previous flag.
2018-04-10 18:44:47 +01:00
bors
b2a7b94b8e Auto merge of #49386 - GuillaumeGomez:fix-path-attribute, r=eddyb
Add tcx in item_body_nested_bodies

Fixes #47391.

r? @eddyb
2018-04-10 12:58:27 +00:00
John Kåre Alsaker
006f9b2f56 Make Session.injected_panic_runtime thread-safe 2018-04-10 14:40:26 +02:00
John Kåre Alsaker
dacf9ba00f Make Session.injected_allocator and Session.allocator_kind thread-safe 2018-04-10 14:40:26 +02:00
John Kåre Alsaker
66488a50f9 Make Session.dependency_formats thread-safe 2018-04-10 14:40:26 +02:00
John Kåre Alsaker
cbf8ad4a40 Make Session.crate_types thread-safe 2018-04-10 14:40:26 +02:00
John Kåre Alsaker
046af1c710 Make sure Session.plugin_attributes is only used on one thread 2018-04-10 14:40:26 +02:00
John Kåre Alsaker
0e51d48324 Make sure Session.plugin_llvm_passes is only used on one thread 2018-04-10 14:40:25 +02:00
John Kåre Alsaker
7d33d1a84e Make Session.has_global_allocator thread-safe 2018-04-10 14:40:25 +02:00
John Kåre Alsaker
73b26f7f51 Make sure Session.imported_macro_spans is only used on one thread 2018-04-10 14:40:25 +02:00
John Kåre Alsaker
271c8d362a Make Session.crate_disambiguator thread-safe 2018-04-10 14:40:25 +02:00
John Kåre Alsaker
8380539ecb Make sure Session.next_node_id is only used on one thread 2018-04-10 14:40:25 +02:00
John Kåre Alsaker
b0c7bdaa97 Make Session.code_stats thread-safe 2018-04-10 14:40:25 +02:00
John Kåre Alsaker
904e2b6b35 Make Session::features_untracked thread-safe 2018-04-10 14:40:25 +02:00
John Kåre Alsaker
a46f05978a Disable optimization fuel when using multiple threads 2018-04-10 14:40:25 +02:00
John Kåre Alsaker
a23e90a6de Remove Cell from const_eval_stack_frame_limit and const_eval_step_limit 2018-04-10 14:40:25 +02:00
John Kåre Alsaker
753cd9a12c Make sure Session.incr_comp_session is only used on one thread 2018-04-10 14:40:25 +02:00
John Kåre Alsaker
e82b6c42b4 Make Session.plugin_registrar_fn and Session.derive_registrar_fn thread-safe 2018-04-10 14:40:25 +02:00
John Kåre Alsaker
27adb31fcc Combine Session.entry_fn and Session.entry_type and make them thread-safe 2018-04-10 14:40:25 +02:00
John Kåre Alsaker
7aa7198b4b Make PerfStats thread-safe and remove unused fields 2018-04-10 14:40:25 +02:00
John Kåre Alsaker
05c4ea47fe Remove derive_macros 2018-04-10 14:40:25 +02:00
John Kåre Alsaker
cf3b7909fa Make recursion_limit and type_length_limit thread-safe 2018-04-10 14:39:57 +02:00
John Kåre Alsaker
472b416592 Querify all_traits 2018-04-10 14:39:57 +02:00
John Kåre Alsaker
49a2b80877 Make sure the lint store is only used on one thread 2018-04-10 14:39:33 +02:00
John Kåre Alsaker
26f16e85ff Add a Once type for values which are only written once 2018-04-10 14:39:33 +02:00
John Kåre Alsaker
60d0cbe532 Add insert_same extension to HashMap 2018-04-10 14:39:33 +02:00