Skip to content

Rollup of 10 pull requests #109205

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

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a6446c5
rustdoc: fix type search index for `fn<T>() -> &T where T: Trait`
notriddle Mar 7, 2023
44813e0
rustdoc: fix type search when more than one `where` clause applies
notriddle Mar 7, 2023
50f7520
rustdoc: DocFS: Replace rayon with threadpool and enable it for all t…
GuillaumeGomez Mar 14, 2023
e482701
Assert def-kind is correct for alias types
compiler-errors Mar 14, 2023
cf6424e
Don't make projection tys out of anon consts
compiler-errors Mar 14, 2023
bd17322
error-msg: impl better suggestion for `E0532`
Ezrashaw Mar 10, 2023
d3d537b
Exhaustively match over all alias kinds
oli-obk Mar 7, 2023
d87fbb9
Deduplicate logic between projection normalization with and without e…
oli-obk Mar 8, 2023
d2b7604
always make `define_opaque_types` explicit
lcnr Mar 15, 2023
e667872
Update docsfs module documentation
GuillaumeGomez Mar 15, 2023
6e1ab1d
mv tests/codegen/issue-* tests/codegen/issues/
scottmcm Mar 15, 2023
e5a5b90
unequal → not equal
Mar 15, 2023
683c12c
rustdoc: remove `std::` from primitive intra-doc link tooltips
notriddle Mar 15, 2023
3f250a9
Mention UEFI target promotion in release notes for 1.67.0
Mar 15, 2023
e8ba21a
Rollup merge of #108875 - notriddle:notriddle/return-trait, r=Guillau…
matthiaskrgr Mar 16, 2023
db4b222
Rollup merge of #108971 - Ezrashaw:E0532-better-binding-names, r=Waff…
matthiaskrgr Mar 16, 2023
49f1623
Rollup merge of #109139 - GuillaumeGomez:rustdoc-windows-wait-for-wri…
matthiaskrgr Mar 16, 2023
5870e28
Rollup merge of #109151 - compiler-errors:debug-assert-alias, r=Waffl…
matthiaskrgr Mar 16, 2023
967cf8b
Rollup merge of #109166 - lcnr:define_opaque_types-explicit, r=oli-obk
matthiaskrgr Mar 16, 2023
b0b5d07
Rollup merge of #109171 - oli-obk:normalization_cleanup, r=compiler-e…
matthiaskrgr Mar 16, 2023
85e18d2
Rollup merge of #109172 - scottmcm:move-codegen-issues-tests, r=Waffl…
matthiaskrgr Mar 16, 2023
384733f
Rollup merge of #109180 - gimbles:master, r=compiler-errors
matthiaskrgr Mar 16, 2023
9281eb4
Rollup merge of #109185 - notriddle:notriddle/primitive-tooltip, r=jsha
matthiaskrgr Mar 16, 2023
1326ced
Rollup merge of #109192 - lukas-code:uefi-relnotes, r=joshtriplett
matthiaskrgr Mar 16, 2023
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
Next Next commit
rustdoc: fix type search index for fn<T>() -> &T where T: Trait
  • Loading branch information
notriddle committed Mar 7, 2023
commit a6446c53fe8be6692b07e121b831c3db770ff94a
7 changes: 6 additions & 1 deletion src/librustdoc/html/render/search_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ fn add_generics_and_bounds_as_types<'tcx, 'a>(
}

// First, check if it's "Self".
let arg = if let Some(self_) = self_ {
let mut arg = if let Some(self_) = self_ {
match &*arg {
Type::BorrowedRef { type_, .. } if type_.is_self_type() => self_,
type_ if type_.is_self_type() => self_,
Expand All @@ -475,6 +475,11 @@ fn add_generics_and_bounds_as_types<'tcx, 'a>(
arg
};

// strip references from the argument type
while let Type::BorrowedRef { type_, .. } = &*arg {
arg = &*type_;
}

// If this argument is a type parameter and not a trait bound or a type, we need to look
// for its bounds.
if let Type::Generic(arg_s) = *arg {
Expand Down
7 changes: 6 additions & 1 deletion tests/rustdoc-js/where-clause.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const QUERY = ['trait<nested>', '-> trait<nested>', 't1, t2'];
const QUERY = ['trait<nested>', '-> trait<nested>', 't1, t2', '-> shazam'];

const EXPECTED = [
{
Expand All @@ -16,4 +16,9 @@ const EXPECTED = [
{ 'path': 'where_clause', 'name': 'presto' },
],
},
{
'others': [
{ 'path': 'where_clause', 'name': 'bippety' },
],
},
];
6 changes: 6 additions & 0 deletions tests/rustdoc-js/where-clause.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ pub trait T2<'a, T> {
}

pub fn presto<A, B>(_: A, _: B) where A: T1, B: for <'b> T2<'b, Nested> {}

pub trait Shazam {}

pub fn bippety<X>() -> &'static X where X: Shazam {
panic!()
}