Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 19 pull requests #57309

Closed
wants to merge 77 commits into from

Conversation

Mark-Simulacrum
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

o01eg and others added 30 commits December 24, 2018 18:52
Fixes cases with custom libdir when it consists of two or more parts.
This commit extends existing logic for checking whether a closure that
is `FnOnce` and therefore moves variables that it captures from the
environment has already been invoked when being invoked again.

Now, this logic will also check whether the closure is being moved after
previously being moved or invoked and add an appropriate note.
The types are no longer used with the change to stacked borrows for
validation.
Those tests are directly taken from the comments on the bug reports.
When resolving Fn traits, the compiler failed to take into account
overloaded implementations.  To resolve this, we inform the trait dispatch
code that the arguments will becoming as a tuple of correct arity.
This allows to verify that we handle
different types as return types,
and that we call the expected functions.
This copies and adjusts the existing coherence tests to ensure that
they continue to work using the new implementation.
Implement compile tests as variants of existing tests
There are three problems with the nolink-with-link-args test:

* The test fails when using MSVC. It's caused by the `linker-flavor=ld` flag which was added in rust-lang#46291.
* In its comment, this test tests that "link_args are indeed passed when nolink is specified", but the `nolink` attribute has been removed [a long time ago](rust-lang#12826).
* Pattern has a small typo.

At first I was going to completely remove this test, but there is [a closed pull request for that](rust-lang#21090).

So:

* rename the file as suggested in the closed PR
* adjust the comment
* fix typo in the pattern
* add `ignore-msvc`.
weiznich and others added 20 commits January 3, 2019 13:25
Allow to dispatch fn traits depending on number of parameters

Hello,

By following @eddyb's advise on issue rust-lang#45510, I managed to have the snippets of code in rust-lang#45510 and rust-lang#18952 passing without breaking older diagnostics.

EDIT: the codegen tests breakage I experienced is due to the poor quality of my laptop.

If any kind reviewer has any advice, you are very welcome.
…nikomatsakis

Implement the Re-rebalance coherence RFC

This is the first time I touch anything in the compiler so just tell me if I got something wrong.

Big thanks to @sgrif for the pointers where to look for those things.
cc rust-lang#55437
make `panictry!` private to libsyntax

This commit completely removes usage of the `panictry!` macro from
outside libsyntax. The macro causes parse errors to be fatal, so using
it in libsyntax_ext caused parse failures *within* a syntax extension to
be fatal, which is probably not intended.

Furthermore, this commit adds spans to diagnostics emitted by empty
extensions if they were missing, à la rust-lang#56491.
NLL: Add closure cannot be moved note.

Fixes rust-lang#57098.

This PR extends existing logic for checking whether a closure that
is `FnOnce` and therefore moves variables that it captures from the
environment has already been invoked when being invoked again.

Now, this logic will also check whether the closure is being moved after
previously being moved or invoked and add an appropriate note.

r? @pnkfelix
Search codegen backends based on target libdir instead of sysroot

Fixes rust-lang#57014

Fixes cases with custom libdir when it consists of two or more parts.
…excrichton

panic when calling MaybeUninhabited::into_inner on uninhabited type

I do this by adding an internal-only intrinsic `panic_if_uninhabited`. I have no idea what I am doing here, just mindlessly copying code around, so please review carefully!
…=alexcrichton

Rename and fix nolink-with-link-args test

There are three problems with the nolink-with-link-args test:

* The test fails when using MSVC. It's caused by the `linker-flavor=ld` flag which was added in rust-lang#46291.
* In its comment, this test tests that "link_args are indeed passed when nolink is specified", but the `nolink` attribute has been removed [a long time ago](rust-lang#12826).
* Pattern has a small typo.

At first I was going to completely remove this test, but there is [a closed pull request for that](rust-lang#21090).

So:

* rename the file as suggested in the closed PR
* adjust the comment
* fix typo in the pattern
* add `ignore-msvc`.

r? @alexcrichton
Fix backtraces for inlined functions on Windows

Fixes an regression introduced in rust-lang#50526

r? @alexcrichton
…=KodrAus

Fix broken links to second edition TRPL.

Fixes rust-lang#57104.

Remove `second-edition/` from TRPL hyperlinks.
Update reference of rlibc crate to compiler-builtins crate

None
src/jemalloc is gone, remove its mention from COPYRIGHT

The `src/jemalloc` submodule was removed in 61e8944 / rust-lang#55238.
Make sure feature gate errors are recoverable (take 2)

Continuation of rust-lang@15cefe4.
Turns out I missed the most important part - the main feature gate checking pass.
…matsakis

Update the stdsimd submodule

Add a new cmpxchg16b intrinsics for x86_64 and some corrections for ARM/AArch64
…s, r=alexcrichton

Update compiler_builtins 0.1.2 -> 0.1.3

r? @alexcrichton
…atsakis

bootstrap: Link LLVM as a dylib with ThinLTO (take 2)

When building a distributed compiler on Linux where we use ThinLTO to
create the LLVM shared object this commit switches the compiler to
dynamically linking that LLVM artifact instead of statically linking to
LLVM. The primary goal here is to reduce CI compile times, avoiding two+
ThinLTO builds of all of LLVM. By linking dynamically to LLVM we'll
reuse the one ThinLTO step done by LLVM's build itself.

Lots of discussion about this change can be found [here] and down. A
perf run will show whether this is worth it or not!

[here]: rust-lang#53245 (comment)

---

This PR previously landed in rust-lang#56944, caused rust-lang#57111, and was reverted in rust-lang#57116. I've added one more commit here which should fix the breakage that we saw.
Fix 'be be' constructs

I noticed a duplicated "be" somewhere in the code. A search for it
manifested a couple more locations with the same problem. This change
removes one of the "be"s.
@Mark-Simulacrum
Copy link
Member Author

@bors r+ p=5

@bors
Copy link
Contributor

bors commented Jan 3, 2019

📌 Commit 6adc37e has been approved by Mark-Simulacrum

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 3, 2019
@pietroalbini
Copy link
Member

First rollup of the year 😿

@bors
Copy link
Contributor

bors commented Jan 3, 2019

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout rollup (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self rollup --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging src/test/ui/coherence/coherence_local_err_tuple.old.stderr
Auto-merging src/test/ui/coherence/coherence_local_err_struct.old.stderr
Auto-merging src/test/ui/coherence/coherence_inherent_cc.old.stderr
Auto-merging src/test/ui/coherence/coherence_inherent.old.stderr
Auto-merging src/test/ui/coherence/coherence_copy_like_err_tuple.old.stderr
Auto-merging src/test/ui/coherence/coherence_copy_like_err_struct.old.stderr
Auto-merging src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.old.stderr
Auto-merging src/test/ui/coherence/coherence-vec-local.old.stderr
Auto-merging src/test/ui/coherence/coherence-vec-local-2.old.stderr
Auto-merging src/test/ui/coherence/coherence-tuple-conflict.old.stderr
Auto-merging src/test/ui/coherence/coherence-projection-conflict.old.stderr
Auto-merging src/test/ui/coherence/coherence-projection-conflict-ty-param.old.stderr
Auto-merging src/test/ui/coherence/coherence-projection-conflict-orphan.old.stderr
Auto-merging src/test/ui/coherence/coherence-pair-covered-uncovered.old.stderr
Auto-merging src/test/ui/coherence/coherence-pair-covered-uncovered-1.old.stderr
Auto-merging src/test/ui/coherence/coherence-overlapping-pairs.old.stderr
Auto-merging src/test/ui/coherence/coherence-overlap-upstream.old.stderr
Auto-merging src/test/ui/coherence/coherence-overlap-upstream-inherent.old.stderr
Auto-merging src/test/ui/coherence/coherence-overlap-messages.old.stderr
Auto-merging src/test/ui/coherence/coherence-overlap-issue-23516.old.stderr
Auto-merging src/test/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr
Auto-merging src/test/ui/coherence/coherence-overlap-downstream.old.stderr
Auto-merging src/test/ui/coherence/coherence-overlap-downstream-inherent.old.stderr
Auto-merging src/test/ui/coherence/coherence-overlap-all-t-and-tuple.old.stderr
Auto-merging src/test/ui/coherence/coherence-orphan.old.stderr
Auto-merging src/test/ui/coherence/coherence-no-direct-lifetime-dispatch.old.stderr
Auto-merging src/test/ui/coherence/coherence-negative-impls-safe.old.stderr
Auto-merging src/test/ui/coherence/coherence-lone-type-parameter.old.stderr
Auto-merging src/test/ui/coherence/coherence-inherited-assoc-ty-cycle-err.old.stderr
Auto-merging src/test/ui/coherence/coherence-impls-sized.old.stderr
Auto-merging src/test/ui/coherence/coherence-impls-send.old.stderr
Auto-merging src/test/ui/coherence/coherence-impls-copy.old.stderr
Auto-merging src/test/ui/coherence/coherence-impl-trait-for-trait.old.stderr
Auto-merging src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.old.stderr
Auto-merging src/test/ui/coherence/coherence-error-suppression.old.stderr
Auto-merging src/test/ui/coherence/coherence-default-trait-impl.old.stderr
Auto-merging src/test/ui/coherence/coherence-cross-crate-conflict.old.stderr
Auto-merging src/test/ui/coherence/coherence-conflicting-negative-trait-impl.old.stderr
Auto-merging src/test/ui/coherence/coherence-blanket-conflicts-with-specific.old.stderr
Auto-merging src/test/ui/coherence/coherence-blanket-conflicts-with-specific-trait.old.stderr
Auto-merging src/test/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.old.stderr
Auto-merging src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.old.stderr
Auto-merging src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.old.stderr
Auto-merging src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.old.stderr
Auto-merging src/test/ui/coherence/coherence-bigint-param.old.stderr
Auto-merging src/test/ui/coherence/coherence-all-remote.old.stderr
CONFLICT (modify/delete): src/test/run-pass/coherence/coherence-subtyping.rs deleted in HEAD and modified in heads/homu-tmp. Version heads/homu-tmp of src/test/run-pass/coherence/coherence-subtyping.rs left in tree.
Removing src/test/run-make-fulldeps/llvm-pass/plugin.rs
Removing src/test/run-make-fulldeps/llvm-pass/main.rs
Removing src/test/run-make-fulldeps/llvm-pass/llvm-module-pass.so.cc
Removing src/test/run-make-fulldeps/llvm-pass/llvm-function-pass.so.cc
Removing src/test/run-make-fulldeps/llvm-pass/Makefile
Removing src/test/compile-fail/nolink-with-link-args.rs
Auto-merging src/librustc_mir/shim.rs
Auto-merging src/librustc_mir/hair/cx/mod.rs
Auto-merging src/librustc_mir/build/misc.rs
Auto-merging src/librustc_mir/borrow_check/nll/type_check/mod.rs
Auto-merging src/librustc_mir/borrow_check/error_reporting.rs
Auto-merging src/librustc/util/ppaux.rs
Auto-merging src/librustc/ty/sty.rs
Auto-merging src/librustc/ty/structural_impls.rs
Auto-merging src/librustc/ty/error.rs
Auto-merging src/librustc/traits/project.rs
Auto-merging src/librustc/traits/error_reporting.rs
Auto-merging src/librustc/traits/coherence.rs
Automatic merge failed; fix conflicts and then commit the result.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 3, 2019
@bors
Copy link
Contributor

bors commented Jan 3, 2019

☔ The latest upstream changes (presumably #55517) made this pull request unmergeable. Please resolve the merge conflicts.

@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.