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

Beta 20170928 #44908

Merged
merged 16 commits into from
Oct 7, 2017
Merged

Beta 20170928 #44908

merged 16 commits into from
Oct 7, 2017

Conversation

nikomatsakis
Copy link
Contributor

@nikomatsakis nikomatsakis commented Sep 28, 2017

Backports of:

dtolnay and others added 8 commits September 28, 2017 14:54
This is a partial revert of rust-lang#42588. There is a usability concern
reported in rust-lang#44294 that was not considered in the discussion of the PR,
so I would like to back this out of 1.21. As is, I think users would
have a worse and more confusing experience with this lint enabled by
default. We can re-enabled once there are better diagnostics or the case
in rust-lang#44294 does not trigger the lint.
This boolean field on the error `Handler` is toggled to silence
warnings when `-A warnings` is passed. (This is actually a separate
mechanism from the global lint level—whether there's some redundancy
to be factored away here is an important question, but not one we
concern ourselves with in this commit.)  But the same rationale
applies for `--cap-lints allow`. In particular, this makes the "soft"
feature-gate warning introduced in 8492ad2 (which is not a lint, but
just calls `struct_span_warn`) not pollute the builds of dependent
crates.

Thanks to @kennytm for pointing out the potential of
`can_emit_warnings` for this purpose.

Resolves rust-lang#44213.
Brings in a few fixes for wasm/asmjs
After a projection was processed, its derived subobligations no longer
need any processing when encountered, and can be removed. This improves
the status of rust-lang#43787.

This is actually complementary to rust-lang#43938 - that PR fixes selection
caching (and @remram44's example, which "accidentally" worked because of
the buggy projection caching) while this PR fixes projection caching
Keep **all** the obligations for every projection is wasteful of
memory and compilation time. We only really care about those
subobligations that may inform the result of the projection (i.e., may
help to resolve any inference variables that appear within).
Therefore, we can clear the subobligations from the cache that don't
potentially affect the result of the projection. On every cache hit,
we also take the opportunity to check if the type variables have been
resolved *yet* and, if so, clear out the pending obligations.

Fixes rust-lang#43613
@rust-highfive
Copy link
Collaborator

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@nikomatsakis
Copy link
Contributor Author

r? @alexcrichton

@rust-highfive rust-highfive assigned alexcrichton and unassigned eddyb Sep 28, 2017
@alexcrichton
Copy link
Member

This may or may not fail due to weird build errors with the libc submodule. If it doesn't, then yay! If it does then this may need to backport #44765. (I'm not sure if this was fast-forwarded enough to require that). Let's wait and see!

As one final point can you update the versoin in src/bootstrap/channel.rs? That way we'll publish a new beta as soon as this merges.

Other than that, r=me

@bors: p=1

@nikomatsakis
Copy link
Contributor Author

@alexcrichton is that last commit what you had in mind?

@nikomatsakis
Copy link
Contributor Author

if not, edit it yourself :)

@alexcrichton
Copy link
Member

@bors: r+

Indeed!

@bors
Copy link
Contributor

bors commented Sep 28, 2017

📌 Commit 41d7051 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Sep 28, 2017

⌛ Testing commit 41d7051 with merge d158897...

bors added a commit that referenced this pull request Sep 28, 2017
Beta 20170928

Backports of:

- Allow unused extern crate again #44825
- macros: fix bug in collecting trait and impl items with derives. #44757
-  `--cap-lints allow` switches off `can_emit_warnings` #44627
-  Update the libc submodule #44116
- limit and clear cache obligations opportunistically #44269
- clear out projection subobligations after they are processed #43999
@bors
Copy link
Contributor

bors commented Sep 28, 2017

💔 Test failed - status-travis

@kennytm
Copy link
Member

kennytm commented Sep 29, 2017

Legit.

[00:40:45] ---- [run-pass] run-pass/issue-43132.rs stdout ----
[00:40:45] 	
[00:40:45] error: compilation failed!
[00:40:45] status: exit code: 101
[00:40:45] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/run-pass/issue-43132.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass" "--target=x86_64-unknown-linux-gnu" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/issue-43132.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/issue-43132.stage2-x86_64-unknown-linux-gnu.run-pass.libaux"
[00:40:45] stdout:
[00:40:45] ------------------------------------------
[00:40:45] 
[00:40:45] ------------------------------------------
[00:40:45] stderr:
[00:40:45] ------------------------------------------
[00:40:45] error: internal compiler error: /checkout/src/librustc_trans/context.rs:694: failed to get layout for `*mut MaybeDone<(Forward<(std::boxed::Box<Future<Error=u32>>,)>, [closure@/checkout/src/test/run-pass/issue-43132.rs:20:15: 20:21])>`: the type `MaybeDone<(Forward<(std::boxed::Box<Future<Error=u32>>,)>, [closure@/checkout/src/test/run-pass/issue-43132.rs:20:15: 20:21])>` has an unknown layout
[00:40:45] 
[00:40:45] note: the compiler unexpectedly panicked. this is a bug.
[00:40:45] 
[00:40:45] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:40:45] 
[00:40:45] note: rustc 1.21.0-dev (d158897d9 2017-09-28) running on x86_64-unknown-linux-gnu
[00:40:45] 
[00:40:45] thread 'rustc' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:490:8
[00:40:45] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:40:45] 
[00:40:45] 
[00:40:45] ------------------------------------------
[00:40:45] 
[00:40:45] thread '[run-pass] run-pass/issue-43132.rs' panicked at 'explicit panic', /checkout/src/tools/compiletest/src/runtest.rs:2435:8
[00:40:45] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:40:45] 
[00:40:45] 
[00:40:45] failures:
[00:40:45]     [run-pass] run-pass/issue-43132.rs
[00:40:45] 
[00:40:45] test result: FAILED. 2729 passed; 1 failed; 8 ignored; 0 measured; 0 filtered out

@shepmaster shepmaster added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 29, 2017
@arielb1
Copy link
Contributor

arielb1 commented Oct 5, 2017

Looks like #43132 somehow came back - this was supposed to be fixed by the trait-system PRs, so I guess a backport made them come back.

Incident

This is not good. The release is pretty soon, and I'm on vacation Sunday to Tuesday. Next time we have problems with backports like this, we should ping more people and earlier cc @rust-lang/infra (and the new triage group). I'll try to get a fix to our backport troubles over the weekend, but that's not something that should have happened.

arielb1 and others added 2 commits October 6, 2017 10:39
We want to retain obligations that *contain* inference variables, not
obligations that *don't contain* them, in order to fix rust-lang#43132. Because
of surrounding changes to inference, the ICE doesn't occur in its
original case, but I believe it could still be made to occur on master.

Maybe I should try to write a new test case? Certainly not right now
(I'm mainly trying to get us a beta that we can ship) but maybe before
we land this PR on nightly?

This seems to cause a 10% performance regression in my imprecise
attempt to benchmark item-body checking for rust-lang#43613, but it's better to
be slow and right than fast and wrong. If we want to recover that, I
think we can change the constrained-type-parameter code to actually
give a list of projections that are important for resolving inference
variables and filter everything else out.
@nikomatsakis
Copy link
Contributor Author

This now reverts #43543, which fixes (on beta) #38714.

@alexcrichton
Copy link
Member

@bors: r+ p=100

@bors
Copy link
Contributor

bors commented Oct 6, 2017

📌 Commit 2eabf4f has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Oct 6, 2017

⌛ Testing commit 2eabf4f with merge cc40fd3fea939b73490d1f81f5193d2353e48e40...

@bors
Copy link
Contributor

bors commented Oct 6, 2017

💔 Test failed - status-travis

@arielb1
Copy link
Contributor

arielb1 commented Oct 6, 2017

libc trouble on sparc:

Building stage2 std artifacts (x86_64-unknown-linux-gnu -> sparc64-unknown-linux-gnu)
[00:47:10]    Compiling core v0.0.0 (file:///checkout/src/libcore)
[00:47:10]    Compiling unwind v0.0.0 (file:///checkout/src/libunwind)
[00:47:10]    Compiling libc v0.0.0 (file:///checkout/src/rustc/libc_shim)
[00:47:10]    Compiling compiler_builtins v0.0.0 (file:///checkout/src/rustc/compiler_builtins_shim)
[00:47:10]    Compiling alloc_jemalloc v0.0.0 (file:///checkout/src/liballoc_jemalloc)
[00:47:28]    Compiling std v0.0.0 (file:///checkout/src/libstd)
[00:47:32]    Compiling rand v0.0.0 (file:///checkout/src/librand)
[00:47:32]    Compiling std_unicode v0.0.0 (file:///checkout/src/libstd_unicode)
[00:47:33]    Compiling alloc v0.0.0 (file:///checkout/src/liballoc)
[00:47:34] error[E0573]: expected type, found function `statfs64`
[00:47:34]    --> /checkout/src/rustc/libc_shim/../../liblibc/src/unix/notbsd/mod.rs:880:54
[00:47:34]     |
[00:47:34] 880 |     pub fn statfs64(path: *const ::c_char, buf: *mut statfs64) -> ::c_int;
[00:47:34]     |                                                      ^^^^^^^^ did you mean `stat64`?
[00:47:34] 
[00:47:34] error[E0573]: expected type, found function `statfs64`
[00:47:34]    --> /checkout/src/rustc/libc_shim/../../liblibc/src/unix/notbsd/mod.rs:882:45
[00:47:34]     |
[00:47:34] 882 |     pub fn fstatfs64(fd: ::c_int, buf: *mut statfs64) -> ::c_int;
[00:47:34]     |                                             ^^^^^^^^ did you mean `stat64`?
[00:47:34] 
[00:47:34] error[E0573]: expected type, found function `statvfs64`
[00:47:34]    --> /checkout/src/rustc/libc_shim/../../liblibc/src/unix/notbsd/mod.rs:883:55
[00:47:34]     |
[00:47:34] 883 |     pub fn statvfs64(path: *const ::c_char, buf: *mut statvfs64) -> ::c_int;
[00:47:34]     |                                                       ^^^^^^^^^ did you mean `statvfs`?
[00:47:34] 
[00:47:34] error[E0573]: expected type, found function `statvfs64`
[00:47:34]    --> /checkout/src/rustc/libc_shim/../../liblibc/src/unix/notbsd/mod.rs:884:46
[00:47:34]     |
[00:47:34] 884 |     pub fn fstatvfs64(fd: ::c_int, buf: *mut statvfs64) -> ::c_int;
[00:47:34]     |                                              ^^^^^^^^^ did you mean `statvfs`?
[00:47:34] 
[00:47:35] error: aborting due to 4 previous errors
[00:47:35] 
[00:47:35] error: Could not compile `libc`.

@alexcrichton
Copy link
Member

Working on it

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Oct 6, 2017

📌 Commit a32ac51 has been approved by alexcrichton

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Oct 6, 2017

📌 Commit 9042ebf has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Oct 6, 2017

⌛ Testing commit 9042ebf with merge 235b06f77a1df71ce90ee3d23c1d83bca77e1e5f...

@bors
Copy link
Contributor

bors commented Oct 7, 2017

💔 Test failed - status-travis

@kennytm
Copy link
Member

kennytm commented Oct 7, 2017

@bors retry

  • spurious musl error.

@bors
Copy link
Contributor

bors commented Oct 7, 2017

⌛ Testing commit 9042ebf with merge 6393327735f0826056b0990292e2b1cea24a5b9b...

@bors
Copy link
Contributor

bors commented Oct 7, 2017

💔 Test failed - status-travis

@kennytm
Copy link
Member

kennytm commented Oct 7, 2017

Failed to cross-compile stage2-std (x86_64-unknown-linux-gnu → x86_64-unknown-fuchsia), cannot link to libfdio.

[02:30:45] warning: redundant linker flag specified for library `magenta`
[02:30:45] 
[02:31:04] error: linking with `x86_64-unknown-fuchsia-clang` failed: exit code: 1
[02:31:04]   |
[02:31:04]   = note: "x86_64-unknown-fuchsia-clang" "-m64" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-fuchsia/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/std-9da33aa2df7af1bb.0.o" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/libstd-9da33aa2df7af1bb.so" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/std-9da33aa2df7af1bb.crate.metadata.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps/std-9da33aa2df7af1bb.crate.allocator.o" "-Wl,-O1" "-nodefaultlibs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-fuchsia/release/build/compiler_builtins-8eeea2bdf612d544/out" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-fuchsia/lib" "-l" "magenta" "-l" "backtrace" "-l" "mxio" "-l" "launchpad" "-Wl,-Bstatic" "-Wl,--whole-archive" "/tmp/rustc.pBTzTvOIJv3l/libpanic_unwind-4716ba3e04edbf85.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.pBTzTvOIJv3l/libunwind-aab18988303f572c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.pBTzTvOIJv3l/librand-940cafb5d34d049d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.pBTzTvOIJv3l/liballoc_system-71c60414f8c7a15d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.pBTzTvOIJv3l/liblibc-30b2f9f033a91c34.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.pBTzTvOIJv3l/liballoc-c05e268c627ead18.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.pBTzTvOIJv3l/libstd_unicode-0bc266a7a125aa29.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.pBTzTvOIJv3l/libcore-a2272f548d3624ea.rlib" "-Wl,--no-whole-archive" "/tmp/rustc.pBTzTvOIJv3l/libcompiler_builtins-d80fc08b6a143705.rlib" "-Wl,-Bdynamic" "-l" "unwind" "-l" "c" "-l" "fdio" "-shared" "-Wl,-rpath,$ORIGIN/../lib"
[02:31:04]   = note: /usr/local/bin/ld.lld: error: unable to find library -lfdio
[02:31:04]           clang-5.0: error: ld.lld command failed with exit code 1 (use -v to see invocation)
[02:31:04]           
[02:31:04] 
[02:31:04] error: aborting due to previous error
[02:31:04] 
[02:31:04] error: Could not compile `std`.

Do we need #44612?

I believe everything was renamed anyway, so beta is broken regardless
@alexcrichton
Copy link
Member

@bors: r+

Removed the fuchsia builder, I believe it's broken anyway on beta

@bors
Copy link
Contributor

bors commented Oct 7, 2017

📌 Commit a4923d9 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Oct 7, 2017

⌛ Testing commit a4923d9 with merge aa30011...

bors added a commit that referenced this pull request Oct 7, 2017
Beta 20170928

Backports of:

- Allow unused extern crate again #44825
- macros: fix bug in collecting trait and impl items with derives. #44757
-  `--cap-lints allow` switches off `can_emit_warnings` #44627
-  Update the libc submodule #44116
- limit and clear cache obligations opportunistically #44269
- clear out projection subobligations after they are processed #43999
-  fix logic error in #44269's `prune_cache_value_obligations` #45065
- REVERTS #43543: Cleanup some remains of `hr_lifetime_in_assoc_type` compatibility lint:
@bors
Copy link
Contributor

bors commented Oct 7, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing aa30011 to beta...

@bors bors merged commit a4923d9 into rust-lang:beta Oct 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.