about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-11-21Merge pull request #4046 from CraftSpider/windows-error-mappingRalf Jung-3/+64
Fill out windows io error mapping table
2024-11-21Add comment about multiple errors to one ErrorKindRune Tynan-0/+4
2024-11-21eventfd: comment tweaksRalf Jung-9/+13
2024-11-21Fill out Windows error mapping tableRune Tynan-3/+60
2024-11-21Implement the unsafe-fields RFC.Luca Versari-3/+30
Co-Authored-By: Jacob Pratt <jacob@jhpratt.dev>
2024-11-22Refactor AnonSocket::read/writetiif-44/+80
2024-11-21Auto merge of #132629 - nnethercote:124141-preliminaries, r=petrochenkovbors-1/+1
#124141 preliminaries Preliminary changes required to start removing `Nonterminal` (https://github.com/rust-lang/rust/pull/124141). r? `@petrochenkov`
2024-11-21generate-copyright: Now generates a library file too.Jonathan Pallant-27/+178
We only run reuse once, so the output has to be filtered to find only the files that are relevant to the library tree. Outputs build/COPYRIGHT.html and build/COPYRIGHT-library.html.
2024-11-21fmtRalf Jung-6/+2
2024-11-21Merge from rustcRalf Jung-99/+111
2024-11-21Preparing for merge from rustcRalf Jung-1/+1
2024-11-20trophy case: add RwLock::downgrade bugRalf Jung-0/+1
2024-11-21Introduce `InvisibleOrigin` on invisible delimiters.Nicholas Nethercote-1/+1
It's not used meaningfully yet, but will be needed to get rid of interpolated tokens.
2024-11-20Merge pull request #4026 from eduardosm/soft-sqrtRalf Jung-68/+219
miri: implement square root without relying on host floats
2024-11-20miri: implement square root without relying on host floatsEduardo Sánchez Muñoz-68/+219
2024-11-20Auto merge of #131326 - dingxiangfei2009:issue-130836-attempt-2, r=nikomatsakisbors-0/+1
Reduce false positives of tail-expr-drop-order from consumed values (attempt #2) r? `@nikomatsakis` Tracked by #123739. Related to #129864 but not replacing, yet. Related to #130836. This is an implementation of the approach suggested in the [Zulip stream](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/temporary.20drop.20order.20changes). A new MIR statement `BackwardsIncompatibleDrop` is added to the MIR syntax. The lint now works by inspecting possibly live move paths before at the `BackwardsIncompatibleDrop` location and the actual drop under the current edition, which should be one before Edition 2024 in practice.
2024-11-20Auto merge of #133251 - matthiaskrgr:rollup-gjeis3q, r=matthiaskrgrbors-12/+15
Rollup of 3 pull requests Successful merges: - #131904 (Stabilize const_pin_2) - #133239 (Fix LLVM target triple for `x86_64-win7-windows-msvc`) - #133241 (interpret: make typing_env field private) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-20reduce false positives of tail-expr-drop-order from consumed valuesDing Xiang Fei-0/+1
take 2 open up coroutines tweak the wordings the lint works up until 2021 We were missing one case, for ADTs, which was causing `Result` to yield incorrect results. only include field spans with significant types deduplicate and eliminate field spans switch to emit spans to impl Drops Co-authored-by: Niko Matsakis <nikomat@amazon.com> collect drops instead of taking liveness diff apply some suggestions and add explantory notes small fix on the cache let the query recurse through coroutine new suggestion format with extracted variable name fine-tune the drop span and messages bugfix on runtime borrows tweak message wording filter out ecosystem types earlier apply suggestions clippy check lint level at session level further restrict applicability of the lint translate bid into nop for stable mir detect cycle in type structure
2024-11-20Auto merge of #133227 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 5 commits in 69e595908e2c420e7f0d1be34e6c5b984c8cfb84..66221abdeca2002d318fde6efff516aab091df0e 2024-11-16 01:26:11 +0000 to 2024-11-19 21:30:02 +0000 - Docs for optional registry JSON fields (rust-lang/cargo#14839) - Allow registries to omit empty/default fields in JSON (rust-lang/cargo#14838) - docs(unstable): Link to -Zwarnings issue, tracking issue (rust-lang/cargo#14836) - fix(): error context for git_fetch refspec not found (rust-lang/cargo#14806) - you we distinction (rust-lang/cargo#14829)
2024-11-20interpret: make typing_env field privateRalf Jung-12/+15
2024-11-20Auto merge of #133212 - lcnr:questionable-uwu, r=compiler-errorsbors-100/+107
continue `ParamEnv` to `TypingEnv` transition cc #132279 r? `@compiler-errors`
2024-11-20Merge from rustcThe Miri Cronjob Bot-5/+5
2024-11-20Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-11-19Update cargoWeihang Lo-0/+0
2024-11-19Rollup merge of #133201 - nnethercote:rm-TokenKind-InvalidPrefix, ↵Matthias Krüger-1/+1
r=compiler-errors Remove `TokenKind::InvalidPrefix` It's not needed. Best reviewed one commit at a time. r? `@estebank`
2024-11-19Merge pull request #18485 from ↵David Barsky-6/+10
davidkurilla/feat-migrate-add_braces-to-use-SyntaxFactory feat: convert add_braces to SyntaxFactory SyntaxEditor abstraction
2024-11-19Merge pull request #18521 from tareknaser/syntax_factory_reorder_impl_itemsDavid Barsky-7/+14
Migrate `reorder_impl_items` Assist to Use `SyntaxFactory`
2024-11-19`InterpCx` store `TypingEnv` instead of a `ParamEnv`lcnr-13/+13
2024-11-19remove `TypingMode::from_param_env` in clippylcnr-68/+77
2024-11-19Merge pull request #18529 from ↵Laurențiu Nicola-1/+103
cmrschwarz/allow_leading_whitespace_in_merge_match_arms Improve selection handling for the `merge_match_arms` assist
2024-11-19Merge pull request #18459 from Giga-Bowser/match-placeholdersLaurențiu Nicola-113/+128
feat: Use snippet placeholders for generated match arms
2024-11-19move `fn is_item_raw` to `TypingEnv`lcnr-27/+25
2024-11-19Merge pull request #4035 from discord9/masterRalf Jung-32/+57
refactor: refine thread variant for windows
2024-11-19refactor: refine thread variant for windowsdiscord9-32/+57
2024-11-19Rollup merge of #132577 - Urgau:check-cfg-report-extern-macro, r=petrochenkovMatthias Krüger-5/+5
Report the `unexpected_cfgs` lint in external macros This PR marks the `unexpected_cfgs` lint as being reportable in external macros, as it's probably not the intention of the macro author to leave ineffective cfgs in the users code. Fixes #132572 try-job: aarch64-gnu-debug
2024-11-19improve selection handling for `merge_match_arms`Christian Schwarz-1/+103
2024-11-19Remove `TokenKind::InvalidPrefix`.Nicholas Nethercote-1/+1
It was added in #123752 to handle some cases involving emoji, but it isn't necessary because it's always treated the same as `TokenKind::InvalidIdent`. This commit removes it, which makes things a little simpler.
2024-11-19fmtThe Miri Cronjob Bot-6/+4
2024-11-19Merge from rustcThe Miri Cronjob Bot-104/+131
2024-11-19Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-11-19Merge pull request #4039 from RalfJung/root-dirOli Scherer-13/+8
use -Zroot-dir instead of --remap-path-prefix for diagnostic dir handling
2024-11-18Re-add rust-analyzer.cargo.sysrootQueryMetadataDavid Richey-51/+150
2024-11-18Auto merge of #132460 - lcnr:questionable-uwu, r=compiler-errorsbors-89/+99
Use `TypingMode` throughout the compiler instead of `ParamEnv` Hopefully the biggest single PR as part of https://github.com/rust-lang/types-team/issues/128. ## `infcx.typing_env` while defining opaque types I don't know how'll be able to correctly handle opaque types when using something taking a `TypingEnv` while defining opaque types. To correctly handle the opaques we need to be able to pass in the current `opaque_type_storage` and return constraints, i.e. we need to use a proper canonical query. We should migrate all the queries used during HIR typeck and borrowck where this matters to proper canonical queries. This is ## `layout_of` and `Reveal::All` We convert the `ParamEnv` to `Reveal::All` right at the start of the `layout_of` query, so I've changed callers of `layout_of` to already use a post analysis `TypingEnv` when encountering it. https://github.com/rust-lang/rust/blob/ca87b535a05097df6abbe2a031b057de2cefac5b/compiler/rustc_ty_utils/src/layout.rs#L51 ## `Ty::is_[unpin|sized|whatever]` I haven't migrated `fn is_item_raw` to use `TypingEnv`, will do so in a followup PR, this should significantly reduce the amount of `typing_env.param_env`. At some point there will probably be zero such uses as using the type system while ignoring the `typing_mode` is incorrect. ## `MirPhase` and phase-transitions When inside of a MIR-body, we can mostly use its `MirPhase` to figure out the right `typing_mode`. This does not work during phase transitions, most notably when transitioning from `Analysis` to `Runtime`: https://github.com/rust-lang/rust/blob/dae7ac133b9eda152784c075facb31a6688c92b1/compiler/rustc_mir_transform/src/lib.rs#L606-L625 All these passes still run with `MirPhase::Analysis`, but we should only use `Reveal::All` once we're run the `RevealAll` pass. This required me to manually construct the right `TypingEnv` in all these passes. Given that it feels somewhat easy to accidentally miss this going forward, I would maybe like to change `Body::phase` to an `Option` and replace it at the start of phase transitions. This then makes it clear that the MIR is currently in a weird state. r? `@ghost`
2024-11-18use -Zroot-dir instead of --remap-path-prefix for diagnostic dir handlingRalf Jung-13/+8
2024-11-18Update `xshell` and `xshell-macros` to v0.2.7Urgau-5/+5
2024-11-18use `TypingEnv` when no `infcx` is availablelcnr-89/+99
the behavior of the type system not only depends on the current assumptions, but also the currentnphase of the compiler. This is mostly necessary as we need to decide whether and how to reveal opaque types. We track this via the `TypingMode`.
2024-11-18Rollup merge of #133158 - lnicola:sync-from-ra, r=lnicolaJacob Pratt-15/+32
Subtree update of `rust-analyzer` r? `@ghost`
2024-11-18Merge from rustcThe Miri Cronjob Bot-157/+183
2024-11-18Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-11-17Auto merge of #120370 - x17jiri:likely_unlikely_fix, r=saethlinbors-1/+1
Likely unlikely fix RFC 1131 ( https://github.com/rust-lang/rust/issues/26179 ) added likely/unlikely intrinsics, but they have been broken for a while: https://github.com/rust-lang/rust/issues/96276 , https://github.com/rust-lang/rust/issues/96275 , https://github.com/rust-lang/rust/issues/88767 . This PR tries to fix them. Changes: - added a new `cold_path()` intrinsic - `likely()` and `unlikely()` changed to regular functions implemented using `cold_path()`