| commit | 6d8e723acea35a83f09e8b18eb3075b3884fd913 | [log] [tgz] |
|---|---|---|
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | Tue Nov 18 16:52:10 2025 +0100 |
| committer | GitHub <noreply@github.com> | Tue Nov 18 16:52:10 2025 +0100 |
| tree | 56c03e21c848c5ce05b0810f1d5de73ff2b67230 | |
| parent | 8910e5d92e9aa402aaf70ebd574c9f7ecff59147 [diff] | |
| parent | 60b0c9c2b38a395982699c1a69a7e4c8d46ce366 [diff] |
Rollup merge of #148281 - RalfJung:repr-transparent-check, r=nnethercote repr(transparent) check: do not compute check_unsuited more than once `field_infos` is an iterator that we execute multiple times. However, we usually ignore the `unsuited` field -- we only need it in the last iteration. So move the computation of that field to that iteration to avoid computing it multiple times. Computing `unsuited` involves a recursive traversal over the types of all non-trivial fields, so there can be non-trivial amounts of work here. (I benchmarked this in https://github.com/rust-lang/rust/pull/148243 and saw no changes, probably because we don't have a benchmark with many repr(transparent) types. But still, computing this each time just seemed silly.)
rust-analyzer is a language server that provides IDE functionality for writing Rust programs. You can use it with any editor that supports the Language Server Protocol (VS Code, Vim, Emacs, Zed, etc).
rust-analyzer features include go-to-definition, find-all-references, refactorings and code completion. rust-analyzer also supports integrated formatting (with rustfmt) and integrated diagnostics (with rustc and clippy).
Internally, rust-analyzer is structured as a set of libraries for analyzing Rust code. See Architecture in the manual.
https://rust-analyzer.github.io/book/installation.html
If you want to contribute to rust-analyzer check out the CONTRIBUTING.md or if you are just curious about how things work under the hood, see the Contributing section of the manual.
If you want to use rust-analyzer's language server with your editor of choice, check the manual. It also contains some tips & tricks to help you be more productive when using rust-analyzer.
See the security and privacy sections of the manual.
For usage and troubleshooting requests, please use “IDEs and Editors” category of the Rust forum:
https://users.rust-lang.org/c/ide/14
For questions about development and implementation, join rust-analyzer working group on Zulip:
https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer
rust-analyzer is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.