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

collections: Don't recurse in hashmap robin_hood #12867

Merged
merged 1 commit into from
Mar 14, 2014

Conversation

alexcrichton
Copy link
Member

This switches a "tail call" to a manual loop to get around LLVM not optimizing
to a tail call.

Close #12860

@alexcrichton
Copy link
Member Author

the no-whitespace diff is a good way to see that there's not much change.

This switches a "tail call" to a manual loop to get around LLVM not optimizing
to a tail call.

Close rust-lang#12860
bors added a commit that referenced this pull request Mar 14, 2014
This switches a "tail call" to a manual loop to get around LLVM not optimizing
to a tail call.

Close #12860
@bors bors closed this Mar 14, 2014
@bors bors merged commit 05c991c into rust-lang:master Mar 14, 2014
@alexcrichton alexcrichton deleted the issue-12860 branch March 14, 2014 16:56
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 5, 2023
…atin_instead_of_docs_dot_rs, r=Ddystopia

 Provide links to locally built documentation for `experimental/externalDocs`

This pull request addresses issue rust-lang#12867, which requested the ability to provide links to locally built documentation when using the "Open docs for symbol" feature. Previously, rust-analyzer always used docs.rs for this purpose. With these changes, the feature will provide both web (docs.rs) and local documentation links without verifying their existence.

Changes in this PR:

   - Added support for local documentation links alongside web documentation links.
   - Added `target_dir` path argument for external_docs and other related methods.
   - Added `sysroot` argument for external_docs.
   - Added `target_directory` path to `CargoWorkspace`.

API Changes:

   - Added an experimental client capability `{ "localDocs": boolean }`. If this capability is set, the `Open External Documentation` request returned from the server will include both web and local documentation links in the `ExternalDocsResponse` object.

Here's the `ExternalDocsResponse` interface:

```typescript
interface ExternalDocsResponse {
    web?: string;
    local?: string;
}
```

By providing links to both web-based and locally built documentation, this update improves the developer experience for those using different versions of crates, git dependencies, or local crates not available on docs.rs. Rust-analyzer will now provide both web (docs.rs) and local documentation links, leaving it to the client to open the desired link. Please note that this update does not perform any checks to ensure the validity of the provided links.
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 13, 2023
…tion_vscode, r=Veykril

feat: vscode: Support opening local documentation if available

This PR implements the VS code support for opening local documentation (server side support was already implemented in rust-lang#14662).

[local_docs.webm](https://github.com/rust-lang/rust-analyzer/assets/9659253/715b84dd-4f14-4ba0-a904-749b847eb3d5)

Displaying local instead of web docs can have many benefits:
- the web version may have different features enabled than locally selected
- the standard library may be a different version than is available online
- the user may not be online and therefore cannot access the web documentation
- the documentation may not be available online at all, for example because it is for a new feature in a library the user is currently developing

If the documentation is not available locally, the extension still falls back to the web version.

Closes rust-lang#12867.

-----

If my implementation isn't really idiomatic TypeScript: Sorry, I'm not much of a TypeScript developer. I am open to feedback, however.
bors added a commit to rust-lang-ci/rust that referenced this pull request May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

robin-hood HashMap "tail-call" should be rewritten as a loop
3 participants