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 1 pull requests #101945

Closed
wants to merge 40 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1d09f2c
Switch channel to beta
Mark-Simulacrum Aug 8, 2022
0281ea4
Move `significant_drop_in_scrutinee` into `nursey`
Jarcho Aug 8, 2022
e597688
rustdoc: do not mark the contents of a skipped module as inlined
notriddle Aug 6, 2022
cbf9902
Enable RUSTC_BOOTSTRAP for a few steps
Mark-Simulacrum Aug 8, 2022
903561f
Put explicit_auto_deref into nursery
flip1995 Aug 8, 2022
7c45c50
Avoid ICE in rustdoc.
cjgillot Aug 6, 2022
f4fb94a
Synthetize a trait ref when none is available.
cjgillot Aug 8, 2022
275ad6b
Add regression test comment
camelid Aug 8, 2022
56714e5
Auto merge of #100274 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
bors Aug 9, 2022
444156e
Bump to released stable
Mark-Simulacrum Aug 11, 2022
7a51fa4
Add regression test for issue 100187
spastorino Aug 9, 2022
babe5a0
Iterate def_ids map backwards to try first the latest mappings (it's …
spastorino Aug 9, 2022
c8da3d4
Add docs for get_remapped_def_id
spastorino Aug 9, 2022
8ae6300
Update cargo to include rust-lang/cargo#10970
Mark-Simulacrum Aug 11, 2022
fb2194a
Auto merge of #100412 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
bors Aug 14, 2022
11a367a
Revert let_chains stabilization
Noratrieb Aug 14, 2022
82bf341
Auto merge of #100538 - Nilstrieb:revert-let-chains-beta, r=compiler-…
bors Aug 18, 2022
63bb951
revert mir inlining policy for beta-1.64 to resolve issue #101004.
pnkfelix Aug 26, 2022
2741dd8
ignore std/test/codegen/mem-replace-direct-memcpy.rs in the 1.64-beta.
pnkfelix Aug 26, 2022
d2778f7
Add 1.62.1 and 1.63 release notes
joshtriplett Aug 27, 2022
323cc8a
RELEASES.md: Initial version of 1.64 release notes
joshtriplett Aug 27, 2022
81765de
RELEASES.md: Add Linux target minimum required versions to compatibil…
joshtriplett Aug 27, 2022
186c02d
Reword "Internal Changes" description
joshtriplett Aug 27, 2022
197ccce
RELEASES.md: Fix typo: s/rexport/re-export/
joshtriplett Aug 27, 2022
2f96703
regression tests for problems that are exposed by mir-inlining policy…
pnkfelix Aug 29, 2022
3b1c95d
[beta] Update cargo
ehuss Aug 30, 2022
b4b39cd
Auto merge of #99893 - compiler-errors:issue-99387, r=davidtwco
bors Aug 6, 2022
116e19f
Rollup merge of #100155 - compiler-errors:issue-100154, r=jackh726
Dylan-DPC Aug 5, 2022
cff90fe
Auto merge of #99860 - oli-obk:revert_97346, r=pnkfelix
bors Aug 18, 2022
4497ac9
Auto merge of #101221 - ehuss:update-beta-cargo, r=ehuss
bors Aug 31, 2022
1ec9b66
Auto merge of #101050 - pnkfelix:revert-mir-inline-policy-for-beta-1.…
bors Aug 31, 2022
009a8b3
Add some items and wording
tmandry Sep 2, 2022
c7f8e68
CTFE: more informative error message on ReadPointerAsBytes trouble
RalfJung Sep 2, 2022
5e9de4a
Consolidate notes on unused_tuple_struct_fields
tmandry Sep 3, 2022
25912c0
Auto merge of #101320 - RalfJung:beta-ctfe-ptr-provenance, r=pnkfelix
bors Sep 9, 2022
0b3a19a
Fix hang in `vec_init_then_push`
Jarcho Sep 7, 2022
b31188e
Auto merge of #101808 - flip1995:clippy_backport, r=Mark-Simulacrum
bors Sep 16, 2022
734760f
Add stabilized APIs
tmandry Sep 17, 2022
25e2091
Improve release note for #99413
tmandry Sep 17, 2022
f3b1c2c
Rollup merge of #101093 - joshtriplett:relnotes-1.64, r=Mark-Simulacrum
matthiaskrgr Sep 17, 2022
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
Prev Previous commit
Next Next commit
Synthetize a trait ref when none is available.
cjgillot authored and Mark-Simulacrum committed Aug 8, 2022
commit f4fb94ab029a68313fa51f1b105c5a6c7affb13f
18 changes: 12 additions & 6 deletions src/librustdoc/clean/auto_trait.rs
Original file line number Diff line number Diff line change
@@ -348,13 +348,13 @@ where
fn make_final_bounds(
&self,
ty_to_bounds: FxHashMap<Type, FxHashSet<GenericBound>>,
ty_to_fn: FxHashMap<Type, (Option<PolyTrait>, Option<Type>)>,
ty_to_fn: FxHashMap<Type, (PolyTrait, Option<Type>)>,
lifetime_to_bounds: FxHashMap<Lifetime, FxHashSet<GenericBound>>,
) -> Vec<WherePredicate> {
ty_to_bounds
.into_iter()
.flat_map(|(ty, mut bounds)| {
if let Some((Some(ref poly_trait), ref output)) = ty_to_fn.get(&ty) {
if let Some((ref poly_trait, ref output)) = ty_to_fn.get(&ty) {
let mut new_path = poly_trait.trait_.clone();
let last_segment = new_path.segments.pop().expect("segments were empty");

@@ -473,7 +473,7 @@ where
let mut lifetime_to_bounds: FxHashMap<_, FxHashSet<_>> = Default::default();
let mut ty_to_traits: FxHashMap<Type, FxHashSet<Path>> = Default::default();

let mut ty_to_fn: FxHashMap<Type, (Option<PolyTrait>, Option<Type>)> = Default::default();
let mut ty_to_fn: FxHashMap<Type, (PolyTrait, Option<Type>)> = Default::default();

for p in clean_where_predicates {
let (orig_p, p) = (p, p.clean(self.cx));
@@ -537,8 +537,8 @@ where
if is_fn {
ty_to_fn
.entry(ty.clone())
.and_modify(|e| *e = (Some(poly_trait.clone()), e.1.clone()))
.or_insert(((Some(poly_trait.clone())), None));
.and_modify(|e| *e = (poly_trait.clone(), e.1.clone()))
.or_insert(((poly_trait.clone()), None));

ty_to_bounds.entry(ty.clone()).or_default();
} else {
@@ -561,7 +561,13 @@ where
.and_modify(|e| {
*e = (e.0.clone(), Some(rhs.ty().unwrap().clone()))
})
.or_insert((None, Some(rhs.ty().unwrap().clone())));
.or_insert((
PolyTrait {
trait_: trait_.clone(),
generic_params: Vec::new(),
},
Some(rhs.ty().unwrap().clone()),
));
continue;
}

4 changes: 3 additions & 1 deletion src/test/rustdoc/fn-bound.rs
Original file line number Diff line number Diff line change
@@ -4,10 +4,12 @@ pub struct Span<F: Fn(&i32)> {
inner: Peekable<ConditionalIterator<F>>,
}

struct ConditionalIterator<F> {
pub struct ConditionalIterator<F> {
f: F,
}


// @has 'fn_bound/struct.ConditionalIterator.html' '//h3[@class="code-header in-band"]' 'impl<F: Fn(&i32)> Iterator for ConditionalIterator<F>'
impl<F: Fn(&i32)> Iterator for ConditionalIterator<F> {
type Item = ();