about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-01-24Rename `OptimizeAttr::None` to `Default`clubby789-8/+10
2025-01-23Disable non-required MIR opts with `optimize(none)`clubby789-10/+319
Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>
2025-01-23Implement `optimize(none)` attributeclubby789-14/+45
2025-01-22Auto merge of #134478 - compiler-errors:attr-span, r=oli-obkbors-34/+105
Properly record metavar spans for other expansions other than TT This properly records metavar spans for nonterminals other than tokentree. This means that we operations like `span.to(other_span)` work correctly for macros. As you can see, other diagnostics involving metavars have improved as a result. Fixes #132908 Alternative to #133270 cc `@ehuss` cc `@petrochenkov`
2025-01-22Auto merge of #135674 - scottmcm:assume-better, r=estebankbors-84/+114
Update our range `assume`s to the format that LLVM prefers I found out in https://github.com/llvm/llvm-project/issues/123278#issuecomment-2597440158 that the way I started emitting the `assume`s in #109993 was suboptimal, and as seen in that LLVM issue the way we're doing it -- with two `assume`s sometimes -- can at times lead to CVP/SCCP not realize what's happening because one of them turns into a `ne` instead of conveying a range. So this updates how it's emitted from ``` assume( x >= LOW ); assume( x <= HIGH ); ``` or ``` // (for ranges that wrap the range) assume( (x <= LOW) | (x >= HIGH) ); ``` to ``` assume( (x - LOW) <= (HIGH - LOW) ); ``` so that we don't need multiple `icmp`s nor multiple `assume`s for a single value, and both wrappping and non-wrapping ranges emit the same shape. (And we don't bother emitting the subtraction if `LOW` is zero, since that's trivial for us to check too.)
2025-01-22Auto merge of #135848 - matthiaskrgr:rollup-sftciqm, r=matthiaskrgrbors-90/+107
Rollup of 8 pull requests Successful merges: - #132232 (CI: build FreeBSD artifacts on FreeBSD 13.4) - #135706 (Move `supertrait_def_ids` into the elaborate module like all other fns) - #135750 (Add an example of using `carrying_mul_add` to write wider multiplication) - #135793 (Ignore `mermaid.min.js`) - #135810 (Add Kobzol on vacation) - #135821 (fix OsString::from_encoded_bytes_unchecked description) - #135824 (tests: delete `cat-and-grep-sanity-check`) - #135833 (Add fixme and test for issue #135289) Failed merges: - #135816 (Use `structurally_normalize` instead of manual `normalizes-to` goals in alias relate errors) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-21Rollup merge of #135833 - lqd:add-ice-test, r=compiler-errorsMatthias Krüger-0/+36
Add fixme and test for issue #135289 This PR: - adds a test minimizing issue #135289 for PR #135310 - adds a fixme about the suboptimal fix for the ICE I've verified the test indeed ICEs with 3f2f695d68334ca4ecc8aec0aa38b5391051c987 reverted. r? `@estebank`
2025-01-21Rollup merge of #135824 - jieyouxu:delete-bintools-check, r=NoratriebMatthias Krüger-51/+0
tests: delete `cat-and-grep-sanity-check` Part of #121876. All remaining `Makefile`s have open PRs that do not rely on platform `cat` or `grep` or the `cat-and-grep` script.
2025-01-21Rollup merge of #135821 - hkBst:patch-11, r=ibraheemdevMatthias Krüger-2/+2
fix OsString::from_encoded_bytes_unchecked description fixes #133010
2025-01-21Rollup merge of #135810 - Kobzol:kobzol-parental-leave, r=KobzolMatthias Krüger-0/+1
Add Kobzol on vacation I will be mostly reviewing diaper contents in the upcoming weeks, so I'm (proactively, for now) removing myself from the auto review rotation. Feel free to CC me (explicit `r?` won't work) explicitly though, I will be around. r? `````@ghost`````
2025-01-21Rollup merge of #135793 - jyn514:gitignore, r=jieyouxuMatthias Krüger-0/+1
Ignore `mermaid.min.js` It is very long and tends to match a lot of search queries. It's not useful to show with ripgrep. Note that this does not actually untrack the file; changes can still be committed (although I suspect it may not have been intentional to commit originally?). This just changes how it interacts with tools that use `.gitignore` as a default filter. r? rustc-dev-guide
2025-01-21Rollup merge of #135750 - scottmcm:cma-example, r=cuviperMatthias Krüger-2/+31
Add an example of using `carrying_mul_add` to write wider multiplication Just the basic quadratic version that you wouldn't actually use for really-big integers, but it's nice and short so is useful as for a demonstration of why you might find `carrying_mul_add` useful :) cc #85532 ``````@clarfonthey``````
2025-01-21Rollup merge of #135706 - compiler-errors:elaborate, r=lcnrMatthias Krüger-26/+27
Move `supertrait_def_ids` into the elaborate module like all other fns It's strange that this is the only elaborate-like fn on tcx. r? lcnr
2025-01-21Rollup merge of #132232 - asomers:fbsd-13.4, r=Mark-SimulacrumMatthias Krüger-9/+9
CI: build FreeBSD artifacts on FreeBSD 13.4 13.2 is EoL, and 13.3 will be EoL too in about 2 months. Plus, both suffer from a bug in LLVM's libunwind. It causes a segfault inside of std::backtrace::Backtrace::capture(). Fixes #132185 cc ``````@ehuss`````` . before you can do the trybuild, you'll also have to download new FreeBSD 13.4 base.txz images and place them in https://ci-mirrors.rust-lang.org/rustc , then update this PR with the correct file names. try-job: dist-x86_64-freebsd try-job: dist-various-2
2025-01-21Auto merge of #135487 - klensy:windows-0.59, r=Mark-Simulacrumbors-45/+153
bump compiler and tools to windows 0.59, bootstrap to 0.57 This bumps compiler and tools to windows 0.59 (temporary dupes version, as `sysinfo` still depend on <= 0.57). Bootstrap bumps only to 0.57 (the same sysinfo dep). This additionally resolves my comment https://github.com/rust-lang/rust/pull/130874#issuecomment-2393562071 Will work on it in follow up pr: There still some sus imports for `rustc_driver.dll` like ws2_32 or RoOriginateErrorW, but i will look at them later.
2025-01-21Auto merge of #134299 - RalfJung:remove-start, r=compiler-errorsbors-1260/+454
remove support for the (unstable) #[start] attribute As explained by `@Noratrieb:` `#[start]` should be deleted. It's nothing but an accidentally leaked implementation detail that's a not very useful mix between "portable" entrypoint logic and bad abstraction. I think the way the stable user-facing entrypoint should work (and works today on stable) is pretty simple: - `std`-using cross-platform programs should use `fn main()`. the compiler, together with `std`, will then ensure that code ends up at `main` (by having a platform-specific entrypoint that gets directed through `lang_start` in `std` to `main` - but that's just an implementation detail) - `no_std` platform-specific programs should use `#![no_main]` and define their own platform-specific entrypoint symbol with `#[no_mangle]`, like `main`, `_start`, `WinMain` or `my_embedded_platform_wants_to_start_here`. most of them only support a single platform anyways, and need cfg for the different platform's ways of passing arguments or other things *anyways* `#[start]` is in a super weird position of being neither of those two. It tries to pretend that it's cross-platform, but its signature is a total lie. Those arguments are just stubbed out to zero on ~~Windows~~ wasm, for example. It also only handles the platform-specific entrypoints for a few platforms that are supported by `std`, like Windows or Unix-likes. `my_embedded_platform_wants_to_start_here` can't use it, and neither could a libc-less Linux program. So we have an attribute that only works in some cases anyways, that has a signature that's a total lie (and a signature that, as I might want to add, has changed recently, and that I definitely would not be comfortable giving *any* stability guarantees on), and where there's a pretty easy way to get things working without it in the first place. Note that this feature has **not** been RFCed in the first place. *This comment was posted [in May](https://github.com/rust-lang/rust/issues/29633#issuecomment-2088596042) and so far nobody spoke up in that issue with a usecase that would require keeping the attribute.* Closes https://github.com/rust-lang/rust/issues/29633 try-job: x86_64-gnu-nopt try-job: x86_64-msvc-1 try-job: x86_64-msvc-2 try-job: test-various
2025-01-21Move supertrait_def_ids into the elaborate module like all other fnsMichael Goulet-26/+27
2025-01-21add fixme in typoed const pattern lintRémy Rakic-0/+6
2025-01-21add test for issue 135289Rémy Rakic-0/+30
2025-01-21remove support for the #[start] attributeRalf Jung-1260/+454
2025-01-21tidyklensy-0/+1
2025-01-21bump bootsrap windows to 0.57klensy-23/+4
2025-01-21bumpt compiler and tools to windows 0.59klensy-22/+148
2025-01-21tests: delete `cat-and-grep-sanity-check`许杰友 Jieyou Xu (Joe)-51/+0
All remaining `Makefile`s have open PRs that do not rely on platform `cat` or `grep`.
2025-01-21fix OsString::from_encoded_bytes_unchecked descriptionMarijn Schouten-2/+2
2025-01-21Auto merge of #133830 - compiler-errors:span-key, r=lcnrbors-642/+561
Rework dyn trait lowering to stop being so intertwined with trait alias expansion This PR reworks the trait object lowering code to stop handling trait aliases so funky, and removes the `TraitAliasExpander` in favor of a much simpler design. This refactoring is important for making the code that I'm writing in https://github.com/rust-lang/rust/pull/133397 understandable and easy to maintain, so the diagnostics regressions are IMO inevitable. In the old trait object lowering code, we used to be a bit sloppy with the lists of traits in their unexpanded and expanded forms. This PR largely rewrites this logic to expand the trait aliases *once* and handle them more responsibly throughout afterwards. Please review this with whitespace disabled. r? lcnr
2025-01-21Auto merge of #135335 - oli-obk:push-zxwssomxxtnq, r=saethlinbors-30/+125
codegen: store ScalarPair via memset when one side is undef and the other side can be memset Basically since `undef` can be any byte, it can also be the byte(s) that are in the non-undef parts of a value. So we can just treat the `undef` at not being there and only look at the initialized bytes and memset over them fixes #104290 based on https://github.com/rust-lang/rust/pull/135258
2025-01-21Add Kobzol on vacationJakub Beránek-0/+1
2025-01-21Add more testsOli Scherer-0/+49
2025-01-21Treat undef bytes as equal to any other byteOli Scherer-7/+40
2025-01-21Ensure we always get a constant, even without mir optsOli Scherer-1/+1
2025-01-21Also generate undef scalars and scalar pairsOli Scherer-25/+38
2025-01-21Auto merge of #135632 - marcoieni:split-x86_64-msvc-2025, r=Kobzolbors-11/+17
CI: split x86_64-msvc job using windows 2025 try-job: x86_64-msvc-1 try-job: x86_64-msvc-2 try-job: dist-x86_64-msvc
2025-01-21Auto merge of #135224 - wyfo:tls-panic-outline, r=cuviperbors-8/+16
Outline panicking code for `LocalKey::with` See https://github.com/rust-lang/rust/pull/115491 for prior related modifications. https://godbolt.org/z/MTsz87jGj shows a reduction of the code size for TLS accesses.
2025-01-20Auto merge of #134286 - Urgau:unreach_pub-std, r=ibraheemdevbors-131/+150
Enable `unreachable_pub` lint in core This PR enables the [`unreachable_pub`](https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#unreachable-pub) as warn in `core`, `rtstartup` and `panic_unwind`. The motivation is similar to the compiler [MCP: Enable deny(unreachable_pub) on `rustc_*` crates](https://github.com/rust-lang/compiler-team/issues/773#issue-2467219005) : > "Where is this thing used?" is a question I ask all the time when reading unfamiliar code. Because of this, I generally find it annoying when things are marked with a more permissive visibility than necessary. "This thing marked pub, which other crates is it used in? Oh, it's not used in any other crates." Another motivation is to help to lint by utilizing it in-tree and seeing it's limitation in more complex scenarios. The diff was mostly generated with `./x.py fix --stage 1 library/core/ -- --broken-code`, as well as manual edits for code in macros, generated code and other targets. r? libs
2025-01-20Ignore `mermaid.min.js`jyn-0/+1
It is very long and tends to match a lot of search queries. It's not useful to show with ripgrep. Note that this does not actually untrack the file; changes can still be committed (although I suspect it may not have been intentional to commit originally?). This just changes how it interacts with tools that use `.gitignore` as a default filter.
2025-01-20Auto merge of #135789 - matthiaskrgr:rollup-4cvw8s4, r=matthiaskrgrbors-3037/+9572
Rollup of 7 pull requests Successful merges: - #133695 (Reexport likely/unlikely in std::hint) - #135330 (Respect --sysroot for rustc -vV and -Cpasses=list) - #135333 (Partial progress on #132735: Replace extern "rust-intrinsic" with #[rustc_intrinsic] across the codebase) - #135741 (Recognise new IPv6 documentation range from IETF RFC 9637) - #135770 (Update contributing docs for submodule/subtree changes) - #135775 (Subtree update of `rust-analyzer`) - #135776 (Subtree sync for rustc_codegen_cranelift) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-20Rollup merge of #135776 - bjorn3:sync_cg_clif-2025-01-20, r=bjorn3Matthias Krüger-5/+12
Subtree sync for rustc_codegen_cranelift Nothing too exciting this time, but this includes a fix for a linker hang on Windows: https://github.com/rust-lang/rustc_codegen_cranelift/pull/1554 r? ``@ghost`` ``@rustbot`` label +A-codegen +A-cranelift +T-compiler
2025-01-20Rollup merge of #135775 - lnicola:sync-from-ra, r=lnicolaMatthias Krüger-2920/+9088
Subtree update of `rust-analyzer` r? ``@ghost``
2025-01-20Rollup merge of #135770 - jieyouxu:subtree-submodule-contributing, r=KobzolMatthias Krüger-0/+9
Update contributing docs for submodule/subtree changes Noticed in https://github.com/rust-lang/rust/pull/135337#issuecomment-2602434736. r? ``@Kobzol`` (or anyone really)
2025-01-20Rollup merge of #135741 - bardiharborow:std/net/rfc9637, r=AmanieuMatthias Krüger-4/+17
Recognise new IPv6 documentation range from IETF RFC 9637 This PR adds the `3fff::/20` range defined by [IETF RFC 9637](https://datatracker.ietf.org/doc/rfc9637/) to those ranges which `Ipv6Addr::is_documentation` recognises as a documentation IP. See also: https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml Unstable tracking issue: #27709
2025-01-20Rollup merge of #135333 - vayunbiyani:test-environment, r=RalfJungMatthias Krüger-85/+61
Partial progress on #132735: Replace extern "rust-intrinsic" with #[rustc_intrinsic] across the codebase Part of #132735: Replace `extern "rust-intrinsic"` with `#[rustc_intrinsic]` macro - Updated all instances of `extern "rust-intrinsic"` to use the `#[rustc_intrinsic]` macro. - Skipped `.md` files and test files to avoid unnecessary changes.
2025-01-20Rollup merge of #135330 - bjorn3:respect_sysroot_in_version_printing, r=lqdMatthias Krüger-19/+31
Respect --sysroot for rustc -vV and -Cpasses=list This is necessary when the specified codegen backend is in a custom sysroot. Fixes https://github.com/rust-lang/rust/issues/135165
2025-01-20Rollup merge of #133695 - x17jiri:hint_likely, r=AmanieuMatthias Krüger-4/+354
Reexport likely/unlikely in std::hint Since `likely`/`unlikely` should be working now, we could reexport them in `std::hint`. I'm not sure if this is already approved or if it requires approval Tracking issue: #26179
2025-01-20core: `#[allow(unreachable_pub)]` on unreachable `pub use`Urgau-1/+9
2025-01-20core: add `#![warn(unreachable_pub)]`Urgau-104/+112
2025-01-20rtstartup: add `#![warn(unreachable_pub)]`Urgau-0/+2
2025-01-20panic_unwind: add `#![warn(unreachable_pub)]`Urgau-26/+27
2025-01-20Auto merge of #135769 - jieyouxu:rollup-3h384pz, r=jieyouxubors-31/+44
Rollup of 5 pull requests Successful merges: - #135433 (Add Profile Override for Non-Git Sources) - #135626 (doc: Point to methods on `Command` as alternatives to `set/remove_var`) - #135658 (Do not include GCC source code in source tarballs) - #135676 (rustc_resolve: use structured fields in traces) - #135762 (Correct counting to four in cell module docs) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-20Respect --target in get_backend_from_raw_matchesbjorn3-9/+15