Commit Graph

81044 Commits

Author SHA1 Message Date
Niko Matsakis
596ff12432 add regression test for #52078
Fixes #52078
2018-07-21 15:56:47 +03:00
Niko Matsakis
0b88103985 skip no-op obligations and add a little debug output 2018-07-21 15:56:47 +03:00
Tyler Mandry
e5286d9fa6 Convert implied_outlives_bounds to a query 2018-07-21 15:56:44 +03:00
bors
606713f37a Auto merge of #52562 - Manishearth:clippyup, r=RalfJung
Update clippy

r? @kennytm @oli-obk
2018-07-21 12:32:17 +00:00
dylan_DPC
a4c0d369b6 add docs 2018-07-21 17:21:04 +05:30
Oliver Schneider
2f7edccb03 Don't invent new magic keywords 2018-07-21 12:36:18 +02:00
bors
ef9781358d Auto merge of #52555 - petrochenkov:mresfact, r=alexcrichton
resolve: Some renaming, refactoring and comments

Commits are self-descriptive.
The only functional change is 34bf2f572e that tightens shadowing rules for macro paths (makes the second and third cases in `test/ui/imports/glob-shadowing.rs` an error).
2018-07-21 10:30:11 +00:00
Felix Rabe
c581b96f39
Typo 2018-07-21 11:49:52 +02:00
bors
bd455ef165 Auto merge of #52552 - eddyb:proc-macro-prep, r=alexcrichton
Prepare proc_macro for decoupling it from the rest of the compiler.

This is #49219 up to the point where the bridge is introduced. Aside from moving some code around, the largest change is the rewrite of `proc_macro::quote` to be simpler and do less introspection.

I'd like to also extend `quote!` with `${stmt;...;expr}` instead of just `$variable` (and maybe even `$(... $iter ...)*`), which seems pretty straight-forward now, but I don't know if/when I should.

r? @alexcrichton or @dtolnay cc @jseyfried @petrochenkov
2018-07-21 08:31:32 +00:00
bors
17eb392cef Auto merge of #52535 - alexcrichton:update-stdsimd, r=Mark-Simulacrum
Update stdsimd to undo an accidental stabilization

Closes #52403
2018-07-21 06:26:18 +00:00
dylan_DPC
7db3324340 remove unwanted tests and a reference to it in comments 2018-07-21 11:42:44 +05:30
Alex Crichton
d77defcca1 Update stdsimd to undo an accidental stabilization
Closes #52403
2018-07-20 22:34:09 -07:00
bors
f8f6e7c04d Auto merge of #52536 - alexcrichton:attr-spans, r=nikomatsakis
proc_macro: Preserve spans of attributes on functions

This commit updates the tokenization of items which are subsequently passed to
`proc_macro` to ensure that span information is preserved on attributes as much
as possible. Previously this area of the code suffered from #43081 where we
haven't actually implemented converting an attribute to to a token tree yet, but
a local fix was possible here.

Closes #47941
2018-07-21 04:19:15 +00:00
bors
bf7afee52a Auto merge of #52438 - ljedrz:rustc_vec_capacity, r=eddyb
Calculate Vec capacities in librustc

Calculate the required capacity of a few vectors in rustc based on the number of elements they are populated with.
2018-07-21 00:55:46 +00:00
Vadim Petrochenkov
a18be44d63 Avoid using #[macro_export] for documenting builtin macros 2018-07-21 02:49:34 +03:00
bors
ee8d23d544 Auto merge of #52574 - kennytm:rollup, r=kennytm
Rollup of 7 pull requests

Successful merges:

 - #52502 (fix unsafety: don't call ptr_rotate for ZST)
 - #52505 (rustc: Remove a workaround in ThinLTO fixed upstream)
 - #52526 (Enable run-pass/sepcomp-lib-lto.rs on Android)
 - #52527 (Remove duplicate E0396 tests)
 - #52539 (rustc: Fix two custom attributes with custom derive)
 - #52540 (Fix docker/run.sh script when run locally)
 - #52573 (Cleanups)

Failed merges:

r? @ghost
2018-07-20 22:52:11 +00:00
Esteban Küber
8b59fbc951 fix grep test looking for newline 2018-07-20 15:37:49 -07:00
Oliver Schneider
d3c1e2fb7c Clippy opts out of in_external_macro 2018-07-20 22:50:32 +02:00
Oliver Schneider
b6e0547680 Allow individual lints to opt into being reported in external macros 2018-07-20 22:45:52 +02:00
kennytm
7bf3578a39
Rollup merge of #52573 - oli-obk:cleanups, r=RalfJung
Cleanups

r? @RalfJung
2018-07-21 04:08:12 +08:00
kennytm
a9a4f06254
Rollup merge of #52540 - alexcrichton:tweak-script, r=kennytm
Fix docker/run.sh script when run locally

Switch a `mkdir $foo` to `mkdir -p $foo` to handle the case that this script is
being run locally and has previously executed.
2018-07-21 04:08:11 +08:00
kennytm
863ed13c6c
Rollup merge of #52539 - alexcrichton:two-attrs, r=petrochenkov
rustc: Fix two custom attributes with custom derive

This commit fixes an issue where multiple custom attributes could not be fed
into a custom derive in some situations with the `use_extern_macros` feature
enabled. The problem was that the macro expander didn't consider that it was
making progress when we were deducing that attributes should be lumped in with
custom derive invocations.

The fix applied here was to track in the expander if our attribute is changing
(getting stashed away elsewhere and replaced with a new invocation). If it is
swapped then it's considered progress, otherwise behavior should remain the
same.

Closes #52525
2018-07-21 04:08:10 +08:00
kennytm
63da8122fb
Rollup merge of #52527 - ljedrz:cleanup_13973, r=oli-obk
Remove duplicate E0396 tests

Resolves FIXME #13973 (erroneously marked as #13972). A test for E0396 already exists in `test/ui/const-deref-ptr.rs`.
2018-07-21 04:08:09 +08:00
kennytm
1ed1b13090
Rollup merge of #52526 - ljedrz:cleanup_18800, r=alexcrichton
Enable run-pass/sepcomp-lib-lto.rs on Android

#18800 is fixed, so it should be safe to restore this test.
2018-07-21 04:08:07 +08:00
kennytm
9a273a3d66
Rollup merge of #52505 - alexcrichton:remove-thinlto-hack, r=nikomatsakis
rustc: Remove a workaround in ThinLTO fixed upstream

This commit removes a hack in our ThinLTO passes which removes available
externally functions manually. The [upstream bug][1] has long since been fixed,
so we should be able to rely on LLVM natively for this now!

[1]: https://bugs.llvm.org/show_bug.cgi?id=35736
2018-07-21 04:08:06 +08:00
kennytm
c74ff6cbd4
Rollup merge of #52502 - RalfJung:rotate, r=scottmcm
fix unsafety: don't call ptr_rotate for ZST

`rotate::ptr_rotate` has a comment saying
```
/// # Safety
///
/// The specified range must be valid for reading and writing.
/// The type `T` must have non-zero size.
```
So we better make sure we don't call it on ZST...

Cc @scottmcm (author of https://github.com/rust-lang/rust/pull/41670)
2018-07-21 04:08:05 +08:00
ljedrz
e3d14c4c56 Refactor a few push loops to iterators in librustc 2018-07-20 21:57:12 +02:00
Matthew Jasper
a06b2433fc Update tests for new NLL mutability errors 2018-07-20 20:01:15 +01:00
Matthew Jasper
13b5f69848 Improve NLL mutability errors
* Better explain why the place is immutable
* Distinguish &T and *const T
* Use better spans when a mutable borrow is for a closure capture
2018-07-20 20:01:11 +01:00
Matthew Jasper
db568e426a Move mutability error reporting to its own file 2018-07-20 20:01:11 +01:00
Matthew Jasper
c3dbdfee06 MIR changes to improve NLL cannot mutate errors
Alway use unique instead of mutable borrows immutable upvars.
Mark variables that are references for a match guard
2018-07-20 20:01:11 +01:00
Manish Goregaokar
d63e9257b9 Update clippy 2018-07-20 20:58:06 +02:00
QuietMisdreavus
e3bc713e2e compiletest: don't overwrite failure-status if it was previously set 2018-07-20 13:25:44 -05:00
Esteban Küber
9112e1a4cd fix rebase 2018-07-20 11:04:23 -07:00
bors
878dd0b5e1 Auto merge of #52354 - QuietMisdreavus:rustdoc-lints, r=GuillaumeGomez
stabilize lint handling in rustdoc

When https://github.com/rust-lang/rust/pull/51732 added CLI flags to manipulate lints in rustdoc, they were added as unstable flags. This made sense as they were new additions, but since they mirrored the flags that rustc has, it's worth considering them to not need an unstable period.

Stabilizing them also provides the opportunity for a critical fix: allowing Cargo to pass `--cap-lints allow` when documenting dependencies, the same as when it compiles them.

r? @rust-lang/rustdoc
2018-07-20 18:02:05 +00:00
Oliver Schneider
297ad72f12
Add trailing newline 2018-07-20 19:55:16 +02:00
Oliver Schneider
92fad0fa9e Add test 2018-07-20 19:35:08 +02:00
Oliver Schneider
7064f69c43 Abort instead of UB if promotion fails 2018-07-20 19:00:48 +02:00
Oliver Schneider
c7d39e0c51 Remove unused method 2018-07-20 18:43:25 +02:00
Esteban Küber
70e7e7d409 Fix new test 2018-07-20 09:17:55 -07:00
Esteban Küber
e1ef8ba142 Reword when _ couldn't be inferred 2018-07-20 09:17:18 -07:00
Esteban Küber
052159be53 fix incorrect position of chars in fmt str 2018-07-20 09:15:22 -07:00
Oliver Schneider
7cab813ad9 Only methods are fn-like, not other associated items 2018-07-20 17:19:58 +02:00
QuietMisdreavus
d3569d2da8 add failure-status to rustdoc doctest ui test 2018-07-20 10:13:38 -05:00
QuietMisdreavus
d965371d86 normalize test output so it can be run from repo root 2018-07-20 10:13:38 -05:00
QuietMisdreavus
ffbd2b931e update stdout file with test path normalization 2018-07-20 10:13:38 -05:00
QuietMisdreavus
41e7ac16c4 report doctest compile failures correctly 2018-07-20 10:13:38 -05:00
QuietMisdreavus
33654195a1 add ui test for failing doctest 2018-07-20 10:13:38 -05:00
QuietMisdreavus
d17a378b16 rustdoc: set panic output before starting compiler thread pool 2018-07-20 10:13:37 -05:00
Oliver Schneider
e93635325b Properly scope label resolution 2018-07-20 16:18:22 +02:00