Skip to content

Commit a1b9cf6

Browse files
committed
Auto merge of #56930 - pietroalbini:beta-backports, r=pietroalbini
[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
2 parents a01e476 + f31a768 commit a1b9cf6

File tree

13 files changed

+92
-57
lines changed

13 files changed

+92
-57
lines changed

Cargo.lock

+44-44
Large diffs are not rendered by default.

RELEASES.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
Version 1.31.1 (2018-12-20)
2+
===========================
3+
4+
- [Fix Rust failing to build on `powerpc-unknown-netbsd`][56562]
5+
- [Fix broken go-to-definition in RLS][rls/1171]
6+
- [Fix infinite loop on hover in RLS][rls/1170]
7+
8+
[56562]: https://github.com/rust-lang/rust/pull/56562
9+
[rls/1171]: https://github.com/rust-lang/rls/issues/1171
10+
[rls/1170]: https://github.com/rust-lang/rls/pull/1170
11+
112
Version 1.31.0 (2018-12-06)
213
==========================
314

src/ci/docker/dist-i686-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ RUN ./build-gcc.sh
6767
COPY dist-x86_64-linux/build-python.sh /tmp/
6868
RUN ./build-python.sh
6969

70-
# Now build LLVM+Clang 7, afterwards configuring further compilations to use the
70+
# Now build LLVM+Clang 6, afterwards configuring further compilations to use the
7171
# clang/clang++ compilers.
7272
COPY dist-x86_64-linux/build-clang.sh /tmp/
7373
RUN ./build-clang.sh

src/ci/docker/dist-x86_64-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ RUN ./build-gcc.sh
6767
COPY dist-x86_64-linux/build-python.sh /tmp/
6868
RUN ./build-python.sh
6969

70-
# Now build LLVM+Clang 7, afterwards configuring further compilations to use the
70+
# Now build LLVM+Clang 6, afterwards configuring further compilations to use the
7171
# clang/clang++ compilers.
7272
COPY dist-x86_64-linux/build-clang.sh /tmp/
7373
RUN ./build-clang.sh

src/ci/docker/dist-x86_64-linux/build-clang.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ set -ex
1313

1414
source shared.sh
1515

16-
LLVM=7.0.0
16+
LLVM=6.0.0
1717

1818
mkdir clang
1919
cd clang

src/ci/docker/scripts/musl.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ hide_output make clean
5151

5252
cd ..
5353

54-
LLVM=70
54+
LLVM=60
5555

5656
# may have been downloaded in a previous run
5757
if [ ! -d libunwind-release_$LLVM ]; then

src/doc/book

Submodule book updated 67 files

src/librustc_codegen_ssa/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ num_cpus = "1.0"
1616
rustc-demangle = "0.1.4"
1717
memmap = "0.6"
1818
log = "0.4.5"
19-
libc = "0.2.43"
19+
libc = "0.2.44"
2020
jobserver = "0.1.11"
2121

2222
serialize = { path = "../libserialize" }

src/librustc_typeck/check/mod.rs

+15-2
Original file line numberDiff line numberDiff line change
@@ -914,6 +914,7 @@ fn typeck_tables_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
914914
fcx.resolve_generator_interiors(def_id);
915915

916916
for (ty, span, code) in fcx.deferred_sized_obligations.borrow_mut().drain(..) {
917+
let ty = fcx.normalize_ty(span, ty);
917918
fcx.require_type_is_sized(ty, span, code);
918919
}
919920
fcx.select_all_obligations_or_error();
@@ -3969,15 +3970,27 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
39693970
//
39703971
// to work in stable even if the Sized bound on `drop` is relaxed.
39713972
for i in 0..fn_sig.inputs().skip_binder().len() {
3972-
let input = tcx.erase_late_bound_regions(&fn_sig.input(i));
3973+
// We just want to check sizedness, so instead of introducing
3974+
// placeholder lifetimes with probing, we just replace higher lifetimes
3975+
// with fresh vars.
3976+
let input = self.replace_bound_vars_with_fresh_vars(
3977+
expr.span,
3978+
infer::LateBoundRegionConversionTime::FnCall,
3979+
&fn_sig.input(i)).0;
39733980
self.require_type_is_sized_deferred(input, expr.span,
39743981
traits::SizedArgumentType);
39753982
}
39763983
}
39773984
// Here we want to prevent struct constructors from returning unsized types.
39783985
// There were two cases this happened: fn pointer coercion in stable
39793986
// and usual function call in presense of unsized_locals.
3980-
let output = tcx.erase_late_bound_regions(&fn_sig.output());
3987+
// Also, as we just want to check sizedness, instead of introducing
3988+
// placeholder lifetimes with probing, we just replace higher lifetimes
3989+
// with fresh vars.
3990+
let output = self.replace_bound_vars_with_fresh_vars(
3991+
expr.span,
3992+
infer::LateBoundRegionConversionTime::FnCall,
3993+
&fn_sig.output()).0;
39813994
self.require_type_is_sized_deferred(output, expr.span, traits::SizedReturnType);
39823995
}
39833996

src/librustdoc/html/static/rustdoc.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ nav.sub {
283283
padding-left: 0;
284284
}
285285

286-
:not(.source) .example-wrap {
286+
.rustdoc:not(.source) .example-wrap {
287287
display: inline-flex;
288288
margin-bottom: 10px;
289289
}
@@ -301,11 +301,11 @@ nav.sub {
301301
text-align: right;
302302
}
303303

304-
:not(.source) .example-wrap > pre.rust {
304+
.rustdoc:not(.source) .example-wrap > pre.rust {
305305
width: 100%;
306306
}
307307

308-
body:not(.source) .example-wrap > pre {
308+
.rustdoc:not(.source) .example-wrap > pre {
309309
margin: 0;
310310
}
311311

src/rustllvm/llvm-rebuild-trigger

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# If this file is modified, then llvm will be (optionally) cleaned and then rebuilt.
22
# The actual contents of this file do not matter, but to trigger a change on the
33
# build bots then the contents should be changed so git updates the mtime.
4-
2018-11-28
4+
2018-12-13

src/test/run-pass/issue-56237.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
use std::ops::Deref;
2+
3+
fn foo<P>(_value: <P as Deref>::Target)
4+
where
5+
P: Deref,
6+
<P as Deref>::Target: Sized,
7+
{}
8+
9+
fn main() {
10+
foo::<Box<u32>>(2);
11+
}

0 commit comments

Comments
 (0)