about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-10-25Shrink `TypeRef` from 16 from 32 bytesChayim Refael Friedman-149/+178
Only references and arrays need to be boxed, and they comprise only 9.4% of the types (according to counting on r-a's code). This saves 17mb.
2024-10-25Shrink `Path` to 16 bytesChayim Refael Friedman-107/+596
Thanks to the observation (supported by counting) that the vast majority paths have neither generics no type anchors, and thanks to a new datastructure `ThinVecWithHeader` that is essentially `(T, Box<[U]>)` but with the size of a single pointer, we are able to reach this feat. This (together with `ThinVecWithHeader`) makes the possibility to shrink `TypeRef`, because most types are paths.
2024-10-24editors/code: Add md for walkthrough setup exampleHackerVole-4/+14
Add a separate markdown file containing the settings.json snippet from the "Useful Setup Tips". This fixes the rendering and also makes the text selectable. Also use double-backticks for `code` rendering.
2024-10-25Do not allocate attributes entry if there are no attributesChayim Refael Friedman-6/+13
This saves 8mb.
2024-10-25Shrink `ItemTreeSourceMaps`Chayim Refael Friedman-73/+155
This saves 16mb on `analysis-stats .`.
2024-10-25Reuse empty `GenericParams`Chayim Refael Friedman-6/+19
This saves back 15mb that went for typeref source maps.
2024-10-25Fix memory usage calculation's queries listChayim Refael Friedman-21/+49
2024-10-25Build source map for `hir_def::TypeRef`sChayim Refael Friedman-778/+1712
So that given a `TypeRef` we will be able to trace it back to source code. This is necessary to be able to provide diagnostics for lowering to chalk tys, since the input to that is `TypeRef`. This means that `TypeRef`s now have an identity, which means storing them in arena and not interning them, which is an unfortunate (but necessary) loss but also a pretty massive change. Luckily, because of the separation layer we have for IDE and HIR, this change never crosses the IDE boundary.
2024-10-25Auto merge of #132121 - workingjubilee:rollup-yrtn33e, r=workingjubileebors-9/+17
Rollup of 6 pull requests Successful merges: - #131851 ([musl] use posix_spawn if a directory change was requested) - #132048 (AIX: use /dev/urandom for random implementation ) - #132093 (compiletest: suppress Windows Error Reporting (WER) for `run-make` tests) - #132101 (Avoid using imports in thread_local_inner! in static) - #132113 (Provide a default impl for Pattern::as_utf8_pattern) - #132115 (rustdoc: Extend fake_variadic to "wrapped" tuples) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-24Auto merge of #132007 - rustbot:docs-update, r=ehussbors-2/+10
Update books ## rust-lang/edition-guide 7 commits in c7ebae25cb4801a31b6f05353f6d85bfa6feedd1..1f07c242f8162a711a5ac5a4ea8fa7ec884ee7a9 2024-10-21 14:29:49 UTC to 2024-10-19 19:08:20 UTC - 2024: Add reserved syntax (rust-lang/edition-guide#326) - Update stdout of `cargo new` (rust-lang/edition-guide#327) - Don't run doctests on rustfmt ident sorting page - add rustfmt raw identifer sorting doc (rust-lang/edition-guide#321) - Add some tips for what to be careful of with rustdoc-doctests (rust-lang/edition-guide#323) - Remove cargo-remove-implicit-features (rust-lang/edition-guide#324) - Rename doctest standalone tag (rust-lang/edition-guide#325) ## rust-embedded/book 1 commits in f40a8b420ec4b4505d9489965e261f1d5c28ba23..ddbf1b4e2858fedb71b7c42eb15c4576517dc125 2024-10-13 19:53:37 UTC to 2024-10-13 19:53:37 UTC - Add link to Cortex-M comparison to install.md (rust-embedded/book#378) ## rust-lang/reference 29 commits in c64e52a3d306eac0129f3ad6c6d8806ab99ae2e9..23ce619966541bf2c80d45fdfeecf3393e360a13 2024-10-05 00:33:03 +0000 to 2024-10-22 21:34:51 +0000 - Mention `--print cfg` under set configuration options (rust-lang/reference#1636) - Fix `pat` fragment specifier to be the "current" edition (rust-lang/reference#1640) - Add restriction for cfg_attr with crate_type and crate_name (rust-lang/reference#1649) - Sort macro fragment specifiers (rust-lang/reference#1641) - Document mixed-site hygiene (rust-lang/reference#1656) - Clarify that "macro attributes" refers to proc macros (rust-lang/reference#1660) - mdbook-spec: Fix Spec::new creation (rust-lang/reference#1658) - Fix stdcall example broken by recent rustc change (rust-lang/reference#1659) - Add spec identifiers to const_eval.md (rust-lang/reference#1569) - Add identifier syntax to trait-bounds.md (rust-lang/reference#1631) - Add identifier syntax to macro-ambiguity.md (rust-lang/reference#1634) - Add spec identifier syntax to conditional-compilation.md (rust-lang/reference#1564) - Add spec identifiers to behaviour-considered-undefined.md (rust-lang/reference#1562) - Add test linking (rust-lang/reference#1646) - Allow `deny` inside `forbid` as a no-op (rust-lang/reference#1655) - Add identifier syntax to identifiers.md (rust-lang/reference#1583) - Add spec identifiers to crates-and-source-files.md (rust-lang/reference#1570) - Add identifier syntax to linkage.md (rust-lang/reference#1633) - Add identifier syntax to type-coercions.md (rust-lang/reference#1632) - Add identifiers to variables.md (rust-lang/reference#1626) - Add identifier syntax to lexer chapters (rust-lang/reference#1620) - Add spec identifier syntax to `unsafe-keyword.md` and `unsafety.md` (rust-lang/reference#1619) - Add identifier syntax to types and subchapters. (rust-lang/reference#1618) - Add identifier syntax to subtyping.md (rust-lang/reference#1613) - Add identifier syntax to statements.md (rust-lang/reference#1611) - Add identifier syntax to type-layout.md (rust-lang/reference#1614) - Clarify definition of "immutable bytes" (rust-lang/reference#1637) - Add preview artifacts in CI (rust-lang/reference#1647) - trait bounds grammar: make `?` and `for&lt;&gt;` mutually exclusive (rust-lang/reference#1650) ## rust-lang/rustc-dev-guide 5 commits in 07bc9ca9eb1cd6d9fbbf758c2753b748804a134f..59d94ea75a0b157e148af14c73c2dd60efb7b60a 2024-10-21 02:30:07 UTC to 2024-10-07 21:12:09 UTC - Add the WASM | WASI | Emscripten notification groups (rust-lang/rustc-dev-guide#2100) - Update bootstrapping.md (rust-lang/rustc-dev-guide#1900) - Rename `needs-profiler-support` to `needs-profiler-runtime` (rust-lang/rustc-dev-guide#2095) - Document compiletest directives `ignore-coverage-map` and `ignore-coverage-run` (rust-lang/rustc-dev-guide#2094) - Purge `run-pass-valgrind` mentions (rust-lang/rustc-dev-guide#2091)
2024-10-24Rollup merge of #132093 - jieyouxu:suppress-wer, r=onur-ozkanJubilee-9/+17
compiletest: suppress Windows Error Reporting (WER) for `run-make` tests WER by default will show a *bunch* of error dialogues for missing DLLs on Windows for `run-make` tests. We address that by: 1. Guarding `run-make` test process spawning with `disable_error_reporting`. 2. Fixing `disable_error_reporting` to also add the [`SEM_FAILCRITICALERRORS` flag to `SetErrorMode`][SetErrorMode]. Just `SEM_NOGPFAULTERRORBOX` was not sufficient to suppress error dialogues for e.g. missing DLLs. Fixes #132092. In particular, refer to that issue for the necessary conditions to observe these dialogues from popping up in the first place. I was only able to manually test this locally in my "native" Windows msvc environment and it prevents the WER dialogues from popping up, I don't think it's possible to really test this automatically. [SetErrorMode]: https://learn.microsoft.com/en-us/windows/win32/api/errhandlingapi/nf-errhandlingapi-seterrormode?redirectedfrom=MSDN#parameters
2024-10-24Rework `generate_fn_type_alias`Giga Bowser-55/+43
2024-10-24Add `ty_fn_ptr` function to create function pointer typeGiga Bowser-1/+41
2024-10-24Update changelog generation for merge queuesLaurențiu Nicola-2/+3
2024-10-24Merge pull request #18404 from Veykril/veykril/push-swpmkoqqxrvuLukas Wirth-18/+150
feat: Implement diagnostics pull model
2024-10-24feat: Implement diagnostics pull modelLukas Wirth-18/+150
2024-10-24Pass Ident by reference in ast Visitormaxcabrajac-2/+2
2024-10-24Merge pull request #18402 from Veykril/veykril/push-wrvtystlszlrLukas Wirth-10/+13
internal: Improve proc-macro error msg for failed build scripts
2024-10-24Merge pull request #18401 from Veykril/veykril/push-ulpowvsymyysLukas Wirth-3/+2
minor: Remove intermediate allocations
2024-10-24internal: Improve proc-macro error msg for failed build scriptsLukas Wirth-10/+13
2024-10-24minor: Remove intermediate allocationsLukas Wirth-3/+2
2024-10-24fix: handle aliased pattern and simplify testcaseKhanh Duong Quoc-23/+32
2024-10-24refactor: separate function for getting import nameKhanh Duong Quoc-7/+19
2024-10-24Merge pull request #18399 from Veykril/veykril/push-nnsoxqrwqkmvLukas Wirth-1/+3
Fix diagnostic enable config being ignored
2024-10-24Fix diagnostic enable config being ignoredLukas Wirth-1/+3
2024-10-24Remove associated type based effects logicMichael Goulet-12/+2
2024-10-24Merge pull request #18390 from ShoyuVanilla/issue-18308Lukas Wirth-9/+98
fix: Prevent public re-export of private item
2024-10-24Bump smol_strLaurențiu Nicola-3/+3
2024-10-24Hide default config in Debug implLaurențiu Nicola-1/+21
2024-10-24Merge pull request #18395 from Wilfred/missing_cfg_for_coreLukas Wirth-3/+4
fix: Add missing cfg flags for `core` crate
2024-10-24Merge pull request #18394 from Wilfred/pretty_print_statusLukas Wirth-1/+1
internal: Pretty-print Config in status command
2024-10-24Rollup merge of #131930 - clubby789:revision-cfg-collide, r=jieyouxuStuart Cook-0/+22
Don't allow test revisions that conflict with built in cfgs Fixes #128964 Sorry `@heysujal` I started working on this about 1 minute before your comment by complete coincidence 😅
2024-10-24compiletest: suppress Windows Error Reporting (WER) for `run-make` tests许杰友 Jieyou Xu (Joe)-9/+17
2024-10-23fix: Add missing cfg flags for `core` crateWilfred Hughes-3/+4
Some types in `core` are conditionally compiled based on `target_has_atomic` or `target_has_atomic_load_store` without an argument, for example `AtomicU64`. This is less noticeable in Cargo projects, where rust-analyzer adds the output `RUSTC_BOOTSTRAP=1 cargo rustc --print cfg` so it gets the full set of cfg flags. This fixes go-to-definition on `std::sync::atomic::AtomicU64` in non-cargo projects.
2024-10-23internal: Pretty-print Config in status commandWilfred Hughes-1/+1
Config can become very big, even for relatively small rust project, and printing everything on one line makes reading the output in VS Code harder.
2024-10-23Merge pull request #18392 from Veykril/veykril/push-wktpkuklnzotLukas Wirth-2/+1
Swap query call order in `file_item_tree_query`
2024-10-23Swap query call order in file_item_tree_queryLukas Wirth-2/+1
2024-10-23internal: log original syntax on panicDavid Barsky-1/+2
2024-10-24fix: Prevent public reexport of private itemShoyu Vanilla-9/+98
2024-10-23Update rustbook to support new test linking in referenceEric Huss-1/+8
2024-10-23Update Cargo.lock due to mdbook extension changesEric Huss-1/+2
2024-10-23Rewrite `label_details_support` condition to be consistent with other parts ↵Jason Boatman-4/+1
of the codebase.
2024-10-23Don't allow test revisions that conflict with built in cfgsclubby789-0/+22
2024-10-23Fix checking for `false` `labelDetailsSupport` value.Jason Boatman-1/+2
2024-10-23fix: Handle missing time offsets gracefullyWilfred Hughes-6/+14
The tracing_subscribe docs state that missing offsets likely mean that we're in a multithreaded context: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/time/struct.OffsetTime.html#method.local_rfc_3339 We're not in a multithreaded context at this point, but some platforms (e.g. OpenBSD) still don't have time offsets available. Since this is only a rust-analyzer debugging convenience, just use system time logging in this situation. Fixes #18384
2024-10-23Fix alphabetical order of handlersGiga Bowser-2/+2
No idea how this slipped past me
2024-10-23Add assist to generate a type alias for a functionGiga Bowser-0/+474
2024-10-23Rollup merge of #131487 - graydon:wasm32v1-none, r=alexcrichtonLeón Orell Valerian Liehr-0/+1
Add wasm32v1-none target (compiler-team/#791) This is a preliminary implementation of the MCP discussed in [compiler-team#791](https://github.com/rust-lang/compiler-team/issues/791). It's not especially "major" but you know, process! Anyway it adds a new wasm32v1-none target which just pins down a set of wasm features. I think this is close to the consensus that emerged when discussing it on Zulip so I figured I'd sketch to see how hard it is. Turns out not very.
2024-10-23Rollup merge of #131181 - dev-ardi:custom-differ, r=jieyouxuLeón Orell Valerian Liehr-37/+57
Compiletest: Custom differ This adds support for a custom differ for compiletests. It’s purely visual and helps produce cleaner output when UI tests fail. I’m using an environment variable for now since it’s experimental and I don’t want to drill the cli arguments all the way down. Also did a bit of general cleanup while I was at it. This is how it looks [with debug info silenced](https://github.com/rust-lang/rust/pull/131182) (#131182) `COMPILETEST_DIFF_TOOL="/usr/bin/env difft --color always --background light --display side-by-side" ./x test tests/ui/parser` ![image](https://github.com/user-attachments/assets/f740ce50-7564-4469-be0a-86e24bc50eb8)
2024-10-23fix: auto-complete import for aliased function and moduleKhanh Duong Quoc-2/+50