Commit Graph

96716 Commits

Author SHA1 Message Date
Matthew Jasper
0fb9295e12 Add another test for const parameter (non) hygiene. 2019-07-29 20:04:07 +01:00
Matthew Jasper
8876b3b9b0 Resolve const parameters with modern hygiene
Declarations were already modernized, resulting in cases where a macro
couldn't resolve it's own identifier.
2019-07-28 13:34:03 +01:00
Matthew Jasper
3dca17e62d Disallow duplicate lifetime parameters with legacy hygiene
They were resolved with modern hygiene, making this just a strange way
to shadow lifetimes.
2019-07-28 13:33:51 +01:00
bors
9a239ef4de Auto merge of #63057 - Centril:rollup-z3a3c6v, r=Centril
Rollup of 8 pull requests

Successful merges:

 - #61207 (Allow lifetime elision in `Pin<&(mut) Self>`)
 - #62074 (squash of all commits for nth_back on ChunksMut)
 - #62771 (Break dependencies between `syntax_ext` and other crates)
 - #62883 (Refactoring use common code between option, result and accum)
 - #62949 (Re-enable assertions in PPC dist builder)
 - #62996 (tidy: Add a check for inline unit tests)
 - #63038 (Make more informative error on outer attribute after inner)
 - #63050 (ci: download awscli from our mirror)

Failed merges:

r? @ghost
2019-07-28 01:03:16 +00:00
Mazdak Farrokhzad
34c0f4698b
Rollup merge of #63050 - pietroalbini:vendor-awscli, r=Mark-Simulacrum
ci: download awscli from our mirror

This fixes multiple network issues we had when downloading awscli from PyPI on Azure Pipelines by vendoring awscli itself and its dependencies in our S3 bucket. Instructions on how to update the cache are present at the top of `src/ci/install-awscli.sh`.

r? @alexcrichton or @Mark-Simulacrum
fixes #62967
2019-07-28 03:01:55 +02:00
Mazdak Farrokhzad
5c7008540d
Rollup merge of #63038 - eupn:outer-attribute-diag, r=estebank
Make more informative error on outer attribute after inner

Fixes #61218.

?r @estebank
2019-07-28 03:01:53 +02:00
Mazdak Farrokhzad
c3c03098d8
Rollup merge of #62996 - petrochenkov:outest, r=Mark-Simulacrum
tidy: Add a check for inline unit tests

As described in https://github.com/rust-lang/rust/issues/61097.

There's a large whitelist right now, because in many crates the tests are not outlined yet.
~This PR only outlines tests in one crate (`rustc_lexer`) as an example.~

r? @Mark-Simulacrum
2019-07-28 03:01:51 +02:00
Mazdak Farrokhzad
fb6fdd4682
Rollup merge of #62949 - mati865:patch-1, r=alexcrichton
Re-enable assertions in PPC dist builder

Fixes https://github.com/rust-lang/rust/issues/36150

Log of successful build:
https://dev.azure.com/mati865/6518b167-4cf6-4587-b3d1-8e137f2fb2e4/_apis/build/builds/23/logs/825
2019-07-28 03:01:50 +02:00
Mazdak Farrokhzad
8f9b8c19de
Rollup merge of #62883 - Stargateur:refactoring-adapters, r=scottmcm
Refactoring use common code between option, result and accum

`Option` and `Result` have almost exactly the same code that in `accum.rs` that implement `Sum` and `Product`. This PR just move some code to use the same code for all of them. I believe is better to not implement this `Iterator` feature twice.

I'm not very familiar with pub visibility hope I didn't make then public. However, maybe these adapters could be useful and we could think to make then pub.

#59605
#11084

r? @pnkfelix
2019-07-28 03:01:48 +02:00
Mazdak Farrokhzad
ca0cd73f49
Rollup merge of #62771 - petrochenkov:depext, r=eddyb
Break dependencies between `syntax_ext` and other crates

Move `source_util` macros into `syntax_ext`.
Move other early code generation facilities like standard library injection into `syntax_ext`.

The only crate that depends on `syntax_ext` now is `rustc_interface` which is one of the "final" crates that depend on everything.

Minor: Cleanup dependencies of `rustc_driver`, many of them are no longer used after introduction of `rustc_interface`.

r? @eddyb
2019-07-28 03:01:46 +02:00
Mazdak Farrokhzad
cb8b491a65
Rollup merge of #62074 - wizAmit:feature/mut_chunks_nth_back, r=scottmcm
squash of all commits for nth_back on ChunksMut

wip nth_back for chunks_mut

working chunksmut

fixed nth_back for chunksmut

Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>

r? @timvermeulen
r? @scottmcm
2019-07-28 03:01:44 +02:00
Mazdak Farrokhzad
ece18b750d
Rollup merge of #61207 - taiki-e:arbitrary_self_types-lifetime-elision-2, r=Centril
Allow lifetime elision in `Pin<&(mut) Self>`

This PR changes `self: &(mut) S` elision rules to instead visit the type of `self` and look for `&(mut) S` (where `is_self_ty(S)`) within it

Replaces #60944

Closes #52675

r? @eddyb
cc @cramertj @Centril @withoutboats @scottmcm
2019-07-28 03:01:42 +02:00
Pietro Albini
75dfdcb065
ci: download awscli from our mirror
This fixes multiple network issues we had when downloading awscli from
PyPI on Azure Pipelines by vendoring awscli itself and its dependencies
in our S3 bucket. Instructions on how to update the cache are present at
the top of src/ci/install-awscli.sh
2019-07-27 22:19:00 +02:00
bors
c798dffac9 Auto merge of #63029 - petrochenkov:rpass, r=Centril
Move run-pass tests to ui

This is the second attempt at doing https://github.com/rust-lang/rust/pull/53994 (which was previously reverted in https://github.com/rust-lang/rust/pull/54530).

The issue with inability to run the test suite in a faster way (https://github.com/rust-lang/rust/issues/54047) that motivated the revert was recently addressed by https://github.com/rust-lang/rust/pull/61755.

r? @Centril
2019-07-27 19:27:36 +00:00
Vadim Petrochenkov
aecaa03cf6 tidy: Add a check for inline unit tests and benchmarks 2019-07-27 21:26:41 +03:00
Vadim Petrochenkov
f1c8673ae7 Fix issues with git converting CRLF to CR
UI tests now run on asmjs-unknown-emscripten, ignore tests with inline assembly which is not supported on emscripten targets
2019-07-27 19:22:45 +03:00
Vadim Petrochenkov
42a317a1cd Remove run-pass test suites 2019-07-27 18:56:17 +03:00
Vadim Petrochenkov
5486cc69bd tests: Move run-pass tests with naming conflicts to ui 2019-07-27 18:56:17 +03:00
Vadim Petrochenkov
9be35f82c1 tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
Vadim Petrochenkov
ca9faa52f5 tests: Add missing run-pass annotations 2019-07-27 18:56:13 +03:00
bors
a5e7bb3e2b Auto merge of #63043 - Centril:rollup-f4baee4, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #62423 (Fix cycle error with existential types)
 - #62979 (Cleanup save-analysis JsonDumper)
 - #62982 (Don't access a static just for its size and alignment)
 - #63013 (add `repr(transparent)` to `IoSliceMut` where missing)
 - #63014 (Stop bare trait lint applying to macro call sites)
 - #63036 (Add lib section to rustc_lexer's Cargo.toml)

Failed merges:

r? @ghost
2019-07-27 15:41:45 +00:00
Mazdak Farrokhzad
51769b3012
Rollup merge of #63036 - topecongiro:add-lib-section, r=matklad
Add lib section to rustc_lexer's Cargo.toml

This is required to fix the rustc-ap-syntax build error in the recent version. The error could also be fixed on the [rustc-auto-publish](https://github.com/alexcrichton/rustc-auto-publish) side by manually adding `[lib]` section if one does not exist. The latter approach, however, may have a surprising side effect, so I am opting for a simpler solution for now.

r? @alexcrichton
2019-07-27 17:40:52 +02:00
Mazdak Farrokhzad
513ab54360
Rollup merge of #63014 - davidtwco:rustfix-incorrect-dyn-suggestion, r=estebank
Stop bare trait lint applying to macro call sites

Fixes #61963. Apologies for the delay with in fixing this. If anyone has a better idea how to detect this macro call site case, I'd be happy to fix this in a more robust, less hacky way.

r? @estebank
2019-07-27 17:40:51 +02:00
Mazdak Farrokhzad
4ad743c022
Rollup merge of #63013 - nivkner:ffi-safe-slice, r=sfackler
add `repr(transparent)` to `IoSliceMut` where missing

tried using `IoSliceMut` in FFI, got `improper_ctypes` warning.

according to the docs: `IoSliceMut` is  "guaranteed to be ABI compatible with the `iovec` type" so it should be usable in FFI.
`IoSlice` is also `repr(transparent)` for every platform where these types contain `iovec`-like types.
vxworks also has `IoSliceMut` as transparent so its not even consistently one or the other.

no comment about this next to the types or in the PR that introduced the types, so assuming this was just missed.

r? @sfackler
2019-07-27 17:40:49 +02:00
Mazdak Farrokhzad
b25d74fa49
Rollup merge of #62982 - oli-obk:static_cycle, r=RalfJung
Don't access a static just for its size and alignment

cc @RalfJung

fixes #62189
2019-07-27 17:40:48 +02:00
Mazdak Farrokhzad
a13f1f890b
Rollup merge of #62979 - Mark-Simulacrum:json-dumper-pretty, r=Xanewok
Cleanup save-analysis JsonDumper
2019-07-27 17:40:46 +02:00
Mazdak Farrokhzad
4b8031cf2c
Rollup merge of #62423 - Aaron1011:fix/existential-cycle, r=oli-obk
Fix cycle error with existential types

Fixes #61863

We now allow uses of `existential type`'s that aren't defining uses - that is, uses which don't constrain the underlying concrete type.

To make this work correctly, we also modify `eq_opaque_type_and_type` to not try to apply additional constraints to an opaque type. If we have code like this:

```rust
existential type Foo;
fn foo1() -> Foo { ... }
fn foo2() -> Foo { foo1() }
```

then `foo2` doesn't end up constraining `Foo`, which means that `foo2` will end up using the type `Foo` internally - that is, an actual `TyKind::Opaque`. We don't want to equate this to the underlying concrete type - we just need to enforce the basic equality constraint between the two types (here, the return type of `foo1` and the return type of `foo2`)
2019-07-27 17:40:45 +02:00
Vadim Petrochenkov
6a4def0c9d tidy: Fix a regression in #[test] detection in libcore
`contents` is the whole file rather than a single line.
2019-07-27 17:26:55 +03:00
Vadim Petrochenkov
c0df742de8 tidy: libcoretest.rs -> unit_tests.rs 2019-07-27 17:26:55 +03:00
topecongiro
98f29f5e38
Add comment 2019-07-27 22:10:09 +09:00
Evgenii P
693be441f4 Fix ui/parser/attr test 2019-07-27 19:37:03 +07:00
Evgenii P
2787cb23f0 Fix failing UI tests 2019-07-27 18:24:48 +07:00
Evgenii P
fc9bfd68b5 Treat doc comments separately 2019-07-27 18:24:17 +07:00
Vadim Petrochenkov
b5a0e6ea80 syntax_ext: proc_macro_decls -> proc_macro_harness
Few other minor renamings for consistency.
Remove one unused dependency from `rustc_passes`.
Fix libsyntax tests.
Fix rebase.
2019-07-27 14:16:16 +03:00
Vadim Petrochenkov
4d535bdf59 Move standard library injection into libsyntax_ext 2019-07-27 13:56:54 +03:00
Vadim Petrochenkov
f6eda99379 Move test harness generation into libsyntax_ext 2019-07-27 13:56:54 +03:00
Vadim Petrochenkov
4ad0daa220 Move proc macro server into libsyntax 2019-07-27 13:55:25 +03:00
Vadim Petrochenkov
3eeec1c5d2 Break dependencies between syntax_ext and some other crates
Move `source_uitil` macros into `syntax_ext`
Cleanup dependencies of `rustc_driver`
2019-07-27 13:52:37 +03:00
Evgenii P
8b3f28cf0f Make more informative error on outer attr after inner 2019-07-27 16:45:45 +07:00
bors
0e9b465d72 Auto merge of #62748 - luca-barbieri:optimize-refcell-borrow, r=RalfJung
Optimize RefCell read borrowing

Instead of doing two comparisons we can do only one with a bit of cleverness.

LLVM currently can't do this optimization itself on x86-64.
2019-07-27 09:32:44 +00:00
topecongiro
13b41000ea
Add lib section to rustc_lexer's Cargo.toml 2019-07-27 17:21:42 +09:00
Taiki Endo
05f67a297a arbitrary_self_types lifetime elision: --bless --compare-mode=nll 2019-07-27 12:35:05 +09:00
Taiki Endo
34f59eb9c5 Fix typo 2019-07-27 12:28:07 +09:00
Taiki Endo
1e2905269b Add tests for self: (&)AssocType 2019-07-27 12:28:07 +09:00
Taiki Endo
8507b8e42f Add test for multiple ref-self 2019-07-27 12:28:06 +09:00
Taiki Endo
aab9edc68a Minor clean up 2019-07-27 12:28:06 +09:00
Taiki Endo
c1f22c018e Add main functions and check-pass annotations 2019-07-27 12:28:05 +09:00
Taiki Endo
258498af58 Update src/test/ui/self/elision/README.md
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-07-27 12:28:05 +09:00
Niko Matsakis
3096568904 add a bevy of new test cases 2019-07-27 12:28:04 +09:00
Taiki Endo
2f64404ba3 Use Set1<Region> instead of Option<Region> 2019-07-27 12:28:04 +09:00