about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-12-21Merge from rustcThe Miri Cronjob Bot-6/+8
2024-12-21Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-12-20Update cargoWeihang Lo-0/+0
2024-12-21fix: only show debug lens with a valid rootroife-15/+19
2024-12-21fix: remove always! check for file_id in runnablesroife-16/+3
2024-12-20change config rust-analyzer.statusBar.documentSelector to showStatusBarMark Murphy-35/+62
2024-12-20Revert "internal: Drop proc-macro server support for ~1.66.0 and older ↵Lukas Wirth-30/+48
toolchains"
2024-12-20internal: Standardize how we take iterator parameters in `SyntaxFactory`Giga Bowser-16/+28
2024-12-20Rollup merge of #134514 - bjorn3:more_driver_refactors, r=jieyouxuDianQK-6/+8
Improve dependency_format a bit * Make `DependencyList` an `IndexVec` rather than emulating one using a `Vec` (which was off-by-one as LOCAL_CRATE was intentionally skipped) * Update some comments for the fact that we now use `#[global_allocator]` rather than `extern crate alloc_system;`/`extern crate alloc_jemalloc;` for specifying which allocator to use. We still use a similar mechanism for the panic runtime, so refer to the panic runtime in those comments instead. * An unrelated refactor to `create_and_enter_global_ctxt` I forgot to include in https://github.com/rust-lang/rust/pull/134302. This refactor is too small to be worth it's own PR.
2024-12-20Move ty lowering diagnostic definitions into a separate moduleChayim Refael Friedman-29/+34
To keep them organized.
2024-12-20Merge pull request #18729 from Veykril/push-kyxtnozqzwknLukas Wirth-53/+140
Clear flycheck diagnostics more granularly
2024-12-20Clear all check diagnostics when the workspace changesLukas Wirth-0/+1
2024-12-20Arc the package ids coming from flycheckLukas Wirth-12/+21
2024-12-20Arc the workspace root flycheckLukas Wirth-8/+8
2024-12-20Clear flycheck diagnostics more granularlyLukas Wirth-48/+125
2024-12-20Merge pull request #18723 from ChayimFriedman2/tracing-completeLukas Wirth-360/+596
fix: Fix a case where completion was unable to expand a macro
2024-12-20Fix a case where completion was unable to expand a macroChayim Refael Friedman-360/+596
Which caused the macros of the popular `tracing` crate to not offer completions. The reason is rather complicated: it boils down to macro ignoring their input and completion always choosing the first expansion.
2024-12-20Merge pull request #18728 from Veykril/push-ozqlrzmqklwtLukas Wirth-49/+51
internal: Split `serde` derive feature into `serde_derive` usage
2024-12-20Merge pull request #18702 from ChayimFriedman2/prepLukas Wirth-133/+162
minor: Use a record struct instead of a tuple for each namespace in `PerNs`
2024-12-20internal: Split serde derive feature into `serde_derive` usageLukas Wirth-49/+51
Ideally we'd not have any dependency pull in the derive feature for faster build times, once that is the case this change would have an actual effect. See https://github.com/matklad/macro-dep-test/blob/master/README.md for context.
2024-12-20fmtRalf Jung-411/+211
2024-12-20Merge from rustcRalf Jung-447/+472
2024-12-20Preparing for merge from rustcRalf Jung-1/+1
2024-12-20Show substitution where hovering over generic thingsChayim Refael Friedman-186/+1015
There are few things to note in the implementation: First, this is a best-effort implementation. Mainly, type aliases may not be shown (due to their eager nature it's harder) and partial pathes (aka. hovering over `Struct` in `Struct::method`) are not supported at all. Second, we only need to show substitutions in expression and pattern position, because in type position all generic arguments always have to be written explicitly.
2024-12-20Merge pull request #18726 from Veykril/push-vyzotyqqtpqsLukas Wirth-26/+19
fix: Reduce applicability of unnecessary_async assist
2024-12-20fix: Reduce applicability of unnecessary_async assistLukas Wirth-26/+19
2024-12-20Rollup merge of #133103 - tiif:fnabi, r=RalfJungJacob Pratt-446/+471
Pass FnAbi to find_mir_or_eval_fn https://github.com/rust-lang/miri/issues/4013 needs information from ``FnAbi``, hence it is passed to ``find_mir_or_eval_fn``. r? `@RalfJung`
2024-12-20Merge from rustcThe Miri Cronjob Bot-211/+160
2024-12-20Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-12-19Auto merge of #134516 - matthiaskrgr:rollup-aqwxii0, r=matthiaskrgrbors-10/+10
Rollup of 5 pull requests Successful merges: - #134463 (compiletest: don't register predefined `MSVC`/`NONMSVC` FileCheck prefixes) - #134487 (Add reference annotations for the `coverage` attribute) - #134497 (coverage: Store coverage source regions as `Span` until codegen (take 2)) - #134502 (Update std libc version to 0.2.169) - #134506 (Remove a duplicated check that doesn't do anything anymore.) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-19Auto merge of #133793 - nnethercote:speed-up-expected_tokens, r=spastorinobors-16/+17
Speed up `Parser::expected_tokens` The constant pushing/clearing of `Parser::expected_tokens` during parsing is slow. This PR speeds it up greatly. r? `@estebank`
2024-12-20opt-dist: propagate channel info to bootstrapJieyou Xu-1/+17
2024-12-19Merge pull request #18717 from Veykril/push-pomxnvxotwlrLukas Wirth-7/+11
internal: Set `result_id` for pull diagnostics
2024-12-19Make DependencyList an IndexVecbjorn3-6/+8
2024-12-19internal: Set `result_id` for pull diagnosticsLukas Wirth-7/+11
2024-12-19Rollup merge of #134463 - jieyouxu:filecheck-prefix, r=ZalatharMatthias Krüger-10/+10
compiletest: don't register predefined `MSVC`/`NONMSVC` FileCheck prefixes This was fragile as it was based on host target passed to compiletest, but the user could cross-compile and run test for a different target (e.g. cross from linux to msvc, but msvc won't be set on the target). Furthermore, it was also very surprising as normally revision names (other than `CHECK`) was accepted as FileCheck prefixes. This partially reverts the `MSVC`/`NONMSVC` predefined FileCheck prefix registration introduced historically for some codegen tests. This makes some codegen tests more verbose since they now need to explicitly introduce `MSVC`/`NONMSVC` revisions, but I think that's less surprising, e.g.: ```rs //@ revisions: MSVC NONMSVC //`@[MSVC]` only-msvc //`@[NONMSVC]` ignore-msvc ``` Note that revisions are not *only* FileCheck prefixes in FileCheck-based test suites, as they also can be used to conditionally apply certain compiletest directives. r? `@Zalathar` (or reroll a `r/? compiletest` reviewer) try-job: x86_64-msvc try-job: i686-msvc try-job: x86_64-mingw-1 try-job: i686-mingw
2024-12-19Pass FnAbi to find_mir_or_eval_fntiif-446/+471
2024-12-19compiletest: don't register `MSVC`/`NONMSVC` FileCheck prefixes许杰友 Jieyou Xu (Joe)-10/+10
This was fragile as it was based on host target passed to compiletest, but the user could cross-compile and run test for a different target (e.g. cross from linux to msvc, but msvc won't be set on the target). Furthermore, it was also very surprising as normally revision names (other than `CHECK`) was accepted as FileCheck prefixes.
2024-12-19Auto merge of #134499 - jieyouxu:rollup-zmaveur, r=jieyouxubors-3/+5
Rollup of 7 pull requests Successful merges: - #133702 (Variants::Single: do not use invalid VariantIdx for uninhabited enums) - #134427 (ci: remove duplicate task definition) - #134432 (Fix intra doc links not generated inside footnote definitions) - #134437 (reduce compiler `Assemble` complexity) - #134474 (Forbid overwriting types in typeck) - #134477 (move lint_unused_mut into sub-fn) - #134491 (Some destructor/drop related tweaks) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-19Rollup merge of #133702 - RalfJung:single-variant, r=oli-obk许杰友 Jieyou Xu (Joe)-3/+5
Variants::Single: do not use invalid VariantIdx for uninhabited enums ~~Stacked on top of https://github.com/rust-lang/rust/pull/133681, only the last commit is new.~~ Currently, `Variants::Single` for an empty enum contains a `VariantIdx` of 0; looking that up in the enum variant list will ICE. That's quite confusing. So let's fix that by adding a new `Variants::Empty` case for types that have 0 variants. try-job: i686-msvc
2024-12-19Auto merge of #133961 - lcnr:borrowck-cleanup, r=jackh726bors-1/+1
cleanup region handling: add `LateParamRegionKind` The second commit is to enable a split between `BoundRegionKind` and `LateParamRegionKind`, by avoiding `BoundRegionKind` where it isn't necessary. The third comment then adds `LateParamRegionKind` to avoid having the same late-param region for separate bound regions. This fixes #124021. r? `@compiler-errors`
2024-12-19add warning explaining the limitations of the native code modeRalf Jung-10/+88
2024-12-19Speed up `Parser::expected_token_types`.Nicholas Nethercote-16/+17
The parser pushes a `TokenType` to `Parser::expected_token_types` on every call to the various `check`/`eat` methods, and clears it on every call to `bump`. Some of those `TokenType` values are full tokens that require cloning and dropping. This is a *lot* of work for something that is only used in error messages and it accounts for a significant fraction of parsing execution time. This commit overhauls `TokenType` so that `Parser::expected_token_types` can be implemented as a bitset. This requires changing `TokenType` to a C-style parameterless enum, and adding `TokenTypeSet` which uses a `u128` for the bits. (The new `TokenType` has 105 variants.) The new types `ExpTokenPair` and `ExpKeywordPair` are now arguments to the `check`/`eat` methods. This is for maximum speed. The elements in the pairs are always statically known; e.g. a `token::BinOp(token::Star)` is always paired with a `TokenType::Star`. So we now compute `TokenType`s in advance and pass them in to `check`/`eat` rather than the current approach of constructing them on insertion into `expected_token_types`. Values of these pair types can be produced by the new `exp!` macro, which is used at every `check`/`eat` call site. The macro is for convenience, allowing any pair to be generated from a single identifier. The ident/keyword filtering in `expected_one_of_not_found` is no longer necessary. It was there to account for some sloppiness in `TokenKind`/`TokenType` comparisons. The existing `TokenType` is moved to a new file `token_type.rs`, and all its new infrastructure is added to that file. There is more boilerplate code than I would like, but I can't see how to make it shorter.
2024-12-18Merge pull request #4072 from tiif/blockopOli Scherer-114/+391
Implement blocking unnamed_socket
2024-12-18Auto merge of #134443 - joshtriplett:use-field-init-shorthand, ↵bors-1/+1
r=lqd,tgross35,nnethercote Use field init shorthand where possible Field init shorthand allows writing initializers like `tcx: tcx` as `tcx`. The compiler already uses it extensively. Fix the last few places where it isn't yet used. EDIT: this PR also updates `rustfmt.toml` to set `use_field_init_shorthand = true`.
2024-12-19Implement blocking unnamed_sockettiif-114/+391
2024-12-18introduce `LateParamRegionKind`lcnr-1/+1
2024-12-18Rollup merge of #134420 - Integral-Tech:pathbuf-refactor, r=compiler-errors许杰友 Jieyou Xu (Joe)-8/+7
refactor: replace &PathBuf with &Path to enhance generality - According to [style.md](https://github.com/rust-lang/rust/blob/master/src/tools/rust-analyzer/docs/dev/style.md#useless-types): > More generally, always prefer types on the left ```rust // GOOD BAD &[T] &Vec<T> &str &String Option<&T> &Option<T> &Path &PathBuf ```
2024-12-18Rollup merge of #134253 - nnethercote:overhaul-keywords, r=petrochenkov许杰友 Jieyou Xu (Joe)-75/+12
Overhaul keyword handling The compiler's list of keywords has some problems. - It contains several items that aren't keywords. - The order isn't quite right in a couple of places. - Some of the names of predicates relating to keywords are confusing. - rustdoc and rustfmt have their own (incorrect) versions of the keyword list. - `AllKeywords` is unnecessarily complex. r? ```@jieyouxu```
2024-12-18Rollup merge of #134161 - nnethercote:overhaul-token-cursors, r=spastorino许杰友 Jieyou Xu (Joe)-19/+19
Overhaul token cursors Some nice cleanups here. r? `````@davidtwco`````