about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-11-24Rollup merge of #133405 - Zalathar:style-file, r=jieyouxuMatthias Krüger-9/+13
tidy: Distinguish between two different meanings of "style file" This file contains code that uses “style file” to mean “CSS file”, and other code that uses “style file” to mean “this file, which implements the style checker”. That's very confusing, so it's easier to just say *CSS file* or *this file* as appropriate. No functional change.
2024-11-24Rollup merge of #133371 - RalfJung:is_trivially_const_drop, r=compiler-errorsMatthias Krüger-4/+3
remove is_trivially_const_drop I'm not sure this still brings any perf benefits, so let's benchmark this. r? `@compiler-errors`
2024-11-24tidy: Distinguish between two different meanings of "style file"Zalathar-9/+13
2024-11-23Auto merge of #131859 - chriskrycho:update-trpl, r=onur-ozkanbors-5/+28
Update TRPL to add new Chapter 17: Async and Await - Add support to `rustbook` to pass through the `-L`/`--library-path` flag to `mdbook` so that references to the `trpl` crate - Build the `trpl` crate as part of the book tests. Make it straightforward to add other such book dependencies in the future if needed by implementing that in a fairly general way. - Update the submodule for the book to pull in the new chapter on async and await, as well as a number of other fixes. This will happen organically/automatically in a week, too, but this lets me group this change with the next one: - Update the compiler messages which reference the existing chapters 17–20, which are now chapters 18-21. There are only two, both previously referencing chapter 18. - Update the UI tests which reference the compiler message outputs.
2024-11-23Auto merge of #133242 - lcnr:questionable-uwu, r=compiler-errors,BoxyUwUbors-3/+1
finish `Reveal` removal After #133212 changed the `TypingMode` to be the only source of truth, this entirely rips out `Reveal`. cc #132279 r? `@compiler-errors`
2024-11-23rustbook: fix two small typosChris Krycho-2/+2
2024-11-23Add support for `--library-path` to `rustbook test`Chris Krycho-3/+26
This makes it possible to test an mdbook which has dependencies other than the direct crate for the book itself, e.g. the `trpl` crate used in _The Rust Programming Language_.
2024-11-23no more Reveal :(lcnr-3/+1
2024-11-23Auto merge of #132994 - clubby789:cc-bisect, r=Kobzolbors-2/+2
Update `cc` + bump bootstrap deps https://github.com/rust-lang/rust/pull/132556#issuecomment-2471741435 note: The compiler/library/tools cc bumps have been tested with a try job, the bootstrap changes have not
2024-11-23Auto merge of #132915 - veluca93:unsafe-fields, r=jswrennbors-3/+30
Implement the unsafe-fields RFC. RFC: rust-lang/rfcs#3458 Tracking: - https://github.com/rust-lang/rust/issues/132922 r? jswrenn
2024-11-23remove is_trivially_const_dropRalf Jung-4/+3
2024-11-22Rollup merge of #133208 - ferrocene:split-copyright-html, r=KobzolMichael Goulet-28/+179
generate-copyright: Now generates a library file too. 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 COPYRIGHT.html and COPYRIGHT-library.html. The license-metadata.json file is also now in the tree. We need a CI tool to check that it's correct. r? kobzol Remaining steps: * [ ] Teach CI to double-check the license-metadata.json file is correct * [ ] Add the COPYRIGHT.html and COPYRIGHT-license.html to the releases
2024-11-22Rollup merge of #133311 - RalfJung:miri-sync, r=RalfJung许杰友 Jieyou Xu (Joe)-763/+1530
Miri subtree update r? `@ghost`
2024-11-22generate-copyright: Fixup comment for get_metadata_and_notices.Jonathan Pallant-1/+1
2024-11-21Implement the unsafe-fields RFC.Luca Versari-3/+30
Co-Authored-By: Jacob Pratt <jacob@jhpratt.dev>
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-19`InterpCx` store `TypingEnv` instead of a `ParamEnv`lcnr-13/+13
2024-11-19remove `TypingMode::from_param_env` in clippylcnr-68/+77
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-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-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`