about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-12-28read to `String` directly without extra conversiononur-ozkan-2/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-28remove an invalid FIXME noteonur-ozkan-2/+3
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-28Auto merge of #134842 - jieyouxu:disable-flaky-test, r=ibraheemdevbors-0/+4
Disable `backtrace-debuginfo.rs` on windows-gnu This test appears still flaky cf. #117097 on `i686-mingw` as observed in https://github.com/rust-lang/rust/pull/131244#issuecomment-2564086577. r? compiler (or anyone, really)
2024-12-28Disable `backtrace-debuginfo.rs` on windows-gnu许杰友 Jieyou Xu (Joe)-0/+4
2024-12-28Auto merge of #134839 - dtolnay:rollup-1jm11rl, r=dtolnaybors-25/+61
Rollup of 4 pull requests Successful merges: - #134823 (Fix typos) - #134827 (Some random region tweaks) - #134833 (Skip parenthesis if `.` makes statement boundary unambiguous) - #134834 (Skip parenthesis around tuple struct field calls) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-27Rollup merge of #134834 - dtolnay:unnamedcall, r=compiler-errorsDavid Tolnay-2/+13
Skip parenthesis around tuple struct field calls The pretty-printer previously did not distinguish between named vs unnamed fields when printing a function call containing a struct field. It would print the call as `(self.fun)()` for a named field which is correct, and `(self.0)()` for an unnamed field which is redundant. This PR changes function calls of tuple struct fields to print without parens. **Before:** ```rust struct Tuple(fn()); fn main() { let tuple = Tuple(|| {}); (tuple.0)(); } ``` **After:** ```rust struct Tuple(fn()); fn main() { let tuple = Tuple(|| {}); tuple.0(); } ```
2024-12-27Rollup merge of #134833 - dtolnay:leftmostwithdot, r=compiler-errorsDavid Tolnay-11/+35
Skip parenthesis if `.` makes statement boundary unambiguous There is a rule in the parser that statements and match-arms never end in front of a `.` or `?` token (except when the `.` is really `..` or `..=` or `...`). So some of the leading subexpressions that need parentheses inserted when followed by some other operator like `-` or `+`, do not need parentheses when followed by `.` or `?`. Example: ```rust fn main() { loop {}.to_string() + ""; match () { _ => loop {}.to_string() + "", }; } ``` `-Zunpretty=expanded` before: ```console #![feature(prelude_import)] #[prelude_import] use std::prelude::rust_2021::*; #[macro_use] extern crate std; fn main() { (loop {}).to_string() + ""; match () { _ => (loop {}).to_string() + "", }; } ``` After: ```console #![feature(prelude_import)] #[prelude_import] use std::prelude::rust_2021::*; #[macro_use] extern crate std; fn main() { loop {}.to_string() + ""; match () { _ => loop {}.to_string() + "", }; } ```
2024-12-27Rollup merge of #134827 - compiler-errors:borrowck-nits, r=lqdDavid Tolnay-6/+7
Some random region tweaks Remove a redundant function and add an assertion that I think is useful
2024-12-27Rollup merge of #134823 - chloefeal:fix, r=tgross35,dtolnayDavid Tolnay-6/+6
Fix typos This PR focuses on correcting typos and improving clarity in documentation files. Thank you.
2024-12-28Update library/alloc/tests/sort/tests.rschloefeal-1/+1
Co-authored-by: David Tolnay <dtolnay@gmail.com>
2024-12-27Auto merge of #134690 - clubby789:ci-clang-lto, r=Kobzolbors-2/+11
CI: Add LTO support to clang in dist-x86_64-linux After https://github.com/rust-lang/cc-rs/pull/1279, we attempt to pass `-flto=thin` to clang. In `dist-x86_64-linux`, we don't build clang with the `LLVMgold.so` library so this fails. This attempts to resolve this First, pass the binutils plugin include directory to Clang, [which will build the library](https://github.com/llvm/llvm-project/blob/2d6d723a85c2d007b0359c206d66cd2e5a9f00e1/llvm/docs/GoldPlugin.rst#how-to-build-it) Second, this library depends on the *version of libstdc++ that we built* specifically. However, despite both the RPATH and LD_LIBRARY_PATH pointing to `/rustroot/lib`, we incorrectly resolve to the system libstdc++, which doesn't load. ``` # LD_DEBUG=libs,files 2219: file=libstdc++.so.6 [0]; needed by /rustroot/bin/../lib/LLVMgold.so [0] 2219: find library=libstdc++.so.6 [0]; searching 2219: search path=/rustroot/bin/../lib/../lib (RPATH from file /rustroot/bin/../lib/LLVMgold.so) 2219: trying file=/rustroot/bin/../lib/../lib/libstdc++.so.6 2219: search path=/usr/lib64/tls:/usr/lib64 (system search path) 2219: trying file=/usr/lib64/tls/libstdc++.so.6 2219: trying file=/usr/lib64/libstdc++.so.6 ``` Using `LD_PRELOAD` causes it to correctly load the library I think this is probably not the most maintainable way to do this, so opening to see if this is desired and if there's a better way of doing this
2024-12-27Skip parenthesis around tuple struct field callsDavid Tolnay-3/+11
2024-12-27Add pretty-printer test of tuple field function callDavid Tolnay-0/+3
2024-12-27Skip parenthesis if `.` makes statement boundary unambiguousDavid Tolnay-13/+33
2024-12-27Add test of dot after eager statement boundary exprDavid Tolnay-0/+4
2024-12-27Auto merge of #134830 - matthiaskrgr:rollup-7hdjojz, r=matthiaskrgrbors-177/+665
Rollup of 6 pull requests Successful merges: - #133663 (Add a compiler intrinsic to back `bigint_helper_methods`) - #134798 (Make `ty::Error` implement all auto traits) - #134808 (compiletest: Remove empty 'expected' files when blessing) - #134809 (Add `--no-capture`/`--nocapture` as bootstrap arguments) - #134826 (Add spastorino to users_on_vacation) - #134828 (Add clubby789 back to bootstrap review rotation) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-27Rollup merge of #134828 - clubby789:ununreview, r=lqdMatthias Krüger-0/+1
Add clubby789 back to bootstrap review rotation
2024-12-27Rollup merge of #134826 - spastorino:vacations, r=lqdMatthias Krüger-0/+1
Add spastorino to users_on_vacation
2024-12-27Rollup merge of #134809 - clubby789:nocapture, r=jieyouxuMatthias Krüger-3/+36
Add `--no-capture`/`--nocapture` as bootstrap arguments I often try `x test ... --nocapture` => 'unknown argument' => `x test ... -- --nocapture`. As we forward several other compiletest flags, let's recognise this one in bootstrap as well.
2024-12-27Rollup merge of #134808 - clubby789:compiletest-remove-stderr, r=jieyouxuMatthias Krüger-37/+81
compiletest: Remove empty 'expected' files when blessing Fixes #134793 Fixes #134196 This also refactors `compare_output` to return an enum; returning a usize was done for convenience but is misleading
2024-12-27Rollup merge of #134798 - compiler-errors:err-auto, r=jackh726Matthias Krüger-2/+45
Make `ty::Error` implement all auto traits I have no idea what's up with the crashes test I fixed--I really don't want to look into it since it has to do something with borrowck and multiple layers of opaques. I think the underlying idea of allowing error types to implement all auto traits is justified though. Fixes #134796 Fixes #131050 r? lcnr
2024-12-27Rollup merge of #133663 - scottmcm:carrying_mul_add, r=AmanieuMatthias Krüger-135/+501
Add a compiler intrinsic to back `bigint_helper_methods` cc https://github.com/rust-lang/rust/issues/85532 This adds a new `carrying_mul_add` intrinsic, to implement `wide_mul` and `carrying_mul`. It has fallback MIR for all types -- including `u128`, which isn't currently supported on nightly -- so that it'll continue to work on all backends, including CTFE. Then it's overridden in `cg_llvm` to use wider intermediate types, including `i256` for `u128::carrying_mul`.
2024-12-27Add clubby789 to bootstrap review rotationclubby789-0/+1
2024-12-27Make sure there are no registered constraints from creating universal region ↵Michael Goulet-0/+6
vids
2024-12-27Add spastorino to users_on_vacationSantiago Pastorino-0/+1
2024-12-27Auto merge of #134803 - clubby789:strip-debuginfo, r=Kobzolbors-2/+14
Strip debuginfo from rustc-main and rustdoc r? `@Kobzol` Split from #134690
2024-12-27Override `carrying_mul_add` in cg_llvmScott McMurray-2/+181
2024-12-27Move `{widening, carrying}_mul` to an intrinsic with fallback MIRScott McMurray-135/+322
Including implementing it for `u128`, so it can be defined in `uint_impl!`. This way it works for all backends, including CTFE.
2024-12-27Fix typoschloefeal-6/+6
Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com>
2024-12-27Auto merge of #134822 - jieyouxu:rollup-5xuaq82, r=jieyouxubors-691/+897
Rollup of 8 pull requests Successful merges: - #134606 (ptr::copy: fix docs for the overlapping case) - #134622 (Windows: Use WriteFile to write to a UTF-8 console) - #134759 (compiletest: Remove the `-test` suffix from normalize directives) - #134787 (Spruce up the docs of several queries related to the type/trait system and const eval) - #134806 (rustdoc: use shorter paths as preferred canonical paths) - #134815 (Sort triples by name in platform_support.md) - #134816 (tools: fix build failure caused by PR #134420) - #134819 (Fix mistake in windows file open) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-27Rollup merge of #134819 - ChrisDenton:trunc, r=Mark-Simulacrum许杰友 Jieyou Xu (Joe)-1/+1
Fix mistake in windows file open In #134722 this should have been `c::FileAllocationInfo` not `c::FileEndOfFileInfo`. Oops.
2024-12-27Rollup merge of #134816 - Integral-Tech:pathbuf-refactor, r=lqd许杰友 Jieyou Xu (Joe)-2/+2
tools: fix build failure caused by PR #134420 Someone reports build failure after merging pull request #134420: https://github.com/rust-lang/rust/pull/134420#discussion_r1898081258 This pull request fixes the build failure.
2024-12-27Rollup merge of #134815 - 9names:sort_platform_md_targets, r=jieyouxu许杰友 Jieyou Xu (Joe)-52/+52
Sort triples by name in platform_support.md When looking for riscv32emc support, I missed it at first because it was at the end of the tier3 target list [here](https://doc.rust-lang.org/rustc/platform-support.html#tier-3). These lists are *mostly* dictionary sorted so I assumed it should be near the riscv32i* targets. This PR puts all targets back in dictionary order. There were only a few outside of tier3. I ended up writing a small program to sort them because I did not trust myself to do it manually, but I stopped short of fully automating it. I have manually reviewed the output to confirm it still has the same number of entries, and that the changed values do follow the ordering I would expect. For folks who would prefer to review code than manual textual changes, the sorting program (including inputs) is [here.](https://github.com/9names/platform_sort_arch/blob/main/src/main.rs)
2024-12-27Rollup merge of #134806 - notriddle:notriddle/parent-path-is-better, ↵许杰友 Jieyou Xu (Joe)-39/+80
r=GuillaumeGomez rustdoc: use shorter paths as preferred canonical paths This is a solution to [the `std::sync::poison` linking problem](https://github.com/rust-lang/rust/pull/134692#issuecomment-2560373308), and, in general, makes intra-doc links shorter and clearer. > Done. This helped with the search, but not with the things like `MutexGuard`'s doc's reference to `Mutex::lock` being converted to the absolute (unstable) `std::sync::poison::Mutex` path. cc `@tgross35` r? `@GuillaumeGomez`
2024-12-27Rollup merge of #134787 - fmease:spruce-up-queries, r=compiler-errors许杰友 Jieyou Xu (Joe)-106/+223
Spruce up the docs of several queries related to the type/trait system and const eval - Editorial - Proper rustdoc summary/synopsis line by making use of extra paragraphs: Leads to better rendered output on module pages, in search result lists and overall, too - Use rustdoc warning blocks for admonitions of the form "do not call / avoid calling this query directly" - Use intra-doc links of the form ``[`Self::$query`]`` to cross-link queries. Indeed, such links are generally a bit brittle due to the existence of `TyCtxtFeed` which only contains a subset of queries. Therefore the docs of `feedable` queries cannot cross-link to non-`feedable` ones. I'd say it's fine to use intra-doc links despite the potential/unlikely occasional future breakage (if a query with the aforementioned characteristics becomes `feedable`). `Self::` is nicer than `TyCtxt::` (which would be more stable) since it accounts for other contexts like `TyCtxt{Feed,At,Ensure{,WithValue}}` - Informative - Generally add, flesh out and correct some doc comments - Add *Panic* sections (to a few selected queries only). The lists of panics aren't necessarily exhaustive and focus on the more "obvious" or "important" panics. - Where applicable add a paragraph calling attention to the relevant [`#[rustc_*]` TEST attribute](https://rustc-dev-guide.rust-lang.org/compiler-debugging.html#rustc_-test-attributes) The one non-doc change (it's internal and not observable): Be even more defensive in `query constness`'s impl (spiritual follow-up to #134122) (see self review comment). Fixes #133494. r\? **any**(compiler-errors, oli-obk)
2024-12-27Rollup merge of #134759 - Zalathar:normalize, r=jieyouxu许杰友 Jieyou Xu (Joe)-485/+508
compiletest: Remove the `-test` suffix from normalize directives This suffix was an artifact of using the same condition-checking engine as the `ignore-*` and `only-*` directives, but in practice we have only 2 tests that legitimately use a condition, and both of them only care about 32-bit vs 64-bit. This PR detaches `normalize-*` directives from the condition checker, and replaces it with a much simpler system of four explicit `NormalizeKind` values. It then takes advantage of that simplicity to get rid of the `-test` suffix. --- Addresses one of the points of #126372. The new name-checking code is a bit quaint, but I think it's a definite improvement over the status quo. --- The corresponding dev-guide update is https://github.com/rust-lang/rustc-dev-guide/pull/2172. r? jieyouxu
2024-12-27Rollup merge of #134622 - ChrisDenton:write-file-utf8, r=Mark-Simulacrum许杰友 Jieyou Xu (Joe)-1/+26
Windows: Use WriteFile to write to a UTF-8 console If the console code page is UTF-8 then we can simply write to it without needing to convert to UTF-16 and calling `WriteConsole`.
2024-12-27Rollup merge of #134606 - RalfJung:ptr-copy-docs, r=Mark-Simulacrum许杰友 Jieyou Xu (Joe)-5/+5
ptr::copy: fix docs for the overlapping case Fixes https://github.com/rust-lang/unsafe-code-guidelines/issues/549 As discussed in that issue, it doesn't make any sense for `copy` to read a byte via `src` after it was already written via `dst`. The entire point of this method is that is copies correctly even if they overlap, and that requires always reading any given location before writing it. Cc `@rust-lang/opsem`
2024-12-27Add change tracker entryclubby789-0/+5
2024-12-27compiletest: Remove/don't write empty 'expected' filesclubby789-37/+81
2024-12-27compiletest: Replace `--nocapture` with `--no-capture`clubby789-2/+8
2024-12-27Add `--no-capture` as a bootstrap argumentclubby789-2/+24
2024-12-27Add LTO support to clang in CIclubby789-2/+11
2024-12-27Spruce up the docs of several queries related to the type/trait system and ↵León Orell Valerian Liehr-106/+223
const eval
2024-12-27Auto merge of #134786 - ChrisDenton:fix-rename-symlink, r=tgross35bors-7/+39
Fix renaming symlinks on Windows Previously we only detected mount points and not other types of links when determining reparse point behaviour. Also added some tests to avoid this regressing again in the future.
2024-12-27Fix renaming symlinks on WindowsChris Denton-7/+39
Previously we only detected mount points and not other types of links when determining reparse point behaviour.
2024-12-27Fix mistake in windows file openChris Denton-1/+1
2024-12-27Remove the `-test` suffix from normalize directivesZalathar-443/+442
2024-12-27Don't use `parse_cfg_name_directive` for normalize directivesZalathar-16/+49
This is a little more verbose, but also more explicit, and avoids invoking the full condition engine when only the pointer-width conditions are used.
2024-12-27tools: fix build failure caused by PR #134420Integral-2/+2