about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-04-21fix(error): normalize whitespace during msg_to_bufferbohan-0/+37
2023-04-17Auto merge of #110243 - WaffleLapkin:bless_tagged_pointers🙏, r=Nilstriebbors-233/+657
Tagged pointers, now with strict provenance! This is a big refactor of tagged pointers in rustc, with three main goals: 1. Porting the code to the strict provenance 2. Cleanup the code 3. Document the code (and safety invariants) better This PR has grown quite a bit (almost a complete rewrite at this point...), so I'm not sure what's the best way to review this, but reviewing commit-by-commit should be fine. r? `@Nilstrieb`
2023-04-17Auto merge of #110343 - saethlin:encode-initmask, r=lqdbors-1/+31
Bypass the varint path when encoding InitMask The data in a `InitMask` is stored as `u64` but it is a large bitmask (not numbers) so varint encoding doesn't make sense.
2023-04-17Auto merge of #110458 - matthiaskrgr:rollup-1xcxmgc, r=matthiaskrgrbors-569/+973
Rollup of 9 pull requests Successful merges: - #104055 (Migrate diagnostics in `rustc_borrowck`) - #110257 (fix false positives for `unused_parens` around unary and binary operations) - #110313 (allow `repr(align = x)` on inherent methods) - #110337 (Correct default value for default-linker-libraries) - #110386 (Clean up traversal macros) - #110394 (Various minor Idx-related tweaks) - #110425 (Encode def span for `ConstParam`) - #110434 (Check freeze with right param-env in `deduced_param_attrs`) - #110455 (tests: adapt for LLVM change 5b386b864c7619897c51a1da97d78f1cf6f3eff6) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-17Rollup merge of #110455 - durin42:tls-D148269-fix, r=nikicMatthias Krüger-4/+4
tests: adapt for LLVM change 5b386b864c7619897c51a1da97d78f1cf6f3eff6 The above-mentioned change modified the output of thread-local.rs by changing some variable names. Rather than assume things get put in %0, we capture the variable so the test passes in both the old and new version.
2023-04-17Rollup merge of #110434 - compiler-errors:issue-110171, r=oli-obkMatthias Krüger-2/+34
Check freeze with right param-env in `deduced_param_attrs` We're checking if a trait (`Freeze`) holds in a polymorphic function, but not using that function's own (reveal-all) param-env. This causes us to try to eagerly normalize a specializable projection type that has no default value, which causes an ICE. Fixes #110171
2023-04-17Rollup merge of #110425 - compiler-errors:def-span-for-ct-param, r=petrochenkovMatthias Krüger-2/+32
Encode def span for `ConstParam` Fixes #110206 r? ``@petrochenkov``
2023-04-17Rollup merge of #110394 - scottmcm:less-idx-new, r=WaffleLapkinMatthias Krüger-52/+55
Various minor Idx-related tweaks Nothing particularly exciting here, but a couple of things I noticed as I was looking for more index conversions to simplify. cc https://github.com/rust-lang/compiler-team/issues/606 r? `@WaffleLapkin`
2023-04-17Rollup merge of #110386 - nnethercote:clean-up-traversal-macros, r=lcnrMatthias Krüger-206/+54
Clean up traversal macros The declarative macros relating to type folding and visiting can be simplified. r? ``@lcnr``
2023-04-17Rollup merge of #110337 - iterion:patch-1, r=jyn514Matthias Krüger-2/+2
Correct default value for default-linker-libraries This setting is false by default according to rustc code here: https://github.com/rust-lang/rust/blob/master/compiler/rustc_session/src/options.rs#L1236 I tested on a project and confirmed the behavior described. First, with no value, the `-nodefaultlibs` linker flag is present. Setting this to false has no effect, as well. The linker flag still appears. Setting it to true removes the linker flag as expected.
2023-04-17Rollup merge of #110313 - fee1-dead-contrib:repr_align_method, r=WaffleLapkinMatthias Krüger-8/+71
allow `repr(align = x)` on inherent methods Discussion: https://github.com/rust-lang/rust/issues/82232#issuecomment-905929314
2023-04-17Rollup merge of #110257 - ↵Matthias Krüger-41/+109
lukas-code:why-would-anyone-write-code-like-that-anyway, r=oli-obk fix false positives for `unused_parens` around unary and binary operations fix https://github.com/rust-lang/rust/issues/110251
2023-04-17Rollup merge of #104055 - AndyJado:bck_errors, r=davidtwcoMatthias Krüger-252/+612
Migrate diagnostics in `rustc_borrowck` sorry for making a new PR, [#103559](https://github.com/rust-lang/rust/pull/103559) and [#103960](https://github.com/rust-lang/rust/pull/103960). I am crawling, joyfully.
2023-04-17tests: adapt for LLVM change 5b386b864c7619897c51a1da97d78f1cf6f3eff6Augie Fackler-4/+4
The above-mentioned change modified the output of thread-local.rs by changing some variable names. Rather than assume things get put in %0, we capture the variable so the test passes in both the old and new version.
2023-04-17Bypass the varint path when encoding InitMaskBen Kimock-1/+31
2023-04-17add test for invalid places of repr alignDeadbeef-0/+17
2023-04-17Auto merge of #110367 - saethlin:no-truncations, r=oli-obkbors-33/+9
Remove some suspicious cast truncations These truncations were added a long time ago, and as best I can tell without a perf justification. And with rust-lang/rust#110410 it has become perf-neutral to not truncate anymore. We worked hard for all these bits, let's use them.
2023-04-17Auto merge of #110440 - matthiaskrgr:rollup-eit19vi, r=matthiaskrgrbors-160/+179
Rollup of 7 pull requests Successful merges: - #110038 (Erase regions when confirming transmutability candidate) - #110341 (rustdoc: stop passing a title to `replaceState` second argument) - #110388 (Add a message for if an overflow occurs in `core::intrinsics::is_nonoverlapping`.) - #110404 (fix clippy::toplevel_ref_arg and ::manual_map) - #110421 (Spelling librustdoc) - #110423 (Spelling srcdoc) - #110433 (Windows: map a few more error codes to ErrorKind) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-17Rollup merge of #110433 - ChrisDenton:notfound, r=thomccMatthias Krüger-3/+6
Windows: map a few more error codes to ErrorKind NotFound errors: * `ERROR_INVALID_DRIVE`: The system cannot find the drive specified * `ERROR_BAD_NETPATH`: The network path was not found * `ERROR_BAD_NET_NAME`: The network name cannot be found. InvalidFilename: * `ERROR_BAD_PATHNAME`: The specified path is invalid. Source: [System Error Codes (0-499)](https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-)
2023-04-17Rollup merge of #110423 - jsoref:spelling-srcdoc, r=NilstriebMatthias Krüger-9/+9
Spelling srcdoc
2023-04-17Rollup merge of #110421 - jsoref:spelling-librustdoc, r=notriddleMatthias Krüger-28/+28
Spelling librustdoc This is split from https://github.com/rust-lang/rust/pull/110392 There's one change to src/tools/rustdoc-gui/tester.js which feels like a reasonable thing to piggy-back here.
2023-04-17Rollup merge of #110404 - matthiaskrgr:mapmap, r=NilstriebMatthias Krüger-70/+42
fix clippy::toplevel_ref_arg and ::manual_map r? ``@Nilstrieb``
2023-04-17Rollup merge of #110388 - JohnBobbo96:remove-intrinsic-unwrap, r=the8472Matthias Krüger-1/+3
Add a message for if an overflow occurs in `core::intrinsics::is_nonoverlapping`.
2023-04-17Rollup merge of #110341 - notriddle:notriddle/main-js-replacestate, ↵Matthias Krüger-4/+2
r=GuillaumeGomez rustdoc: stop passing a title to `replaceState` second argument As described on [MDN's replaceState page], this parameter is not currently used, and the empty string is "safe against future changes to the method." [MDN's replaceState page]: https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
2023-04-17Rollup merge of #110038 - compiler-errors:infer-regions-in-transmutability, ↵Matthias Krüger-45/+89
r=lcnr Erase regions when confirming transmutability candidate Fixes an ICE where we call `layout_of` on a type with infer regions.
2023-04-17Auto merge of #109588 - Nilstrieb:dropless-expr, r=compiler-errorsbors-38/+34
Alloc `hir::Lit` in an arena to remove the destructor from `Expr` This allows allocating `Expr`s into a dropless arena, which is useful for using length prefixed thing slices in HIR, since these can only be allocated in the dropless arena and not in a typed arena.
2023-04-17Encode def span for ConstParamMichael Goulet-2/+32
2023-04-17Auto merge of #109247 - saethlin:inline-without-inline, r=oli-obkbors-22/+16
Permit MIR inlining without #[inline] I noticed that there are at least a handful of portable-simd functions that have no `#[inline]` but compile to an assign + return. I locally benchmarked inlining thresholds between 0 and 50 in increments of 5, and 50 seems to be the best. Interesting. That didn't include check builds though, ~maybe perf will have something to say about that~. Perf has little useful to say about this. We generally regress all the check builds, as best as I can tell, due to a number of small codegen changes in a particular hot function in the compiler. Probably this is because we've nudged the inlining outcomes all over, and uses of `#[inline(always)]`/`#[inline(never)]` might need to be adjusted.
2023-04-16Spelling librustdocJosh Soref-28/+28
* associated * collected * correspondence * inlining * into * javascript * multiline * variadic Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-17Auto merge of #109061 - saethlin:leak-backtraces, r=oli-obkbors-62/+191
Add a backtrace to Allocation, display it in leak reports This addresses https://github.com/rust-lang/miri/issues/2813 Information like this from diagnostics is indispensable for diagnosing problems that are difficult to reproduce such as https://github.com/rust-lang/miri-test-libstd/actions/runs/4395316008/jobs/7697019211#step:4:770 (which has not been reproduced or diagnosed).
2023-04-16Remove some unnecessary hash truncationsBen Kimock-33/+9
2023-04-16Check freeze with right param-envMichael Goulet-2/+34
2023-04-16Windows: map a few more error codes to ErrorKindChris Denton-3/+6
NotFound errors: * `ERROR_INVALID_DRIVE`: The system cannot find the drive specified * `ERROR_BAD_NETPATH`: The network path was not found * `ERROR_BAD_NET_NAME`: The network name cannot be found. InvalidFilename: * `ERROR_BAD_PATHNAME`: The specified path is invalid.
2023-04-16Auto merge of #109133 - weihanglo:make-cargo-a-workspace, r=ehussbors-2129/+124
Make cargo a workspace 8 commits in 7bf43f028ba5eb1f4d70d271c2546c38512c9875..39116ccc9b420a883a98a960f0597f9cf87414b8 2023-04-10 16:01:41 +0000 to 2023-04-15 20:24:15 +0000 - Make cargo a workspace (rust-lang/cargo#11851) - Fix flaky not_found_permutations test. (rust-lang/cargo#11976) - Use restricted Damerau-Levenshtein algorithm (rust-lang/cargo#11963) - Correct the bug report for `cargo clippy --fix` (rust-lang/cargo#11882) - Stabilize `cargo logout` (rust-lang/cargo#11950) - Add more information to HTTP errors to help with debugging. (rust-lang/cargo#11878) - Use registry.default for login/logout (rust-lang/cargo#11949) - Change -C to be unstable (rust-lang/cargo#11960) --- ### What does this PR try to resolve? Making cargo a workspace. Why doing this? * `rustc-workspace-hack` is primarily for sharing dependencies between rls and cargo, as rls previously depends on cargo. After rls retired, it is no longer the case sharing dependencies. * It's q bit painful that cargo needs to deal with some dependency and licensing complexities. For example, #108665 failed because of the interaction bewteen `windows-sys` and `raw-dylib`. It currenctly blocks cargo's feature `-Zgitxodie` from moving forward. * See rust-lang/cargo#11851 ### Benchmark result I've done a simple benchmark on both keeping or removing entire `rustc-workspace-hack`. It had no significant difference. Both took ~2m30s to finish `./x.py build -j8 src/tools/cargo src/tools/rls src/tools/clippy src/tools/miri src/tools/rustfmt`. Environment info: ``` host: aarch64-apple-darwin os: Mac OS 13.2.1 [64-bit] ``` A sophisticated benchmark may be needed. ### Additional information This depends on prior works from `@Muscraft` and `@ehuss.` Credits to them!
2023-04-16Erase regions when confirming transmutability candidateMichael Goulet-45/+89
2023-04-16bootstrap: switch from `stream_cargo` to `try_run_quiet`Weihang Lo-3/+3
It is unnecessary to stream cargo JSON output.
2023-04-16chore: remove `rustc-workspace-hack`Weihang Lo-191/+4
Co-authored-by: Scott Schafer <schaferjscott@gmail.com> Co-authored-by: Eric Huss <eric@huss.org>
2023-04-16chore: remove Cargo features in rustc-workspace-hackWeihang Lo-167/+1
2023-04-16bootstrap: treat src/tools/cargo as a workspace memberWeihang Lo-15/+44
We remove `src/tools/cargo` from rust-lang/rust root workspace, but some underlying mechanism still needs it to be a member. for example, `./x.py doc`. This little hack make cargo's metadata available by invoking an extra `cargo metadata` for cargo the package itself. Co-authored-by: Scott Schafer <schaferjscott@gmail.com> Co-authored-by: Eric Huss <eric@huss.org>
2023-04-16tidy: `check_crate_duplicate` is no longer usefulWeihang Lo-47/+8
After cargo becomes a workspace, no one uses `check_crate_duplicate` to check if cargo is a dependency anymore.
2023-04-16chore: allow `cargo` to have its own workspaceWeihang Lo-1716/+74
This also * bumps cargo to the latest in rust-lang/cargo. * adds 0BSD to allowed list of licenses Co-authored-by: Scott Schafer <schaferjscott@gmail.com> Co-authored-by: Eric Huss <eric@huss.org>
2023-04-16Spelling src/docJosh Soref-9/+9
* incompatibilities * invocation * keywords * nonexistent * shakespeare * the * toolchain * transparent Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-16Alloc `hir::Lit` in an arena to remove the destructor from `Expr`Nilstrieb-38/+34
This allows allocating `Expr`s into a dropless arena, which is useful for using length prefixed thing slices in HIR, since these can only be allocated in the dropless arena and not in a typed arena. This is something I'm working on.
2023-04-16Add a message indicating overflow inJohn Bobbo-1/+3
`core::intrinsics::is_nonoverlapping`.
2023-04-16Improve doc comment of AllocExtra's backtraceBen Kimock-1/+2
Co-authored-by: Ralf Jung <post@ralfj.de>
2023-04-16Add a flag to disable leak backtracesBen Kimock-9/+52
2023-04-16Auto merge of #110405 - fee1-dead-contrib:rollup-9rkree6, r=fee1-deadbors-114/+91
Rollup of 4 pull requests Successful merges: - #110397 (Move some utils out of `rustc_const_eval`) - #110398 (use matches! macro in more places) - #110400 (more clippy fixes: clippy::{iter_cloned_collect, unwarp_or_else_defau…) - #110402 (Remove the loop in `Align::from_bytes`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-16Report a backtrace for memory leaks under MiriBen Kimock-60/+145
2023-04-16Rollup merge of #110402 - scottmcm:align-tz, r=fee1-deadfee1-dead-7/+4
Remove the loop in `Align::from_bytes` Perf is almost certainly irrelevant, but might as well simplify it, since `trailing_zeros` does exactly what's needed.
2023-04-16Rollup merge of #110400 - matthiaskrgr:style_mix, r=fee1-deadfee1-dead-7/+5
more clippy fixes: clippy::{iter_cloned_collect, unwarp_or_else_defau… …lt, option_map_or_none} r? `@Nilstrieb`