Skip to content

Rollup of 8 pull requests #123385

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

Merged
merged 19 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
54ab425
Add fn const BuildHasherDefault::new
krtab Mar 29, 2024
0601f0c
De-LLVM the unchecked shifts [MCP#693]
scottmcm Mar 30, 2024
f2fd2d8
Make sure to insert Sized bound first into clauses list
compiler-errors Mar 31, 2024
6c5c48e
Check that nested statics in thread locals are duplicated per thread.
oli-obk Apr 2, 2024
64b75f7
Forbid implicit nested statics in thread local statics
oli-obk Apr 2, 2024
5ee4d13
rustdoc: add a couple of regression tests
fmease Apr 2, 2024
70b4ace
rustdoc: synthetic auto trait impls: accept unresolved region vars fo…
fmease Apr 2, 2024
327aa19
Improve the `build_shift_expr_rhs` comment
scottmcm Apr 2, 2024
4626521
Update tests/mir-opt/inline/unchecked_shifts.rs
scottmcm Apr 2, 2024
a333b82
CFI: Support non-general coroutines
maurer Apr 2, 2024
b626f01
Update sysinfo to 0.30.8
Hoverbear Apr 2, 2024
d63ddef
Rollup merge of #123198 - krtab:build_hasher_default_const_new, r=Ama…
matthiaskrgr Apr 2, 2024
1b0e46f
Rollup merge of #123226 - scottmcm:u32-shifts, r=WaffleLapkin
matthiaskrgr Apr 2, 2024
a38dde9
Rollup merge of #123302 - compiler-errors:sized-bound-first, r=estebank
matthiaskrgr Apr 2, 2024
464f264
Rollup merge of #123348 - fmease:add-synth-auto-trait-impls-tests, r=…
matthiaskrgr Apr 2, 2024
5b71768
Rollup merge of #123362 - oli-obk:thread_local_nested_statics, r=este…
matthiaskrgr Apr 2, 2024
9372948
Rollup merge of #123368 - maurer:cfi-non-general-coroutines, r=compil…
matthiaskrgr Apr 2, 2024
8e271d7
Rollup merge of #123375 - fmease:rustdoc-sati-re-hotfix, r=GuillaumeG…
matthiaskrgr Apr 2, 2024
31900b4
Rollup merge of #123378 - ferrocene:hoverbear/bump-sysinfo-to-0.30.8,…
matthiaskrgr Apr 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/librustdoc/clean/auto_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,14 @@ fn clean_param_env<'tcx>(
})
.map(|pred| {
tcx.fold_regions(pred, |r, _| match *r {
ty::ReVar(vid) => vid_to_region[&vid],
// FIXME: Don't `unwrap_or`, I think we should panic if we encounter an infer var that
// we can't map to a concrete region. However, `AutoTraitFinder` *does* leak those kinds
// of `ReVar`s for some reason at the time of writing. See `rustdoc-ui/` tests.
// This is in dire need of an investigation into `AutoTraitFinder`.
ty::ReVar(vid) => vid_to_region.get(&vid).copied().unwrap_or(r),
ty::ReEarlyParam(_) | ty::ReStatic | ty::ReBound(..) | ty::ReError(_) => r,
// FIXME(#120606): `AutoTraitFinder` can actually leak placeholder regions which feels
// incorrect. Needs investigation.
ty::ReLateParam(_) | ty::RePlaceholder(_) | ty::ReErased => {
bug!("unexpected region kind: {r:?}")
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// We used to ICE here while trying to synthesize auto trait impls.
// issue: 112242
//@ check-pass
//@ compile-flags: -Znormalize-docs

pub trait MyTrait<'a> {
type MyItem;
}
pub struct Inner<Q>(Q);
pub struct Outer<Q>(Inner<Q>);

impl<'a, Q> std::marker::Unpin for Inner<Q>
where
Q: MyTrait<'a>,
<Q as MyTrait<'a>>::MyItem: Copy,
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// We used to ICE here while trying to synthesize auto trait impls.
// issue: 123370
//@ check-pass

pub struct Inner<'a, Q>(&'a (), Q);

pub struct Outer<'a, Q>(Inner<'a, Q>);

impl<'a, Q: Trait<'a>> std::marker::Unpin for Inner<'static, Q> {}

pub trait Trait<'a> {}