Skip to content

Conversation

notriddle
Copy link
Contributor

@notriddle notriddle commented Dec 10, 2023

Before

After

Profile

As a bit of background information: in type-based queries, a type name that does not exist gets treated as a generic type variable.

This causes a counterintuitive behavior in the tor_config crate, which has a trait with an associated type variable called T.

This isn't a searchable concrete type, but its name still gets stored in the typeNameIdMap, as a convenient way to intern its name.

(The second commit is a mostly unrelated bugfix.)

Before: http://notriddle.com/rustdoc-html-demo-6/tor-before/tor_config/

After: http://notriddle.com/rustdoc-html-demo-6/tor-after/tor_config/

Profile: http://notriddle.com/rustdoc-html-demo-6/tor-profile/

As a bit of background information: in type-based queries, a type
name that does not exist gets treated as a generic type variable.

This causes a counterintuitive behavior in the `tor_config` crate,
which has a trait with an associated type variable called `T`.

This isn't a searchable concrete type, but its name still gets stored
in the typeNameIdMap, as a convenient way to intern its name.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 10, 2023
@rustbot
Copy link
Collaborator

rustbot commented Dec 10, 2023

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @jsha

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Dec 10, 2023
@GuillaumeGomez
Copy link
Member

Thanks!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Dec 11, 2023

📌 Commit 7162cb9 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 11, 2023
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Dec 11, 2023
…ern, r=GuillaumeGomez

rustdoc-search: do not treat associated type names as types

[Before](http://notriddle.com/rustdoc-html-demo-6/tor-before/tor_config/list_builder/trait.DirectDefaultEmptyListBuilderAccessors.html?search=DirectDefaultEmptyListBuilderAccessors%3CT%3DT%3E%20-%3E%20Vec%3CT%3E#associatedtype.T)

[After](http://notriddle.com/rustdoc-html-demo-6/tor-after/tor_config/list_builder/trait.DirectDefaultEmptyListBuilderAccessors.html?search=DirectDefaultEmptyListBuilderAccessors%3CT%3DT%3E%20-%3E%20Vec%3CT%3E#associatedtype.T)

[Profile](http://notriddle.com/rustdoc-html-demo-6/tor-profile/index.html)

As a bit of background information: in type-based queries, a type name that does not exist gets treated as a generic type variable.

This causes a counterintuitive behavior in the `tor_config` crate, which has a trait with an associated type variable called `T`.

This isn't a searchable concrete type, but its name still gets stored in the typeNameIdMap, as a convenient way to intern its name.

(The second commit is a mostly unrelated bugfix.)
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 11, 2023
…llaumeGomez

Rollup of 5 pull requests

Successful merges:

 - rust-lang#118417 (Add unstable `-Zdefault-hidden-visibility` cmdline flag for `rustc`.)
 - rust-lang#118661 (Restore `const PartialEq`)
 - rust-lang#118802 (Remove edition umbrella features.)
 - rust-lang#118807 (Remove an allocation in min_stack)
 - rust-lang#118812 (rustdoc-search: do not treat associated type names as types)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 11, 2023
…llaumeGomez

Rollup of 3 pull requests

Successful merges:

 - rust-lang#118802 (Remove edition umbrella features.)
 - rust-lang#118807 (Remove an allocation in min_stack)
 - rust-lang#118812 (rustdoc-search: do not treat associated type names as types)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c89672e into rust-lang:master Dec 11, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 11, 2023
Rollup merge of rust-lang#118812 - notriddle:notriddle/assoc-name-intern, r=GuillaumeGomez

rustdoc-search: do not treat associated type names as types

[Before](http://notriddle.com/rustdoc-html-demo-6/tor-before/tor_config/list_builder/trait.DirectDefaultEmptyListBuilderAccessors.html?search=DirectDefaultEmptyListBuilderAccessors%3CT%3DT%3E%20-%3E%20Vec%3CT%3E#associatedtype.T)

[After](http://notriddle.com/rustdoc-html-demo-6/tor-after/tor_config/list_builder/trait.DirectDefaultEmptyListBuilderAccessors.html?search=DirectDefaultEmptyListBuilderAccessors%3CT%3DT%3E%20-%3E%20Vec%3CT%3E#associatedtype.T)

[Profile](http://notriddle.com/rustdoc-html-demo-6/tor-profile/index.html)

As a bit of background information: in type-based queries, a type name that does not exist gets treated as a generic type variable.

This causes a counterintuitive behavior in the `tor_config` crate, which has a trait with an associated type variable called `T`.

This isn't a searchable concrete type, but its name still gets stored in the typeNameIdMap, as a convenient way to intern its name.

(The second commit is a mostly unrelated bugfix.)
@rustbot rustbot added this to the 1.76.0 milestone Dec 11, 2023
@notriddle notriddle deleted the notriddle/assoc-name-intern branch April 18, 2024 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants