about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-01-07Rollup merge of #135199 - joshtriplett:unnecessary-to-string, r=lqdGuillaume Gomez-5/+4
Eliminate an unnecessary `Symbol::to_string`; use `as_str`
2025-01-07Rollup merge of #135198 - joshtriplett:str-is-a-type, r=jieyouxuGuillaume Gomez-34/+34
Avoid naming variables `str` This renames variables named `str` to other names, to make sure `str` always refers to a type. It's confusing to read code where `str` (or another standard type name) is used as an identifier. It also produces misleading syntax highlighting.
2025-01-07Rollup merge of #135193 - onur-ozkan:tidy-cache-invalidation, r=jieyouxuGuillaume Gomez-7/+10
don't bless `proc_macro_deps.rs` unless it's necessary Running tidy with `--bless` flag is breaking the build cache as tidy updates mtime of `proc_macro_deps.rs` (https://github.com/rust-lang/rust/pull/134865) unconditionally and that leads cargo to recompile tidy. This patch fixes that.
2025-01-07Rollup merge of #135189 - Urgau:triagebot-html-ignored, r=lqdGuillaume Gomez-1/+1
Remove workaround from pull request template This PR removes the workaround (`\`) from our pull request template as triagebot/rustbot now ignores HTML blocks. cf. https://github.com/rust-lang/triagebot/pull/1869 cc `@jieyouxu` r? `@ehuss`
2025-01-07Rollup merge of #135187 - onur-ozkan:release-fix, r=pietroalbiniGuillaume Gomez-1/+12
apply a workaround fix for the release roadblock This has been a problem since the last two releases. r? pietroalbini
2025-01-07Rollup merge of #135182 - scottmcm:box-deref-via-transmute, r=oli-obkGuillaume Gomez-28/+29
Transmute from NonNull to pointer when elaborating a box deref (MCP807) Since per https://github.com/rust-lang/compiler-team/issues/807 we have to stop projecting into `NonNull`. cc https://github.com/rust-lang/rust/issues/133652
2025-01-07Rollup merge of #135177 - maurer:rename-module, r=nikicGuillaume Gomez-17/+5
llvm: Ignore error value that is always false See llvm/llvm-project#121851 For LLVM 20+, this function (`renameModuleForThinLTO`) has no return value. For prior versions of LLVM, this never failed, but had a signature which allowed an error value people were handling. `@rustbot` label: +llvm-main r? `@nikic` Wait a moment before approving while the llvm-main infrastructure picks it up.
2025-01-07Rollup merge of #135174 - xingxue-ibm:reproducible-build-aix, r=jieyouxuGuillaume Gomez-3/+44
[AIX] Port test case run-make/reproducible-build The test case `run-make/reproducible-build` verifies that two identical invocations of the compiler produce the same output by comparing the linker arguments, resulting binaries, and other artifacts. However, the AIX linker command includes an argument that specifies the file containing exported symbols, with a file path that contains a randomly generated substring to prevent collisions between different linking processes. Additionally, the AIX XCOFF file header includes a 4-byte timestamp. This PR replaces the random substring with a placeholder and nullifies the timestamp field in the XCOFF files for the comparisons.
2025-01-07Rollup merge of #135081 - mrkajetanp:jemalloc-64k, r=KobzolGuillaume Gomez-0/+9
bootstrap: Build jemalloc with support for 64K pages By default, jemalloc is built to only support the same page size as the host machine. Set an env variable so that jemalloc is built with support for page sizes up to 64K regardless of the host machine. r? `@Kobzol` Resolves #134563 Potentially resolves #133748 (needs verification) ---- Results from local rustc-perf testing below, within 0.5% on every metric except max-rss. AArch64: ![Screenshot 2025-01-03 at 5 53 13 pm](https://github.com/user-attachments/assets/71705c59-7d7b-4753-a184-8c784233e603) x86_64: ![Screenshot 2025-01-03 at 5 54 16 pm](https://github.com/user-attachments/assets/ea28aded-3b90-43f4-a965-b081b07b95ab)
2025-01-07Avoid naming variables `str`Josh Triplett-34/+34
This renames variables named `str` to other names, to make sure `str` always refers to a type. It's confusing to read code where `str` (or another standard type name) is used as an identifier. It also produces misleading syntax highlighting.
2025-01-07Eliminate an unnecessary `Symbol::to_string`; use `as_str`Josh Triplett-5/+4
2025-01-07don't bless `proc_macro_deps.rs` unless it's necessaryonur-ozkan-7/+10
Running tidy with `--bless` flag is breaking the build cache as tidy updates mtime of `proc_macro_deps.rs` unconditionally and that leads cargo to recompile tidy. This patch fixes that. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-07Auto merge of #135173 - pietroalbini:pa-fix-rvp, r=workingjubileebors-7/+7
Avoid replacing the definition of `CURRENT_RUSTC_VERSION` Before this PR, replace-version-placeholder hardcoded the path defining CURRENT_RUSTC_VERSION (to avoid replacing it). After a refactor moved the file defining it without changing the hardcoded path, the tool started replacing the constant itself with the version number. To avoid this from happening in the future, this changes the definition of the constant to avoid the tool from ever matching it. r? `@workingjubilee`
2025-01-07Remove workaround from pull request templateUrgau-1/+1
as triagebot/rustbot now ignores HTML blocks. cf. https://github.com/rust-lang/triagebot/pull/1869
2025-01-07apply a workaround fix for the release blocker issueonur-ozkan-1/+12
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-06bootstrap: Build jemalloc for AArch64 with support for 64K pagesKajetan Puchalski-0/+9
By default, jemalloc is built to only support the same page size as the host machine. For AArch64 targets, set an env variable so that jemalloc is built with support for page sizes up to 64K regardless of the host machine.
2025-01-07Auto merge of #135183 - jhpratt:rollup-qwg4pm0, r=jhprattbors-123/+812
Rollup of 9 pull requests Successful merges: - #131830 (Add support for wasm exception handling to Emscripten target) - #132345 (Improve diagnostics for `HostEffectPredicate` in the new solver) - #134568 (Release notes for 1.84.0) - #134744 (Don't ice on bad transmute in typeck in new solver) - #135090 (Suggest to replace tuple constructor through projection) - #135116 (rustdoc: Fix mismatched capitalization in sidebar) - #135126 (mark deprecated option as deprecated in rustc_session to remove copypasta and small refactor) - #135139 ([generic_assert] Constify methods used by the formatting system) - #135170 (Update triagebot.toml: celinval vacation is over) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-06Rollup merge of #135170 - celinval:chores-vacation-end, r=jieyouxuJacob Pratt-2/+1
Update triagebot.toml: celinval vacation is over I'm also removing myself from the MIR syntax changes notifications.
2025-01-06Rollup merge of #135139 - c410-f3r:8-years-rfc, r=jhprattJacob Pratt-31/+11
[generic_assert] Constify methods used by the formatting system cc #44838 Starts the "constification" of all the elements required to allow the execution of the formatting system in constant environments. ```rust const _: () = { panic!("{:?}", 1i32); }; ``` Further stuff is blocked by #133999.
2025-01-06Rollup merge of #135126 - klensy:deprecated-and-do-nothing, r=jieyouxuJacob Pratt-34/+78
mark deprecated option as deprecated in rustc_session to remove copypasta and small refactor This marks deprecated options as deprecated via flag in options table in rustc_session, which removes copypasted deprecation text from rustc_driver_impl. This also adds warning for deprecated `-C ar` option, which didn't emitted any warnings before. Makes `inline_threshold` `[UNTRACKED]`, as it do nothing. Adds few tests. See individual commits.
2025-01-06Rollup merge of #135116 - camelid:sidebar-case, r=fmeaseJacob Pratt-3/+3
rustdoc: Fix mismatched capitalization in sidebar Previously, the main content used "Aliased Type", while the sidebar said "Aliased type". Now, they both say "Aliased Type", which is the more common capitalization in Rustdoc. See the following link for an example. https://doc.rust-lang.org/1.83.0/std/io/type.Result.html
2025-01-06Rollup merge of #135090 - compiler-errors:invalid-tuple-ctor-projection, ↵Jacob Pratt-1/+83
r=lqd,jieyouxu Suggest to replace tuple constructor through projection See the code example. when `Self::Assoc` normalizes to a struct that has a tuple constructor, you cannot construct the type via `Self::Assoc(field, field)`. Instead, suggest to replace it with the correct named struct. Fixes #120871
2025-01-06Rollup merge of #134744 - compiler-errors:transmute-non-wf, r=lcnrJacob Pratt-1/+105
Don't ice on bad transmute in typeck in new solver Old trait solver ends up getting its infcx tainted because we try to normalize the type, but the new trait solver doesn't. This means we try to compute the stalled transmute obligations, which tries to normalize a type an ICEs. Let's make this a delayed bug. r? lcnr
2025-01-06Rollup merge of #134568 - BoxyUwU:relnotes_1_84, r=pietroalbiniJacob Pratt-0/+116
Release notes for 1.84.0 cc ``@rust-lang/release`` r? ``@Mark-Simulacrum``
2025-01-06Rollup merge of #132345 - compiler-errors:fx-diag, r=lcnrJacob Pratt-41/+284
Improve diagnostics for `HostEffectPredicate` in the new solver Adds derived cause for host effect predicates. Some diagnostics regress, but that's connected to the fact that our predicate visitor doesn't play well with aliases just yet.
2025-01-06Rollup merge of #131830 - hoodmane:emscripten-wasm-eh, r=workingjubileeJacob Pratt-10/+131
Add support for wasm exception handling to Emscripten target This is a draft because we need some additional setting for the Emscripten target to select between the old exception handling and the new exception handling. I don't know how to add a setting like that, would appreciate advice from Rust folks. We could maybe choose to use the new exception handling if `Ctarget-feature=+exception-handling` is passed? I tried this but I get errors from llvm so I'm not doing it right.
2025-01-06Transmute from NonNull to pointer when elaborating a box deref (MCP807)Scott McMurray-28/+29
2025-01-07llvm: Ignore error value that is always falseMatthew Maurer-17/+5
See llvm/llvm-project#121851 For LLVM 20+, this function (`renameModuleForThinLTO`) has no return value. For prior versions of LLVM, this never failed, but had a signature which allowed an error value people were handling.
2025-01-06Auto merge of #135172 - matthiaskrgr:rollup-8fe3fxi, r=matthiaskrgrbors-163/+269
Rollup of 7 pull requests Successful merges: - #134742 (Use `PostBorrowckAnalysis` in `check_coroutine_obligations`) - #134771 (Report correct `SelectionError` for `ConstArgHasType` in new solver fulfill) - #134951 (Suppress host effect predicates if underlying trait doesn't hold) - #135097 (bootstrap: Consolidate coverage test suite steps into a single step) - #135146 (Don't enable anyhow's `backtrace` feature in opt-dist) - #135153 (chore: remove redundant words in comment) - #135157 (Move the has_errors check in rustdoc back to after TyCtxt is created) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-06rustdoc: Fix mismatched capitalization in sidebarNoah Lev-3/+3
Previously, the main content used "Aliased Type", while the sidebar said "Aliased type". Now, they both say "Aliased Type", which is the more common capitalization in Rustdoc. See the following link for an example. https://doc.rust-lang.org/1.83.0/std/io/type.Result.html
2025-01-06Replace the random substring of a linker argument with a placeholder and ↵Xing Xue-3/+44
nullify the timestamp field of XCOFF files for file comparison.
2025-01-06avoid replacing the definition of CURRENT_RUSTC_VERSIONPietro Albini-7/+7
Before this commit, replace-version-placeholder hardcoded the path defining CURRENT_RUSTC_VERSION (to avoid replacing it). After a refactor moved the file defining it without changing the hardcoded path, the tool started replacing the constant itself with the version number. To avoid this from happening in the future, this changes the definition of the constant to avoid the tool from ever matching it.
2025-01-06Rollup merge of #135157 - bjorn3:fix_rustdoc_error_abort, ↵Matthias Krüger-4/+4
r=jieyouxu,GuillaumeGomez Move the has_errors check in rustdoc back to after TyCtxt is created This was accidentally moved before TyCtxt creation by https://github.com/rust-lang/rust/pull/134302.
2025-01-06Rollup merge of #135153 - crystalstall:master, r=workingjubileeMatthias Krüger-5/+5
chore: remove redundant words in comment
2025-01-06Rollup merge of #135146 - Zalathar:anyhow-backtrace, r=jieyouxuMatthias Krüger-4/+1
Don't enable anyhow's `backtrace` feature in opt-dist As of the stabilization of `std::backtrace` in Rust 1.65, this package flag has no effect other than to enable an unused dependency on the `backtrace` crate. (See <https://github.com/dtolnay/anyhow/blob/af0937ef72fbaf9784a6c991e029738728d025e2/Cargo.toml#L18-L23>.) While the presence of this feature in opt-dist doesn't cause other tools (which use anyhow) to actually *build* backtrace, it does affect the global crate graph used for dependency version resolution. After removing this feature, we can use `cargo tree --invert --package backtrace` to see that the only remaining reverse-dependency of backtrace is `color-eyre`, which is used by `ui_test`.
2025-01-06Rollup merge of #135097 - Zalathar:coverage-test-step, r=KobzolMatthias Krüger-120/+101
bootstrap: Consolidate coverage test suite steps into a single step Now that I have more understanding of bootstrap steps, and a renewed distaste for unnecessary macros, I have managed to express the subtleties of the `tests/coverage` test suite in a single step defined in ordinary code, with no need for helper macros. Deciding which modes to run is still a bit clunky due to limitations in existing ShouldRun/PathSet APIs, but I think it's a net improvement over having to declare several different steps to handle the suite path and aliases. The interaction with `--skip` isn't as nice as I'd like, but all of the known limitations are limitations that already existed in the previous implementation. One minor change is that by default compiletest is now invoked in `coverage-run` mode even when cross-compiling. However, in that situation compiletest still knows that it should skip all of the individual coverage-run tests. r? jieyouxu (or reassign)
2025-01-06Rollup merge of #134951 - compiler-errors:double-trait-err-msg, r=davidtwcoMatthias Krüger-19/+101
Suppress host effect predicates if underlying trait doesn't hold Don't report two errors for when the (`HostEffectPredicate`) `T: const Trait` isn't implemented because (`TraitPredicate`) `T: Trait` doesn't even hold.
2025-01-06Rollup merge of #134771 - compiler-errors:const-arg-has-type-err, r=lcnrMatthias Krüger-3/+40
Report correct `SelectionError` for `ConstArgHasType` in new solver fulfill r? ``@BoxyUwU``
2025-01-06Rollup merge of #134742 - compiler-errors:post-borrowck-analysis, r=lcnrMatthias Krüger-8/+17
Use `PostBorrowckAnalysis` in `check_coroutine_obligations` This currently errors with: ``` error: concrete type differs from previous defining opaque type use --> tests/ui/coroutine/issue-52304.rs:10:21 | 10 | pub fn example() -> impl Coroutine { | ^^^^^^^^^^^^^^ expected `{example::{closure#0} upvar_tys=() resume_ty=() yield_ty=&'{erased} i32 return_ty=() witness={example::{closure#0}}}`, got `{example::{closure#0} upvar_tys=() resume_ty=() yield_ty=&'static i32 return_ty=() witness={example::{closure#0}}}` | = note: previous use here ``` This is because we end up redefining the opaque in `check_coroutine_obligations` but with the `yield_ty = &'erased i32` from hir typeck, which causes the *equality* check for opaques to fail. The coroutine obligtions in question (when `-Znext-solver` is enabled) are: ``` Binder { value: TraitPredicate(<Opaque(DefId(0:5 ~ issue_52304[4c6d]::example::{opaque#0}), []) as std::marker::Sized>, polarity:Positive), bound_vars: [] } Binder { value: AliasRelate(Term::Ty(Alias(Opaque, AliasTy { args: [], def_id: DefId(0:5 ~ issue_52304[4c6d]::example::{opaque#0}), .. })), Equate, Term::Ty(Coroutine(DefId(0:6 ~ issue_52304[4c6d]::example::{closure#0}), [(), (), &'{erased} i32, (), CoroutineWitness(DefId(0:6 ~ issue_52304[4c6d]::example::{closure#0}), []), ()]))), bound_vars: [] } Binder { value: AliasRelate(Term::Ty(Coroutine(DefId(0:6 ~ issue_52304[4c6d]::example::{closure#0}), [(), (), &'{erased} i32, (), CoroutineWitness(DefId(0:6 ~ issue_52304[4c6d]::example::{closure#0}), []), ()])), Subtype, Term::Ty(Alias(Opaque, AliasTy { args: [], def_id: DefId(0:5 ~ issue_52304[4c6d]::example::{opaque#0}), .. }))), bound_vars: [] } ``` Ignoring the fact that we end up stalling some really dumb obligations here (lol), I think it makes more sense for us to be using post borrowck analysis for this check anyways. r? lcnr
2025-01-06Update triagebot.toml: celinval vacation is overCelina G. Val-2/+1
I'm also removing myself from the MIR syntax changes notifications.
2025-01-06Suggest to replace tuple constructor through projectionMichael Goulet-1/+83
2025-01-06Recurse on GAT where clauses in fulfillment error proof tree visitorMichael Goulet-25/+29
2025-01-06Don't ice on bad transmute in typeck in new solverMichael Goulet-1/+105
2025-01-06Add derived causes for host effect predicatesMichael Goulet-39/+278
2025-01-06last feedback itemsPietro Albini-0/+2
2025-01-06add deprecated and do nothing flag to options tableklensy-34/+78
inline_threshold mark deprecated no-stack-check print deprecation message for -Car too inline_threshold deprecated and do nothing: make in untracked make OptionDesc struct from tuple
2025-01-06Move the has_errors check in rustdoc back to after TyCtxt is createdbjorn3-4/+4
2025-01-06Auto merge of #135112 - tgross35:combine-select-unpredictable-test, r=the8472bors-36/+38
Merge the intrinsic and user tests for `select_unpredictable` [1] mentions that having a single test with `-Zmerge-functions=disabled` is preferable to having two separate tests. Apply that to the new `select_unpredictable` test here. [1]: https://github.com/rust-lang/rust/pull/133964#issuecomment-2569693325
2025-01-06Consolidate coverage test suite steps into a single stepZalathar-120/+101
2025-01-06Add support for wasm exception handling to Emscripten targetHood Chatham-10/+131
Gated behind an unstable `-Z emscripten-wasm-eh` flag