about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-10-21Auto merge of #130950 - compiler-errors:yeet-eval, r=BoxyUwUbors-35/+30
Continue to get rid of `ty::Const::{try_}eval*` This PR mostly does: * Removes all of the `try_eval_*` and `eval_*` helpers from `ty::Const`, and replace their usages with `try_to_*`. * Remove `ty::Const::eval`. * Rename `ty::Const::normalize` to `ty::Const::normalize_internal`. This function is still used in the normalization code itself. * Fix some weirdness around the `TransmuteFrom` goal. I'm happy to split it out further; for example, I could probably land the first part which removes the helpers, or the changes to codegen which are more obvious than the changes to tools. r? BoxyUwU Part of https://github.com/rust-lang/rust/issues/130704
2024-10-21bootstrap: move `builder.rs` under `builder/` directory许杰友 Jieyou Xu (Joe)-0/+0
2024-10-21bootstrap: minor docs cleanup许杰友 Jieyou Xu (Joe)-12/+15
2024-10-21bootstrap: extract builder cargo to its own module许杰友 Jieyou Xu (Joe)-1211/+1226
I found builder.rs to be a massive file which made it hard to digest. To make `RUSTFLAGS` usage hardening easier later, I extracted the cargo part in `builder.rs` into its own module.
2024-10-21Add the WASM | WASI | Emscripten notification groups (#2100)Juniper Tyree-2/+84
2024-10-21Auto merge of #120869 - devnexen:update_fbsd_ci, r=Mark-Simulacrumbors-20/+20
ci update freebsd version proposal, freebsd 12 being eol raising to the lowest still active supported freebsd version. From 13.1 (already eol too), freebsd introduces a cpu affinity layer with linux. It also introduces a api compatible copy_file_range which can be used like its linux's counterpart. The former is essential to build https://github.com/rust-lang/rust/pull/120589, therefore breaks the backward compatibility with the previous FreeBSD releases. Blocked on https://github.com/rust-lang/rust/issues/130465
2024-10-20Auto merge of #131980 - matthiaskrgr:rollup-iy5nw71, r=matthiaskrgrbors-7/+22
Rollup of 5 pull requests Successful merges: - #131814 (`optimize` attribute applied to things other than methods/functions/c…) - #131927 (Check for filecheck directives in files marked `skip-filecheck`) - #131967 (Remove `lower_mono_bounds`) - #131973 (fix(rustdoc-json-types): document rustc-hash feature) - #131976 (feat(rustdoc-json-types): mark simple enums as copy) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-20Auto merge of #18354 - roife:safe-kw-2, r=lnicolabors-11/+11
fix: classify `safe` as a contextual kw fix #18352
2024-10-20Rollup merge of #131976 - jalil-salame:rustdoc-types-copy-enums, r=aDotInTheVoidMatthias Krüger-7/+7
feat(rustdoc-json-types): mark simple enums as copy Fixes rust-lang/rustdoc-types#26 and some typos in the documentation r? `@aDotInTheVoid` I have been assigning these PRs to you `@aDotInTheVoid,` is that okay? I think I'm out of PRs for now, but for future reference c:
2024-10-20Rollup merge of #131973 - jalil-salame:rustdoc-types-document-feature, ↵Matthias Krüger-0/+12
r=aDotInTheVoid fix(rustdoc-json-types): document rustc-hash feature The `rustc-hash` feature is publicly exposed by the `rustdoc-types`. It is already documented in that crate's README and Cargo.toml, but we might as well add some information to the crate docs themselves c: Follow up to: - #131936 - [rust-lang/rustdoc-types#42][1] [1]: https://github.com/rust-lang/rustdoc-types/pull/42 r? `@aDotInTheVoid`
2024-10-20Rollup merge of #131927 - clubby789:skip-filecheck-directives, r=Mark-SimulacrumMatthias Krüger-0/+3
Check for filecheck directives in files marked `skip-filecheck` cc #116971
2024-10-20Auto merge of #131949 - Noratrieb:fxhashup-thanks-alona, r=WaffleLapkinbors-3/+3
Update rustc-hash to version 2 but again it's like #129533 but not closed by bors and rebased r? WaffleLapkin meow
2024-10-21fix: classify `safe` as a contextual kwroife-11/+11
2024-10-20fix(rustdoc-json-types): typosJalil David Salamé Messina-4/+4
Typos found some typos in the file, so I fixed them c:
2024-10-20feat(rustdoc-json-types): mark simple enums as copyJalil David Salamé Messina-3/+3
Fixes [rust-lang/rustdoc-types#26](https://github.com/rust-lang/rustdoc-types/issues/26)
2024-10-20fix(rustdoc-json-types): document rustc-hash featureJalil David Salamé Messina-0/+12
The `rustc-hash` feature is publicly exposed by the `rustdoc-types`. It is already documented in that crate's README and Cargo.toml, but we might as well add some information to the crate docs themselves c: Follow up to: - #131936 - [rust-lang/rustdoc-types#42][1] [1]: https://github.com/rust-lang/rustdoc-types/pull/42
2024-10-20Store patterns desugared from destructuring assignments in source mapChayim Refael Friedman-174/+280
And few more fixups. I was worried this will lead to more memory usage since `ExprOrPatId` is double the size of `ExprId`, but this does not regress `analysis-stats .`. If this turns out to be a problem, we can easily use the high bit to encode this information.
2024-10-20Handle destructuring assignments uniformlyChayim Refael Friedman-707/+886
Instead of lowering them to `<expr> = <expr>`, then hacking on-demand to resolve them, we lower them to `<pat> = <expr>`, and use the pattern infrastructure to handle them. It turns out, destructuring assignments are surprisingly similar to pattern bindings, and so only minor modifications are needed. This fixes few bugs that arose because of the non-uniform handling (for example, MIR lowering not handling slice and record patterns, and closure capture calculation not handling destructuring assignments at all), and furthermore, guarantees we won't have such bugs in the future, since the programmer will always have to explicitly handle `Expr::Assignment`. Tests don't pass yet; that's because the generated patterns do not exist in the source map. The next commit will fix that.
2024-10-20Remove now-incorrect codeChayim Refael Friedman-8/+0
Because our lint infra *can* handle allows from within macro expansions! (Also, what did this reason have to do with something that is a hard error and not a lint? I'm puzzled). I wonder how many such diagnostics we have... Maybe that also mean we can change `unused_mut` to no-longer-experimental? But this is a change I'm afraid to do without checking.
2024-10-20Update Cargo.lockChayim Refael Friedman-5/+5
2024-10-20Rollup merge of #131961 - jieyouxu:dirty, r=ZalatharMatthias Krüger-9/+7
compiletest: tidy up how `tidy` and `tidy` (html version) are disambiguated Rename `has_tidy` -> `has_html_tidy` (`tidy` is also a bootstrap tool, but rustdoc uses a html tidy that has the same binary name). Follow-up to #131941. Also apparently `runtest.rs` is short enough now, we can delete the `tidy` (bootstrap version) ignore for file length.
2024-10-20Rollup merge of #131926 - clubby789:configure-enable, r=KobzolMatthias Krüger-1/+2
Align boolean option descriptions in `configure.py` Boolean options are currently printed as ``` Options --enable-debug OR --disable-debug enables debugging environment; does not affect optimization of bootstrapped code --enable-docs OR --disable-docs build standard library documentation --enable-compiler-docs OR --disable-compiler-docs build compiler documentation --enable-optimize-tests OR --disable-optimize-tests build tests with optimizations --enable-verbose-tests OR --disable-verbose-tests enable verbose output when running tests --enable-ccache OR --disable-ccache invoke gcc/clang via ccache to reuse object files between builds --enable-sccache OR --disable-sccache invoke gcc/clang via sccache to reuse object files between builds --enable-local-rust OR --disable-local-rust use an installed rustc rather than downloading a snapshot --local-rust-root=VAL set prefix for local rust binary --enable-local-rebuild OR --disable-local-rebuild assume local-rust matches the current version, for rebuilds; implies local-rust, and is implied if local-rust already matches the current version ``` as of #131117 imo, this is a little difficult to skim. This PR changes this to align the `OR`s and push the description onto a newline: ``` Options --enable-debug OR --disable-debug enables debugging environment; does not affect optimization of bootstrapped code --enable-docs OR --disable-docs build standard library documentation --enable-compiler-docs OR --disable-compiler-docs build compiler documentation --enable-optimize-tests OR --disable-optimize-tests build tests with optimizations --enable-verbose-tests OR --disable-verbose-tests enable verbose output when running tests --enable-ccache OR --disable-ccache invoke gcc/clang via ccache to reuse object files between builds --enable-sccache OR --disable-sccache invoke gcc/clang via sccache to reuse object files between builds --enable-local-rust OR --disable-local-rust use an installed rustc rather than downloading a snapshot --local-rust-root=VAL set prefix for local rust binary --enable-local-rebuild OR --disable-local-rebuild assume local-rust matches the current version, for rebuilds; implies local-rust, and is implied if local-rust already matches the current version ```
2024-10-20Rollup merge of #131647 - jieyouxu:unicode-table-generator, r=Mark-SimulacrumMatthias Krüger-5/+27
Register `src/tools/unicode-table-generator` as a runnable tool It seems like `src/tools/unicode-table-generator` is not currently managed by bootstrap. This PR wires it up with bootstrap as a runnable tool. This tool seems to take two possible args: 1. (Mandatory) path to `library/core/src/unicode/unicode_data.rs`, and 2. (Optional) path to generate a test file. I only passed the mandatory path to `unicode_data.rs` in bootstrap and didn't do anything about (2). I'm not sure about how this tool is supposed to be run. `Cargo.lock` is modified because I renamed `unicode-table-generator`'s bin name to match the tool name, as bootstrap's tool running logic expects the bin name to be derived from the tool name. I also added a triagebot message to remind to not manually edit the library source file and edit the tool then regenerate instead, but this should probably be a tidy check (if that's desirable then that can be in a follow-up PR, though may be overkill). Helps with #131640 but does not close it because still no docs. r? `@Mark-Simulacrum` (since I think you authored this tool?)
2024-10-20Rollup merge of #131365 - heiseish:fix-issue-101993, r=Mark-SimulacrumMatthias Krüger-5/+79
Fix missing rustfmt in msi installer #101993 # Context - Fixed missing `rustfmt`, `clippy`, `miri` and `rust-analyzer` in msi installer - Fixed missing `rustfmt` for apple darwin installer - Closes #101993 r​? `@jyn514` - Please let me know if I should request from someone else instead. I divided the changes into 3 separate commits for the ease of review. The refactoring commit `fbdfd5c03c3c979bcf105ccdd05ff4ab9f37a763` is a bit more involved, but I think it helps in the long term for readability and to avoid bugs. - I changed `build-manifest` to `build_manifest` in order to invoke it as a library. Not sure if this is gonna break any upstream processes. I checked `generate-manifest-list` and `generate-release` but didn't find any obvious reference - Will push fixes for linting later
2024-10-20Rollup merge of #121560 - Noratrieb:stop-lint-macro-nonsense, r=jieyouxuMatthias Krüger-1/+0
Allow `#[deny]` inside `#[forbid]` as a no-op Forbid cannot be overriden. When someome tries to do this anyways, it results in a hard error. That makes sense. Except it doesn't, because macros. Macros may reasonably use `#[deny]` (or `#[warn]` for an allow-by-default lint) in their expansion to assert that their expanded code follows the lint. This is doesn't work when the output gets expanded into a `forbid()` context. This is pretty silly, since both the macros and the code agree on the lint! By making it a warning instead, we remove the problem with the macro, which is now nothing as warnings are suppressed in macro expanded code, while still telling users that something is up. fixes #121483
2024-10-20Rip out old effects var handling code from traitsMichael Goulet-23/+1
2024-10-20make unsupported_calling_conventions a hard errorRalf Jung-14/+14
2024-10-20fix: do not emit unsafe diagnositcs for safe statics in extern blocksroife-3/+62
2024-10-20add TestFloatParse to tools for bootstraplucarlig-3/+33
2024-10-20run git commands in bootstrap in parallelThe 8472-14/+46
this saves about 150ms on many ./x invocations
2024-10-20Limited -Zregparm support (no Rust calling conv) descriptionsAndrew Zhogin-1/+1
Co-authored-by: Jubilee <workingjubilee@gmail.com>
2024-10-20feat: initial support for safe_kw in extern blocksroife-9/+264
2024-10-20Update rustc-hash to version 2Noratrieb-3/+3
This brings in the new algorithm.
2024-10-20compiletest: disambiguate between `tidy` and `tidy` (html version)许杰友 Jieyou Xu (Joe)-9/+7
2024-10-20Auto merge of #131957 - GuillaumeGomez:rm-unused, r=notriddlebors-21/+9
Remove unused `recoverable` argument in collect_intra_doc_links r? `@notriddle`
2024-10-20fmtThe Miri Cronjob Bot-2/+7
2024-10-20Merge from rustcThe Miri Cronjob Bot-3141/+6811
2024-10-20Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-10-20Rollup merge of #131945 - aDotInTheVoid:footnote-time, r=notriddleStuart Cook-79/+118
rustdoc: Clean up footnote handling Best reviewed commit by commit. Extracts footnote handling logic into it's own file (first commit) and then makes that file slightly nicer to read/understand. No functional changes, but lays the groundwork for making more changes to footnotes (eg #131901, #131946)
2024-10-20Rollup merge of #131942 - workingjubilee:reduce-haruspicy, r=lukas-code,lnicolaStuart Cook-5/+4
compiler: Adopt rust-analyzer impls for `LayoutCalculatorError` We're about to massively churn the internals of `rustc_abi`. To minimize the immediate and future impact on rust-analyzer, as a subtree that depends on this crate, grow some API on `LayoutCalculatorError` that reflects their uses of it. This way we can nest the type in theirs, and they can just call functions on it without having to inspect and flatten-out its innards.
2024-10-20Rollup merge of #131941 - lolbinarycat:compiletest-need-html-tidy, r=clubby789Stuart Cook-1/+1
compiletest: disambiguate html-tidy from rust tidy tool when i first saw this error message i was very confused, i thought it was talking about `src/tools/tidy`. now it should be much more clear what tool should be installed.
2024-10-20Remove unused `recoverable` argument in collect_intra_doc_linksGuillaume Gomez-21/+9
2024-10-19rustdoc: hash assets at rustdoc build timeMichael Howell-14/+58
Since sha256 is slow enough to show up on small benchmarks, we can save time by embedding the hash in the executable.
2024-10-19docs: remove `result_ffi_guarantees` from unstable bookJubilee Young-14/+0
2024-10-19Rollup merge of #131936 - jalil-salame:rustdoc-types-rustc-hash, r=aDotInTheVoidMatthias Krüger-6/+14
feat(rustdoc-json-types): introduce rustc-hash feature This allows the public `rustdoc-types` crate to expose this feature easily and allows consumers of the crate to get the performance advantages from doing so. The reasoning for this was discussed on [Zulip][1] Changes: - Make `rustc-hash` optional but default to including it - Rename all occurrences of `FxHashMap` to `HashMap`. - Feature gate the import and rename the imported `FxHashMap` to `HashMap` - Introduce a type alias `FxHashMap` which resolves to the currently used `HashMap` (`rustc_hash::FxHashMap` or `std::collections::HashMap`) for use in `src/librustdoc`. [1]: https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/rustc-hash.20and.20performance.20of.20rustdoc-types **extra context from the zulip thread:** - `@obi1kenobi` requested benchmarks of the switch to `rustc-hash` - I benchmarked switching `rustdoc-types` to `rustc-hash` which yielded a ~300ms improvement to `cargo-semver-checks`'s index building step (this step is done twice so the improvements are ~150ms per index). - The benchmarks were presented in Zulip and people were in favor of introducing `rustc-hash` to the public `rustdoc-types` crate. - There were differing opinions on how to introduce the dependency: 1. "Hard" dependency: remove use of `std::collections::HashMap` in favor of `FxHashMap`. 2. "Soft" dependency: make optional and introduce a feature then enable/disable it by default (this PR). 3. ~~Make `rustdoc-types` generic and expose the `RandomState`~~ (a lot of work & complexity for little gain over a feature gate). `@obi1kenobi` and I prefer the feature gate so that is what I am adding here. My reasons for the preference are: - `cargo-semver-checks` is especially perf sensitive, we don't expect people to care about ~150ms extra time when reading in a 500MB file (the size of the sample we used for benchmarking). - Keeping `rustdoc-types` lean by having its only direct dependency be `serde` is nice for the general consumer of the crate. - `rustc-hash` is not HashDOS resistant (but it is questionable whether `rustdoc-types` would be used on adversarial inputs). r? `@aDotInTheVoid`
2024-10-19Rollup merge of #131925 - clubby789:redundant-revision-cfg, r=jieyouxuMatthias Krüger-1/+13
Warn on redundant `--cfg` directive when revisions are used r? ``@jieyouxu`` Fixes #131390 Not sure of the best way to test this
2024-10-19rustdoc: Refractor footnote handlingAlona Enraght-Moony-36/+67
2024-10-19compiletest: disambiguate html-tidy from rust tidy toolbinarycat-1/+1
2024-10-19rust-analyzer: Nest `LayoutCalculatorError` in `hir_ty::LayoutError`Jubilee Young-5/+4
2024-10-19Fix testsMichael Goulet-35/+30