Lukas Wirth
52a03ec237
Merge pull request #18408 from Veykril/veykril/push-ulxyznwzokut
...
fix: Don't compute diagnostics for non local files
2024-10-25 05:55:32 +00:00
Lukas Wirth
8eef1c5275
Add server cancellation support to pull diagnostic handler
2024-10-25 07:39:28 +02:00
Lukas Wirth
eac7840810
Don't compute diagnostics for non local files
2024-10-25 07:28:29 +02:00
Lukas Wirth
169d4469bd
Merge pull request #18407 from hackervole/code-fix-welcome-setup-tips
...
Fix formatting on welcome page, read only paths setting example
2024-10-25 05:15:39 +00:00
Chayim Refael Friedman
bf7edd3783
Shrink TypeRef
from 16 from 32 bytes
...
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-25 06:44:56 +03:00
Chayim Refael Friedman
061e5d7f71
Shrink Path
to 16 bytes
...
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-25 06:44:56 +03:00
HackerVole
d2e856ccc4
editors/code: Add md for walkthrough setup example
...
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-24 23:20:40 -04:00
Chayim Refael Friedman
bccf0062b7
Do not allocate attributes entry if there are no attributes
...
This saves 8mb.
2024-10-25 06:15:06 +03:00
Chayim Refael Friedman
d0933cc097
Shrink ItemTreeSourceMaps
...
This saves 16mb on `analysis-stats .`.
2024-10-25 06:15:06 +03:00
Chayim Refael Friedman
39747cb518
Reuse empty GenericParams
...
This saves back 15mb that went for typeref source maps.
2024-10-25 06:15:06 +03:00
Chayim Refael Friedman
1fae57fa55
Fix memory usage calculation's queries list
2024-10-25 06:15:06 +03:00
Chayim Refael Friedman
89c0ffa6b0
Build source map for hir_def::TypeRef
s
...
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-25 06:15:04 +03:00
bors
771e0ebbfe
Auto merge of #132007 - rustbot:docs-update, r=ehuss
...
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<>` 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-24 22:55:02 +00:00
Giga Bowser
f753ff2242
Rework generate_fn_type_alias
2024-10-24 17:54:58 -04:00
Giga Bowser
a87e1aad81
Add ty_fn_ptr
function to create function pointer type
2024-10-24 17:46:14 -04:00
Laurențiu Nicola
6a67a4d3cd
Merge pull request #18405 from lnicola/fix-changelog
...
internal: Update changelog generation for merge queues
2024-10-24 17:54:25 +00:00
Laurențiu Nicola
333952f623
Update changelog generation for merge queues
2024-10-24 20:40:57 +03:00
Lukas Wirth
58e9871038
Merge pull request #18404 from Veykril/veykril/push-swpmkoqqxrvu
...
feat: Implement diagnostics pull model
2024-10-24 15:22:49 +00:00
Lukas Wirth
8b59541237
feat: Implement diagnostics pull model
2024-10-24 17:09:43 +02:00
bors
23bccaa73a
Auto merge of #123550 - GnomedDev:remove-initial-arc, r=Noratrieb
...
Remove the `Arc` rt::init allocation for thread info
Removes an allocation pre-main by just not storing anything in std:🧵 :Thread for the main thread.
- The thread name can just be a hard coded literal, as was done in #123433 .
- Storing ThreadId and Parker in a static that is initialized once at startup. This uses SyncUnsafeCell and MaybeUninit as this is quite performance critical and we don't need synchronization or to store a tag value and possibly leave in a panic.
2024-10-24 13:35:50 +00:00
Lukas Wirth
6005446327
Merge pull request #18402 from Veykril/veykril/push-wrvtystlszlr
...
internal: Improve proc-macro error msg for failed build scripts
2024-10-24 12:01:29 +00:00
Lukas Wirth
fc4586e3b6
Merge pull request #18401 from Veykril/veykril/push-ulpowvsymyys
...
minor: Remove intermediate allocations
2024-10-24 11:48:27 +00:00
Lukas Wirth
e4a6efb9e0
internal: Improve proc-macro error msg for failed build scripts
2024-10-24 13:45:11 +02:00
Lukas Wirth
98935325ca
minor: Remove intermediate allocations
2024-10-24 13:34:32 +02:00
Khanh Duong Quoc
962d340460
fix: handle aliased pattern and simplify testcase
2024-10-24 20:17:24 +09:00
Khanh Duong Quoc
cf5f1e8620
refactor: separate function for getting import name
2024-10-24 19:57:53 +09:00
Lukas Wirth
c212423912
Merge pull request #18399 from Veykril/veykril/push-nnsoxqrwqkmv
...
Fix diagnostic enable config being ignored
2024-10-24 10:01:22 +00:00
Lukas Wirth
7d0196c35f
Fix diagnostic enable config being ignored
2024-10-24 11:47:12 +02:00
Lukas Wirth
b12fead6da
Merge pull request #18390 from ShoyuVanilla/issue-18308
...
fix: Prevent public re-export of private item
2024-10-24 09:25:06 +00:00
Laurențiu Nicola
16785c8e13
Merge pull request #18396 from lnicola/hide-default-config
...
internal: Hide `Config::default_config`
2024-10-24 07:22:45 +00:00
Laurențiu Nicola
0d3d8910a0
Bump smol_str
2024-10-24 10:08:31 +03:00
Laurențiu Nicola
bf26f58720
Hide default config in Debug impl
2024-10-24 10:07:54 +03:00
Lukas Wirth
6342667ce1
Merge pull request #18395 from Wilfred/missing_cfg_for_core
...
fix: Add missing cfg flags for `core` crate
2024-10-24 06:14:17 +00:00
Lukas Wirth
3f6b0fae83
Merge pull request #18394 from Wilfred/pretty_print_status
...
internal: Pretty-print Config in status command
2024-10-24 06:12:19 +00:00
bors
cf72ce4570
Auto merge of #131951 - notriddle:notriddle/sha256-compile-time, r=GuillaumeGomez
...
rustdoc: hash assets at rustdoc build time
Since sha256 is slow enough to show up on small benchmarks, we can save time by embedding the hash in the executable.
Addresses https://github.com/rust-lang/rust/pull/131934#issuecomment-2424213861
2024-10-24 05:48:56 +00:00
Wilfred Hughes
3e51d145c3
fix: Add missing cfg flags for core
crate
...
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-23 16:43:08 -07:00
Wilfred Hughes
909144f606
internal: Pretty-print Config in status command
...
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-23 15:18:43 -07:00
Lukas Wirth
40492e15d4
Merge pull request #18392 from Veykril/veykril/push-wktpkuklnzot
...
Swap query call order in `file_item_tree_query`
2024-10-23 20:31:49 +00:00
Lukas Wirth
3936dc59f0
Swap query call order in file_item_tree_query
2024-10-23 22:17:37 +02:00
Lukas Wirth
49e85de1eb
Merge pull request #18391 from davidbarsky/david/log-syntax-on-panic
...
internal: log original syntax on panic
2024-10-23 20:10:50 +00:00
David Barsky
e5c656d804
internal: log original syntax on panic
2024-10-23 12:56:00 -07:00
Shoyu Vanilla
685fe4b8dc
fix: Prevent public reexport of private item
2024-10-24 04:26:17 +09:00
Laurențiu Nicola
f0f26053ab
Merge pull request #18388 from jaboatman/master
...
Fix checking for `false` `labelDetailsSupport` value.
2024-10-23 18:33:04 +00:00
Jason Boatman
eed86dd597
Rewrite label_details_support
condition to be consistent with other parts of the codebase.
2024-10-23 13:19:53 -05:00
Jason Boatman
d5ca001578
Fix checking for false
labelDetailsSupport
value.
2024-10-23 12:57:11 -05:00
Laurențiu Nicola
f8ef75aa45
Merge pull request #18386 from Wilfred/missing_offset
...
fix: Handle missing time offsets gracefully
2024-10-23 17:15:23 +00:00
Wilfred Hughes
2b676bfbd7
fix: Handle missing time offsets gracefully
...
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-23 09:57:57 -07:00
Giga Bowser
3f48da27dd
Fix alphabetical order of handlers
...
No idea how this slipped past me
2024-10-23 11:54:48 -04:00
Giga Bowser
7b72a82bcb
Add assist to generate a type alias for a function
2024-10-23 11:31:15 -04:00
Khanh Duong Quoc
c4b097719d
fix: auto-complete import for aliased function and module
2024-10-23 22:11:08 +09:00