Commit Graph

83409 Commits

Author SHA1 Message Date
Jakub Kozlowski
4b7f2eb947 Fixup whitespace 2018-09-06 22:18:39 +01:00
bors
a8c11d216b Auto merge of #53575 - matthewjasper:unsized-is-an-error, r=estebank
Don't reduce E0161 to a warning in NLL migrate mode

This error has been on stable for a while, and allowing such code cause the compile to later ICE (since we can't codegen it). Errors `box UNSIZED EXPR` with unsized locals because it's not compatible with the current evaluation order (create the box before evaluating the expressions).

cc #53469 (fixes the ICE in this case)
cc @qnighy
2018-09-06 21:02:35 +00:00
Jorge Aparicio
6c4f3f512e update UI test 2018-09-06 23:01:35 +02:00
Mikhail Modin
527a29a5c6 Skip a shared borrow of a immutable local variables
issue #53643
2018-09-06 21:46:52 +01:00
Without Boats
972cd8bb69
Fix typos. 2018-09-06 21:31:06 +02:00
Jorge Aparicio
9b764c3190 crates that provide a panic_handler are exempt from unused_extern_crates
fixes the *first* false positive reported in #53964
2018-09-06 21:24:33 +02:00
Eduard-Mihai Burtescu
31fce914b2 rustc_resolve: allow use crate_name; under uniform_paths. 2018-09-06 22:07:56 +03:00
Jakub Kozlowski
4088a385a7 Allow named lifetimes in async functions.
- Fixes #53174
2018-09-06 19:02:51 +01:00
Eduard-Mihai Burtescu
b9e7574bf2 rustc_codegen_llvm: don't assume offsets are always aligned. 2018-09-06 20:56:20 +03:00
ms2300
f4d4faaeed Fixing tests from anon -> opaque 2018-09-06 11:43:31 -06:00
bors
c318691407 Auto merge of #52626 - brunocodutra:issue-52475, r=oli-obk
Fix issue #52475: Make loop detector only consider reachable memory

As [suggested](https://github.com/rust-lang/rust/pull/51702#discussion_r197585664) by @oli-obk `alloc_id`s should be ignored by traversing all `Allocation`s in interpreter memory at a given moment in time, beginning by `ByRef` locals in the stack.

- [x] Generalize the implementation of `Hash` for `EvalSnapshot` to traverse `Allocation`s
- [x] Generalize the implementation of `PartialEq` for `EvalSnapshot` to traverse `Allocation`s
- [x] Commit regression tests

Fixes #52626
Fixes https://github.com/rust-lang/rust/issues/52849
2018-09-06 17:35:40 +00:00
Tim
43eb9259ec Use binary_op_val instead of doing the check manually. 2018-09-06 15:11:56 +02:00
Felix S. Klock II
4973094feb Allow illegal_floating_point_literal_pattern. These will need to be updated at some point.
Discussion can be found on rust-lang/rust#41620.
2018-09-06 14:55:24 +02:00
Felix S. Klock II
8e72955526 Allow unions_with_drop_fields for unions with members with destructors
(or generics that *might* have dtors)
2018-09-06 14:55:24 +02:00
Felix S. Klock II
84a02e17da Allow various name convention lints. 2018-09-06 14:55:21 +02:00
Felix S. Klock II
f3b766d7ad Add // run-pass to collection of tests. 2018-09-06 14:41:12 +02:00
Felix S. Klock II
76ceeddb2b Migrated remaining src/test/run-pass/ subdirectories to src/test/ui/run-pass/. 2018-09-06 14:36:26 +02:00
Eduard-Mihai Burtescu
c34dd37f85 rustc_resolve: don't record uniform_paths canaries as reexports. 2018-09-06 15:04:21 +03:00
Tim
92dd526a4e Move check out of the match on the intrinsic name 2018-09-06 13:54:27 +02:00
Felix S. Klock II
ff8f1a3b94 Allow some lints to let the ported run-pass/borrowck tests get through. 2018-09-06 13:51:09 +02:00
Felix S. Klock II
4a7c8cc4b9 Add // run-pass to collection of tests. 2018-09-06 13:29:24 +02:00
Felix S. Klock II
65780bc0c7 Migrated src/test/run-pass/borrowck to src/test/ui/run-pass.
Just shuffling files here; the needed updates to content come later.
2018-09-06 13:29:24 +02:00
Tim
58af73c370 Add unchecked_shl/shr checks for intrinsics 2018-09-06 13:13:07 +02:00
Felix S. Klock II
5fe0851548 Allow more lints, mainly overflowing_literals for cases that only arose on 32-bit. 2018-09-06 13:00:26 +02:00
Felix S. Klock II
dc124e4d0b Add #![allow(stable_features)] to ease review.
That is, opting to ignore stable `#![feature(..)]`, under my theory
that a reviewer would prefer as much stuff to be bucketed under "ah
another `#![allow(..)]` here." as possible.
2018-09-06 13:00:26 +02:00
Felix S. Klock II
f97eea1c10 Add .stderr file for test that appears to trigger a lint that cannot be silenced. 2018-09-06 13:00:26 +02:00
Felix S. Klock II
2bce9b031f Add .stdout file for test of log_syntax! and trace_macros!. 2018-09-06 13:00:26 +02:00
Felix S. Klock II
18a77ae4ab Allow uses of #[unsafe_destructor_blind_to_params]. Should be ported to #[may_dangle].
See rust-lang/rust#34761.
2018-09-06 13:00:26 +02:00
Felix S. Klock II
4a9e55e05a Allow illegal_floating_point_literal_pattern. These will need to be updated at some point.
Discussion can be found on rust-lang/rust#41620.
2018-09-06 13:00:26 +02:00
Felix S. Klock II
dc7685e958 Update line numbers to reflect added lines at beginning of tests. 2018-09-06 13:00:26 +02:00
Felix S. Klock II
90412f149c Add .stderr files for shadowed labels where the point of the test is to test such cases. 2018-09-06 13:00:26 +02:00
Felix S. Klock II
f78b9add44 Alpha-rename label to avoid the shadowing lint (which cannot be silenced). 2018-09-06 13:00:26 +02:00
Felix S. Klock II
175d7f4e48 Add .stderr file for test where there are conflicting repr hints.
See rust-lang/rust#53857.
2018-09-06 13:00:26 +02:00
Felix S. Klock II
d18b3bf104 Add #![allow(improper_ctypes)] to extern-pass-empty.rs; note this test seems bogus.
that is, I suspect it should be retired because it is testing behavior
(namely a `#[repr(C)] struct Empty;`) that, if I understand correctly,
is undefined.

See also rust-lang/rust#53859.
2018-09-06 13:00:26 +02:00
Felix S. Klock II
8bcf37d949 Add #[allow(improper_ctypes)] to slew of cases that need e.g. repr(C).
See also rust-lang/rust#53858.
2018-09-06 13:00:26 +02:00
Felix S. Klock II
e462c1adc5 Add #![allow(..)] for a slew of lints of migrated run-pass tests, to silence stderr output. 2018-09-06 13:00:26 +02:00
Felix S. Klock II
90241dfba3 Remove references to a collection of unknown lints. 2018-09-06 13:00:26 +02:00
Felix S. Klock II
06f36a04a4 Move a bunch of auxiliary support files into ui/run-pass/**/auxiliary. 2018-09-06 13:00:26 +02:00
Felix S. Klock II
0909e0bf70 Add // run-pass annotations to all the tests under ui/run-pass/.
(I may have accidentally added it to some auxilliary crates as well;
my emacs-macro-based methodology was pretty crude.)
2018-09-06 13:00:26 +02:00
Felix S. Klock II
7834c22848 Migrated slew of run-pass tests to various subdirectories of ui/run-pass/. 2018-09-06 13:00:26 +02:00
bors
35a5541fd9 Auto merge of #53707 - eddyb:phantom-waffles, r=oli-obk
rustc_typeck: turn `where Type:,` into a WF(Type) predicate, instead of ignoring it.

Fixes #53696, assuming crater doesn't catch anyone using this syntax already.

Allowing an empty list of bounds in the grammar was done for the benefit of macro authors, most of which would *probably* be using it for bounds on type parameters, which are always WF.

r? @nikomatsakis cc @petrochenkov
2018-09-06 09:32:23 +00:00
bors
20ca02569a Auto merge of #53721 - arielb1:exhaustively-unpun, r=nikomatsakis
fix `is_non_exhaustive` confusion between structs and enums

Structs and enums can both be non-exhaustive, with a very different
meaning. This PR splits `is_non_exhaustive` to 2 separate functions - 1
for structs, and another for enums, and fixes the places that got the
usage confused.

Fixes #53549.

r? @eddyb
2018-09-06 06:42:19 +00:00
Thomas Lively
3dab33225a
Merge branch 'master' into fix-submodules 2018-09-05 21:40:39 -07:00
François Bernier
28745a6e19 Implement initializer() for FileDesc
in order to avoid constantly zeroing memory when it's not needed.
2018-09-05 23:41:20 -04:00
bors
27e5457f3f Auto merge of #53955 - alexcrichton:fix-dist-again, r=japaric
rustbuild: Tweak LLVM distribution layout

This commit tweaks the layout of a few components that we distribute to
hopefully fix across all platforms the recent issues with LLD being unable to
find the LLVM shared object. In #53245 we switched to building LLVM as a dynamic
library, which means that LLVM tools by default link to LLVM dynamically rather
than statically. This in turn means that the tools, at runtime, need to find the
LLVM shared library.

LLVM's shared library is currently distributed as part of the rustc component.
This library is located, however, at `$sysroot/lib`. The LLVM tools we ship are
in two locations:

* LLD is shipped at `$sysroot/lib/rustlib/$host/bin/rust-lld`
* Other LLVM tools are shipped at `$sysroot/bin`

Each LLVM tool has an embedded rpath directive indicating where it will search
for dynamic libraries. This currently points to `../lib` and is presumably
inserted by LLVM's build system. Unfortunately, though, this directive is only
correct for the LLVM tools at `$sysroot/bin`, not LLD!

This commit is targeted at fixing this situation by making two changes:

* LLVM tools other than LLD are moved in the distribution to
  `$sysroot/lib/rustlib/$host/bin`. This moves them next to LLD and should
  position them for...
* The LLVM shared object is moved to `$sysroot/lib/rustlib/$host/lib`

Together this means that all tools should natively be able to find the shared
object and the shared object should be installed all the time for the various
tools. Overall this should...

Closes #53813
2018-09-06 02:09:12 +00:00
bors
8b7f164eab Auto merge of #52994 - varkor:trim_direction, r=alexcrichton
Add trim_start, trim_end etc.; deprecate trim_left, trim_right, etc. in future

Adds the methods: `trim_start`, `trim_end`, `trim_start_matches` and `trim_end_matches`.
Deprecates `trim_left`, `trim_right`, `trim_left_matches` and `trim_right_matches` starting from Rust 1.33.0, three versions from when they'll initially be marked as being deprecated, using the future deprecation from https://github.com/rust-lang/rust/issues/30785 and https://github.com/rust-lang/rust/pull/51681.

Fixes https://github.com/rust-lang/rust/issues/30459.
2018-09-05 23:45:08 +00:00
Vadim Petrochenkov
a6adeae104 Validate syntax of --cfg command line arguments 2018-09-06 02:04:04 +03:00
Alex Crichton
0338d340c4 Remove #[repr(transparent)] from atomics
Added in #52149 the discussion in #53514 is showing how we may not want to
actually add this attribute to the atomic types. While we continue to
debate #53514 this commit reverts the addition of the `transparent` attribute.
This should be a more conservative route which leaves us the ability to tweak
this in the future but in the meantime allows us to continue discussion as well.
2018-09-05 15:41:44 -07:00
Vadim Petrochenkov
b0a05c5981 Validate syntax of cfg attributes 2018-09-06 01:18:30 +03:00
Without Boats
c82af09bb0
Add comment. 2018-09-05 23:47:10 +02:00