| Age | Commit message (Collapse) | Author | Lines |
|
rustdoc-search: JavaScript optimization based on Firefox Profiler output
Part of https://github.com/rust-lang/rust/issues/146048
Preview: https://notriddle.com/rustdoc-html-demo-12/stringdex-js-opt/std/index.html
These commits are based on some profiler readings, and should reduce CPU usage for name-based searching.
- The first commit improves warm searches by allocating less garbage when data is already loaded:
Before: https://profiler.firefox.com/public/wvzd88m8r70p8frvz1z628tv3htwna0b9c0ef10/calltree/?globalTrackOrder=0w2&implementation=js&thread=3&v=11
After: https://profiler.firefox.com/public/yfe9aq6ep3kacw3zmr7jqn6gv7ckfq86rg89568/calltree/?globalTrackOrder=0w2&implementation=js&thread=3&v=11
- The second commit improves cold searches by delaying load for special type names until type-based search runs
Before: 5.86s (throttled to "Good 2G" in Dev Tools) <https://doc.rust-lang.org/nightly/std/index.html?search=>
<img width="2524" height="919" alt="image" src="https://github.com/user-attachments/assets/8dbbbd46-b7ab-4e3c-9e8c-f1e41cfaa968" />
After: 5.77s (throttled to "Good 2G" in Dev Tools) <https://notriddle.com/rustdoc-html-demo-12/stringdex-js-opt/std/index.html?search=>
<img width="2524" height="912" alt="image" src="https://github.com/user-attachments/assets/6976a584-24f4-4d47-8118-7a81b22d411e" />
For comparison's sake, the same test takes 12.17s on stable <https://doc.rust-lang.org/1.89.0/std/index.html?search=>
<img width="2525" height="916" alt="image" src="https://github.com/user-attachments/assets/eb6df2e8-6632-4bef-a6d0-5179c6288fd0" />
|
|
Example
---
```rust
fn foo() {
let x = if true {
1
} el$0 else {
2
};
}
```
**Before this PR**:
```text
else~ k [LS]
else if~ k [LS]
```
**After this PR**:
```text
else if~ k [LS]
```
|
|
|
|
|
|
|
|
|
|
|
|
Example
---
```rust
fn main() {
if $0let$0 Some(x) = Some(2+2) {}
}
```
**Before this PR**:
```rust
fn main() {
let $0var_name = let Some(x) = Some(2+2);
if var_name {}
}
```
**After this PR**:
```rust
fn main() {
let $0var_name = Some(2+2);
if let Some(x) = var_name {}
}
```
|
|
point to Compiler team docs on Forge
|
|
|
|
|
|
implement sqrt for f16 and f128
|
|
Add missing documentation for running tests with GCC backend
|
|
|
|
|
|
|
|
Add GenMC estimation mode.
|
|
|
|
|
|
minor: Yet another rustc crates bump
|
|
|
|
|
|
It is now required to provide a resource compiler on windows when
compiling rust. This allows toolchain builders to explicitly provide a
path to an alternative, such as llvm-rc, instead of the one that's
provided by the Windows SDK.
|
|
|
|
clippy-subtree-update
|
|
|
|
|
|
update enzyme submodule
I upstreamed a few of our rust-lang/Enzyme patches, so I could drop them in our fork.
r? compiler
|
|
|
|
Remove ImplSubject
It only has one usage in rustdoc.
|
|
Clean up `ty::Dynamic`
1. As a follow-up to PR rust-lang/rust#143036, remove `DynKind` entirely.
2. Inside HIR ty lowering, consolidate modules `dyn_compatibility` and `lint` into `dyn_trait`
* `dyn_compatibility` wasn't about dyn compatibility itself, it's about lowering trait object types
* `lint` contained dyn-Trait-specific diagnostics+lints only
|
|
Cleanup `FnDecl::inner_full_print`
`inner_full_print` was pretty hard to follow IMHO.
Hopefully this cleans it up a little bit.
Also, it was checking whether `self.inputs` is empty twice, and then handling an unreachable match arm:
https://github.com/yotamofek/rust/blob/f836ae4e663b6e8938096b8559e094d18361be55/src/librustdoc/html/format.rs#L1368C1-L1368C33
`last_input_index` could only be `None` if the fn has no parameters, in which case the loop body would never run.
r? ``@GuillaumeGomez`` if you have the capacity :)
BTW, can we rename `FnDecl::inputs` to `parameters` or something? And `output` to `return_ty`?
|
|
fix: Port a bunch of stuff from rustc and fix a bunch of type mismatches/diagnostics
|
|
|
|
support `readdir` on FreeBSD
|
|
|
|
|
|
Do not use `git -C dir`
Older versions of git (≤ 1.8.5) do not support the `-C dir` global option. Use the `cwd` optional argument when using Python's `subprocess` functionality instead.
Fix rust-lang/rust#142534
|
|
Make llvm_enzyme a regular cargo feature
This makes it clearer that it is set by the build system rather than by the rustc that compiles the current rustc. It also avoids bootstrap needing to pass `--check-cfg llvm_enzyme` to rustc.
|
|
Add parallel-frontend-threads to bootstrap.toml and enable multi-threaded parallel compilation
Add the option to use the parallel compiler when building Rust code in bootstrap.
|
|
|
|
Fix applicable on variant field for change_visibility
|
|
Enum variant fields do not allow visibility
Example
---
```rust
enum Foo {
Variant($0String),
}
```
**Before this PR**:
```rust
enum Foo {
Variant(pub(crate) String),
}
```
**After this PR**:
Assist not applicable
|
|
Add `rust-analyzer.semanticHighlighting.comments.enable`
|
|
|
|
- Adds option to rustc config to enable GCS
- Passes `guarded-control-stack` flag to llvm if enabled
|
|
|
|
|
|
Rollup of 14 pull requests
Successful merges:
- rust-lang/rust#142807 (libtest: expose --fail-fast as an unstable command-line option)
- rust-lang/rust#144871 (Stabilize `btree_entry_insert` feature)
- rust-lang/rust#145071 (Update the minimum external LLVM to 20)
- rust-lang/rust#145181 (remove FIXME block from `has_significant_drop`, it never encounters inference variables)
- rust-lang/rust#145660 (initial implementation of the darwin_objc unstable feature)
- rust-lang/rust#145838 (don't apply temporary lifetime extension rules to non-extended `super let`)
- rust-lang/rust#146259 (Suggest removing Box::new instead of unboxing it)
- rust-lang/rust#146410 (Iterator repeat: no infinite loop for `last` and `count`)
- rust-lang/rust#146460 (Add tidy readme)
- rust-lang/rust#146552 (StateTransform: Do not renumber resume local.)
- rust-lang/rust#146564 (Remove Rvalue::Len again.)
- rust-lang/rust#146581 (Detect attempt to use var-args in closure)
- rust-lang/rust#146588 (tests/run-make: Update list of statically linked musl targets)
- rust-lang/rust#146631 (cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 3))
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Example
---
```rust
struct Foo { num: u32 }
struct Bar(Foo);
fn foo(Bar($0)) {}
```
**Before this PR**:
```rust
struct Foo { num: u32 }
struct Bar(Foo);
fn foo(Bar(Foo { num$1 }: Foo$0)) {}
```
**After this PR**:
```rust
struct Foo { num: u32 }
struct Bar(Foo);
fn foo(Bar(Foo { num$1 }$0)) {}
```
|