Skip to content

Commit

Permalink
Auto merge of #56930 - pietroalbini:beta-backports, r=pietroalbini
Browse files Browse the repository at this point in the history
[beta] Rollup backports

PRs accepted for backport:

* #56781: Update LLVM submodule
* #56615: Update the book to fix some edition-related bugs
* #56562: Update libc version required by rustc
* #56282: Fix #56237: normalize type before deferred sizedness checking.
* Release notes for Rust 1.31.1

Approved PRs targeting beta:

* #56819: [beta] rustdoc: fix line numbers display for [src] pages
* #56893: [beta] Revert "Update CI-clang to 7.0.0 for Linux dists."

r? @ghost
  • Loading branch information
bors committed Dec 18, 2018
2 parents a01e476 + f31a768 commit a1b9cf6
Show file tree
Hide file tree
Showing 13 changed files with 92 additions and 57 deletions.
88 changes: 44 additions & 44 deletions Cargo.lock

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
Version 1.31.1 (2018-12-20)
===========================

- [Fix Rust failing to build on `powerpc-unknown-netbsd`][56562]
- [Fix broken go-to-definition in RLS][rls/1171]
- [Fix infinite loop on hover in RLS][rls/1170]

[56562]: https://github.com/rust-lang/rust/pull/56562
[rls/1171]: https://github.com/rust-lang/rls/issues/1171
[rls/1170]: https://github.com/rust-lang/rls/pull/1170

Version 1.31.0 (2018-12-06)
==========================

Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/dist-i686-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ RUN ./build-gcc.sh
COPY dist-x86_64-linux/build-python.sh /tmp/
RUN ./build-python.sh

# Now build LLVM+Clang 7, afterwards configuring further compilations to use the
# Now build LLVM+Clang 6, afterwards configuring further compilations to use the
# clang/clang++ compilers.
COPY dist-x86_64-linux/build-clang.sh /tmp/
RUN ./build-clang.sh
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/dist-x86_64-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ RUN ./build-gcc.sh
COPY dist-x86_64-linux/build-python.sh /tmp/
RUN ./build-python.sh

# Now build LLVM+Clang 7, afterwards configuring further compilations to use the
# Now build LLVM+Clang 6, afterwards configuring further compilations to use the
# clang/clang++ compilers.
COPY dist-x86_64-linux/build-clang.sh /tmp/
RUN ./build-clang.sh
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/dist-x86_64-linux/build-clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set -ex

source shared.sh

LLVM=7.0.0
LLVM=6.0.0

mkdir clang
cd clang
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/scripts/musl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ hide_output make clean

cd ..

LLVM=70
LLVM=60

# may have been downloaded in a previous run
if [ ! -d libunwind-release_$LLVM ]; then
Expand Down
2 changes: 1 addition & 1 deletion src/doc/book
Submodule book updated 67 files
+1 −1 redirects/attributes.md
+2 −2 redirects/bibliography.md
+2 −2 redirects/borrow-and-asref.md
+3 −3 redirects/casting-between-types.md
+3 −3 redirects/choosing-your-guarantees.md
+3 −3 redirects/closures.md
+3 −3 redirects/comments.md
+3 −3 redirects/concurrency.md
+2 −2 redirects/conditional-compilation.md
+5 −5 redirects/crates-and-modules.md
+3 −3 redirects/deref-coercions.md
+3 −3 redirects/drop.md
+2 −2 redirects/effective-rust.md
+3 −3 redirects/enums.md
+3 −3 redirects/error-handling.md
+3 −3 redirects/functions.md
+3 −3 redirects/generics.md
+3 −3 redirects/getting-started.md
+2 −2 redirects/glossary.md
+3 −3 redirects/guessing-game.md
+3 −4 redirects/if-let.md
+3 −3 redirects/iterators.md
+5 −5 redirects/lifetimes.md
+3 −3 redirects/macros.md
+5 −5 redirects/match.md
+3 −3 redirects/method-syntax.md
+3 −3 redirects/mutability.md
+3 −3 redirects/ownership.md
+3 −3 redirects/primitive-types.md
+5 −5 redirects/procedural-macros.md
+3 −3 redirects/references-and-borrowing.md
+3 −3 redirects/release-channels.md
+2 −2 redirects/structs.md
+7 −7 redirects/syntax-and-semantics.md
+5 −6 redirects/syntax-index.md
+3 −3 redirects/testing.md
+3 −3 redirects/trait-objects.md
+5 −5 redirects/traits.md
+3 −3 redirects/unsafe.md
+1 −1 redirects/using-rust-without-the-standard-library.md
+3 −3 redirects/vectors.md
+1 −1 src/appendix-03-derivable-traits.md
+1 −1 src/ch00-00-introduction.md
+47 −32 src/ch02-00-guessing-game-tutorial.md
+13 −13 src/ch03-01-variables-and-mutability.md
+2 −2 src/ch03-02-data-types.md
+3 −5 src/ch03-03-how-functions-work.md
+3 −3 src/ch03-04-comments.md
+11 −11 src/ch03-05-control-flow.md
+15 −15 src/ch04-01-what-is-ownership.md
+8 −9 src/ch04-02-references-and-borrowing.md
+20 −15 src/ch04-03-slices.md
+10 −10 src/ch05-01-defining-structs.md
+11 −12 src/ch05-02-example-structs.md
+5 −5 src/ch05-03-method-syntax.md
+3 −3 src/ch06-01-defining-an-enum.md
+5 −5 src/ch06-02-match.md
+9 −9 src/ch06-03-if-let.md
+26 −36 src/ch08-01-vectors.md
+14 −14 src/ch08-02-strings.md
+24 −24 src/ch08-03-hash-maps.md
+12 −12 src/ch09-01-unrecoverable-errors-with-panic.md
+19 −21 src/ch09-02-recoverable-errors-with-result.md
+1 −0 src/ch14-02-publishing-to-crates-io.md
+5 −5 src/ch15-05-interior-mutability.md
+1 −1 src/ch18-03-pattern-syntax.md
+4 −6 src/ch19-06-macros.md
2 changes: 1 addition & 1 deletion src/librustc_codegen_ssa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ num_cpus = "1.0"
rustc-demangle = "0.1.4"
memmap = "0.6"
log = "0.4.5"
libc = "0.2.43"
libc = "0.2.44"
jobserver = "0.1.11"

serialize = { path = "../libserialize" }
Expand Down
17 changes: 15 additions & 2 deletions src/librustc_typeck/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,7 @@ fn typeck_tables_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
fcx.resolve_generator_interiors(def_id);

for (ty, span, code) in fcx.deferred_sized_obligations.borrow_mut().drain(..) {
let ty = fcx.normalize_ty(span, ty);
fcx.require_type_is_sized(ty, span, code);
}
fcx.select_all_obligations_or_error();
Expand Down Expand Up @@ -3969,15 +3970,27 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
//
// to work in stable even if the Sized bound on `drop` is relaxed.
for i in 0..fn_sig.inputs().skip_binder().len() {
let input = tcx.erase_late_bound_regions(&fn_sig.input(i));
// We just want to check sizedness, so instead of introducing
// placeholder lifetimes with probing, we just replace higher lifetimes
// with fresh vars.
let input = self.replace_bound_vars_with_fresh_vars(
expr.span,
infer::LateBoundRegionConversionTime::FnCall,
&fn_sig.input(i)).0;
self.require_type_is_sized_deferred(input, expr.span,
traits::SizedArgumentType);
}
}
// Here we want to prevent struct constructors from returning unsized types.
// There were two cases this happened: fn pointer coercion in stable
// and usual function call in presense of unsized_locals.
let output = tcx.erase_late_bound_regions(&fn_sig.output());
// Also, as we just want to check sizedness, instead of introducing
// placeholder lifetimes with probing, we just replace higher lifetimes
// with fresh vars.
let output = self.replace_bound_vars_with_fresh_vars(
expr.span,
infer::LateBoundRegionConversionTime::FnCall,
&fn_sig.output()).0;
self.require_type_is_sized_deferred(output, expr.span, traits::SizedReturnType);
}

Expand Down
6 changes: 3 additions & 3 deletions src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ nav.sub {
padding-left: 0;
}

:not(.source) .example-wrap {
.rustdoc:not(.source) .example-wrap {
display: inline-flex;
margin-bottom: 10px;
}
Expand All @@ -301,11 +301,11 @@ nav.sub {
text-align: right;
}

:not(.source) .example-wrap > pre.rust {
.rustdoc:not(.source) .example-wrap > pre.rust {
width: 100%;
}

body:not(.source) .example-wrap > pre {
.rustdoc:not(.source) .example-wrap > pre {
margin: 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/rustllvm/llvm-rebuild-trigger
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# If this file is modified, then llvm will be (optionally) cleaned and then rebuilt.
# The actual contents of this file do not matter, but to trigger a change on the
# build bots then the contents should be changed so git updates the mtime.
2018-11-28
2018-12-13
11 changes: 11 additions & 0 deletions src/test/run-pass/issue-56237.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use std::ops::Deref;

fn foo<P>(_value: <P as Deref>::Target)
where
P: Deref,
<P as Deref>::Target: Sized,
{}

fn main() {
foo::<Box<u32>>(2);
}

0 comments on commit a1b9cf6

Please sign in to comment.