about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-07-28Change LLVM BOLT flagsJakub Beránek-0/+2
2023-07-27Auto merge of #113374 - GuillaumeGomez:private-to-public-path, ↵bors-3/+344
r=notriddle,fmease [rustdoc] If re-export is private, get the next item until a public one is found or expose the private item directly Fixes #81141. If we have: ```rust use Private as Something; pub fn foo() -> Something {} ``` Then `Something` will be replaced by `Private`. r? `@notriddle`
2023-07-27Auto merge of #114130 - GuillaumeGomez:rollup-69ihuaj, r=GuillaumeGomezbors-272/+420
Rollup of 7 pull requests Successful merges: - #114032 (typos) - #114059 (rustdoc: fix cross-crate `impl Sized` & `impl ?Sized`) - #114088 (Bump syn dependency) - #114091 (docs: fmt::Debug*: Fix comments for finish method.) - #114109 (Docs: Fix URL for `rmatches`) - #114117 (Restore region uniquification in the new solver 🎉 ) - #114123 (Turns out opaque types can have hidden types registered during mir validation) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-27Rollup merge of #114123 - oli-obk:tait_wtf, r=WaffleLapkinGuillaume Gomez-6/+25
Turns out opaque types can have hidden types registered during mir validation See the newly added test's documentation for an explanation. fixes #114121
2023-07-27Rollup merge of #114117 - compiler-errors:return-to-uniq, r=lcnrGuillaume Gomez-13/+48
Restore region uniquification in the new solver 🎉 All of the bugs that were "due" to uniquification have been settled via other means (e.g. bidirectional alias-relate, param-env incompleteness, etc). Firstly, revert the functional changes in #110180. 😸 Secondly, we need to ignore regions when considering if a goal has changed (the "has_changed" boolean returned from `evaluate_goal`) -- otherwise, because we're doing region uniquification, we may perpetually consider a goal to be changed. See the UI test I committed for an explanation.
2023-07-27Rollup merge of #114109 - veera-sivarajan:fix-str-docs, r=GuillaumeGomezGuillaume Gomez-1/+1
Docs: Fix URL for `rmatches` This PR fixes a link to `str::rmatches()` by pointing it to the correct URL.
2023-07-27Rollup merge of #114091 - waywardmonkeys:doc-fmt-finish-comments, ↵Guillaume Gomez-3/+3
r=GuillaumeGomez docs: fmt::Debug*: Fix comments for finish method. In the code sample for the `finish` method on `DebugList`, `DebugMap`, and `DebugSet`, refer to finishing the list, map, or set, rather than struct as it did.
2023-07-27Rollup merge of #114088 - oli-obk:syn, r=davidtwcoGuillaume Gomez-199/+205
Bump syn dependency r? `@davidtwco` because this affects diagnostics derive diagnostics (yes this sentence is grammatically correct)
2023-07-27Rollup merge of #114059 - fmease:rustdoc-fix-x-crate-impl-sized, ↵Guillaume Gomez-48/+136
r=GuillaumeGomez rustdoc: fix cross-crate `impl Sized` & `impl ?Sized` Previously, cross-crate impl-Trait (APIT, RPIT, etc.) that only consists of a single `Sized` bound (modulo outlives-bounds) and ones that are `?Sized` were incorrectly rendered. To give you a taste (before vs. after): ```diff - fn sized(x: impl ) -> impl + fn sized(x: impl Sized) -> impl Sized - fn sized_outlives<'a>(x: impl 'a) -> impl 'a + fn sized_outlives<'a>(x: impl Sized + 'a) -> impl Sized + 'a - fn maybe_sized(x: &impl ) -> &impl + fn maybe_sized(x: &impl ?Sized) -> &impl ?Sized - fn debug_maybe_sized(x: &impl Debug) -> &impl ?Sized + Debug + fn debug_maybe_sized(x: &(impl Debug + ?Sized)) -> &(impl Debug + ?Sized) ``` Moreover, we now surround impl-Trait that has multiple bounds with parentheses if they're the pointee of a reference or raw pointer type. This affects both local and cross-crate docs. The current output isn't correct (rustc would emit the error *ambiguous `+` in a type* if we fed the rendered code back to it). --- Best reviewed commit by commit :) `@rustbot` label A-cross-crate-reexports
2023-07-27Rollup merge of #114032 - tshepang:patch-1, r=GuillaumeGomezGuillaume Gomez-2/+2
typos
2023-07-27Auto merge of #114105 - dicej:llvm-update, r=cuviperbors-0/+0
Update LLVM submodule This adds https://github.com/rust-lang/llvm-project/pull/148.
2023-07-27Auto merge of #113281 - dayo05:master, r=davidtwcobors-14/+111
Implement diagnostic translation for rustc-errors This is my first PR to rustc yeah~ I'm going to implement diagnostic translation on rustc-errors crate. This PR is WIP, the reason of opening this as draft, I want to show my code to prevent the issue caused by misunderstanding and also I have few questions. Some error messages are processed by `pluralize!` macro which determines to use plural word or not. From now, I make two kinds of keys and combine with enum but I'm not sure is this best method to do it. Is there any prefered method to do this? => This resolved on conversation on PR. I'll remain to perform force-push until my first implementation looks good to me
2023-07-27Remove transmute calls and caching for use pathsGuillaume Gomez-34/+25
2023-07-27Turns out opaque types can have hidden types registered during mir validationOli Scherer-6/+25
2023-07-27Auto merge of #114080 - compiler-errors:negative, r=spastorinobors-1/+1
Don't treat negative trait predicates as always knowable We don't need this. It was added in #90104 but I don't really know why. It's not sound afaict -- negative trait predicates need the same coherence-ambiguity/orphan check rules as positive ones. r? `@lcnr` cc `@spastorino,` do you remember why?
2023-07-27Auto merge of #114116 - matthiaskrgr:rollup-dtdfk76, r=matthiaskrgrbors-534/+436
Rollup of 7 pull requests Successful merges: - #113872 (Tweak CGU sorting in a couple of places.) - #114053 (CI: fix CMake installation for 32/64 bit `dist` Linux) - #114075 (inline format!() args from rustc_codegen_llvm to the end (4)) - #114081 (`desugar_doc_comments` cleanups) - #114082 (add stable NullaryOp) - #114098 (replace atty crate with std's IsTerminal) - #114102 (Dont pass `-Zwrite-long-types-to-disk=no` for `ui-fulldeps --stage=1`) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-27Rollup merge of #114102 - compiler-errors:fulldeps-stage1-hack, r=pnkfelixMatthias Krüger-1/+8
Dont pass `-Zwrite-long-types-to-disk=no` for `ui-fulldeps --stage=1` Due to this hack: https://github.com/rust-lang/rust/blob/601a34de8c10458b72a7781eb0b44a7981e4a2b1/src/bootstrap/test.rs#L1473-L1484 We use the stage 0 compiler to build the stage 1 fulldeps tests. That means that we don't have `-Zwrite-long-types-to-disk=no` which was added in #113893. Add a temporary hack to fix this (https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Some.20tests.20failing.20with.20--stage.201) until the next beta bump.
2023-07-27Rollup merge of #114098 - klensy:drop-atty, r=fee1-deadMatthias Krüger-6/+4
replace atty crate with std's IsTerminal
2023-07-27Rollup merge of #114082 - ericmarkmartin:smir-nullary-op, r=spastorinoMatthias Krüger-1/+6
add stable NullaryOp r? `@spastorino`
2023-07-27Rollup merge of #114081 - nnethercote:desugar_doc_comments-cleanups, ↵Matthias Krüger-21/+27
r=petrochenkov `desugar_doc_comments` cleanups r? `@petrochenkov`
2023-07-27Rollup merge of #114075 - matthiaskrgr:fmt_args_rustc_3, r=wesleywiserMatthias Krüger-498/+385
inline format!() args from rustc_codegen_llvm to the end (4) r? `@WaffleLapkin`
2023-07-27Rollup merge of #114053 - Kobzol:ci-linux-fix-cmake, r=nikicMatthias Krüger-4/+2
CI: fix CMake installation for 32/64 bit `dist` Linux Should hopefully fix LLVM 17 build (https://github.com/rust-lang/rust/pull/114048#issuecomment-1649586577).
2023-07-27Rollup merge of #113872 - nnethercote:tweak-cgu-sorting, r=pnkfelixMatthias Krüger-3/+4
Tweak CGU sorting in a couple of places. In `base.rs`, tweak how the CGU size interleaving works. Since #113777, it's much more common to have multiple CGUs with identical sizes. With the existing code these same-sized items ended up in the opposite-to-desired order due to the stable sorting. The code now starts with a reverse sort (like is done in `partitioning.rs`) which gives the behaviour we want. This doesn't matter much for perf, but makes profiles in `samply` look more like what we expect. In `partitioning.rs`, we can use `sort_by_key` instead of `sort_by_cached_key` because `CGU::size_estimate()` is cheap. (There is an identical CGU sort earlier in that function that already uses `sort_by_key`.) r? `@pnkfelix`
2023-07-27Consider a goal as NOT changed if its response is identity modulo regionsMichael Goulet-2/+34
2023-07-27Revert "don't uniquify regions when canonicalizing"Michael Goulet-11/+14
This reverts commit 171f5414705194067557cd7b70bd680308b9cced.
2023-07-27Auto merge of #113708 - rcvalle:rust-cfi-fix-100778, r=compiler-errorsbors-34/+104
CFI: Fix ICE: encode_const: unexpected type [usize Fixes #100778 and #113366, and complements #106547 by adding support for encoding const parameters.
2023-07-27Auto merge of #114034 - Amanieu:riscv-atomicbool, r=thomccbors-8/+54
Optimize `AtomicBool` for target that don't support byte-sized atomics `AtomicBool` is defined to have the same layout as `bool`, which means that we guarantee that it has a size of 1 byte. However on certain architectures such as RISC-V, LLVM will emulate byte atomics using a masked CAS loop on an aligned word. We can take advantage of the fact that `bool` only ever has a value of 0 or 1 to replace `swap` operations with `and`/`or` operations that LLVM can lower to word-sized atomic `and`/`or` operations. This takes advantage of the fact that the incoming value to a `swap` or `compare_exchange` for `AtomicBool` is often a compile-time constant. ### Example ```rust pub fn swap_true(atomic: &AtomicBool) -> bool { atomic.swap(true, Ordering::Relaxed) } ``` ### Old ```asm andi a1, a0, -4 slli a0, a0, 3 li a2, 255 sllw a2, a2, a0 li a3, 1 sllw a3, a3, a0 slli a3, a3, 32 srli a3, a3, 32 .LBB1_1: lr.w a4, (a1) mv a5, a3 xor a5, a5, a4 and a5, a5, a2 xor a5, a5, a4 sc.w a5, a5, (a1) bnez a5, .LBB1_1 srlw a0, a4, a0 andi a0, a0, 255 snez a0, a0 ret ``` ### New ```asm andi a1, a0, -4 slli a0, a0, 3 li a2, 1 sllw a2, a2, a0 amoor.w a1, a2, (a1) srlw a0, a1, a0 andi a0, a0, 255 snez a0, a0 ret ```
2023-07-26Fix URL for `rmatches`Veera-1/+1
2023-07-26Auto merge of #113843 - wesleywiser:replace_rustc_apfloat, r=pnkfelixbors-7774/+49
Replace in-tree `rustc_apfloat` with the new version of the crate Replace the in-tree version of `rustc_apfloat` with the new version of the crate which has been correctly licensed. The new crate incorporates upstream changes from LLVM since the original port was done including many correctness fixes and has been extensively fuzz tested to validate correctness. Fixes #100233 Fixes #102403 Fixes #113407 Fixes #113409 Fixes #55993 Fixes #93224 Closes #93225 Closes #109573
2023-07-26Update LLVM submoduleJoel Dice-0/+0
This adds https://github.com/rust-lang/llvm-project/pull/148.
2023-07-26Auto merge of #114103 - matthiaskrgr:rollup-01m6l2w, r=matthiaskrgrbors-44/+122
Rollup of 7 pull requests Successful merges: - #101994 (rand: freebsd update, using getrandom.) - #113930 (Add Param and Bound ty to SMIR) - #113942 (Squelch a noisy rustc_expand unittest) - #113996 (Define CMAKE_SYSTEM_NAME on a cross build targeting DragonFly.) - #114070 (Add `sym::iter_mut` + `sym::as_mut_ptr` for Clippy) - #114073 (Remove -Z diagnostic-width) - #114090 (compiletest: remove ci-specific remap-path-prefix) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-26Rollup merge of #114090 - mdibaiee:remove-remap-path-prefix-ci, r=wesleywiserMatthias Krüger-8/+0
compiletest: remove ci-specific remap-path-prefix Now that we have fixed the underlying cause of long type name inconsistencies in #113893, we can remove the remap-path-prefix logic from CI resolves #113424
2023-07-26Rollup merge of #114073 - ehuss:remove-z-diagnostic-width, r=fee1-deadMatthias Krüger-2/+0
Remove -Z diagnostic-width This removes the `-Z diagnostic-width` option since it is ignored and does nothing. `-Z diagnostic-width` was stabilized as `--diagnostic-width` in #95635. It is not entirely clear why the `-Z` flag was kept, but in part its final use was removed in #102216, but the `-Z` flag itself was not removed.
2023-07-26Rollup merge of #114070 - blyxyas:iter_mut_symbol, r=oli-obkMatthias Krüger-3/+5
Add `sym::iter_mut` + `sym::as_mut_ptr` for Clippy We currently have `sym::iter` and `sym::iter_repeat`, this PR adds `sym::iter_mut` as it's useful for https://github.com/rust-lang/rust-clippy/pull/11038 and another Clippy lint, it also adds `sym::as_mut_ptr` as it's useful for https://github.com/rust-lang/rust-clippy/pull/10962.
2023-07-26Rollup merge of #113996 - inferiorhumanorgans:dragonfly-cmake-system-name, ↵Matthias Krüger-1/+8
r=ozkanonur Define CMAKE_SYSTEM_NAME on a cross build targeting DragonFly. Without `CMAKE_SYSTEM_NAME` set to the target a cross compile will generally fail. Related to #109170.
2023-07-26Rollup merge of #113942 - ehuss:squelch-bad_path_expr_1, r=fee1-deadMatthias Krüger-24/+57
Squelch a noisy rustc_expand unittest The test `rustc_parse::tests::bad_path_expr_1` prints an error message to stderr, circumventing libtest's stderr intercept. This causes noise when running tests, in particular they show up 16 times on the GitHub Actions summary page. The solution here is to not use an error emitter that prints to stderr, and instead check that the correct error is generated.
2023-07-26Rollup merge of #113930 - spastorino:smir-types-6, r=oli-obkMatthias Krüger-2/+34
Add Param and Bound ty to SMIR r? ``@oli-obk``
2023-07-26Rollup merge of #101994 - devnexen:rand_fbsd_update, r=workingjubileeMatthias Krüger-4/+18
rand: freebsd update, using getrandom. supported since the 12th release, while 11.4 is EOL since 2021.
2023-07-26Dont pass -Zwrite-long-types-to-disk=no for ui-fulldeps --stage=1Michael Goulet-1/+8
2023-07-26Auto merge of #114012 - GuillaumeGomez:fix-113982, r=notriddlebors-18/+61
Fix missing attribute merge on glob foreign re-exports Fixes https://github.com/rust-lang/rust/issues/113982. The attributes were not merged with the import's in case of glob re-export of foreign items. r? `@notriddle`
2023-07-26Add tests for #102403 and #113407Ralf Jung-0/+24
2023-07-26Add test case for #109567yukang-0/+15
2023-07-26Auto merge of #113457 - davidtwco:lint-ctypes-issue-113436, r=oli-obkbors-46/+136
lint/ctypes: fix `()` return type checks Fixes #113436. `()` is normally FFI-unsafe, but is FFI-safe when used as a return type. It is also desirable that a transparent newtype for `()` is FFI-safe when used as a return type. In order to support this, when a type was deemed FFI-unsafe, because of a `()` type, and was used in return type - then the type was considered FFI-safe. However, this was the wrong approach - it didn't check that the `()` was part of a transparent newtype! The consequence of this is that the presence of a `()` type in a more complex return type would make it the entire type be considered safe (as long as the `()` type was the first that the lint found) - which is obviously incorrect. Instead, this logic is removed, and after [consultation with t-lang](https://github.com/rust-lang/rust/issues/113436#issuecomment-1640756721), I've fixed the bugs and inconsistencies and made `()` FFI-safe within types. I also refactor a function, but that's not too exciting.
2023-07-26Squelch a noisy rustc_expand unittestEric Huss-24/+57
2023-07-26replace atty crate with std's isTerminalklensy-6/+4
2023-07-26Remove unused NCSA licenseWesley Wiser-15/+0
2023-07-26Fix miriWesley Wiser-10/+0
2023-07-26Replace in-tree `rustc_apfloat` with the new version of the crateWesley Wiser-7749/+10
2023-07-26Fix regression for private in publicGuillaume Gomez-0/+15
2023-07-26Auto merge of #114071 - RalfJung:interpret-generic-read-write, r=oli-obkbors-371/+403
interpret: make read/write methods generic Instead of always having to call `into()` to convert things to `PlaceTy`/`OpTy`, make the relevant methods generic. This also means that when we read from an `MPlaceTy`, we avoid creating an intermediate `PlaceTy`. This makes it feasible to remove the `Copy` from `MPlaceTy`. All the other `*Ty` interpreter types already had their `Copy` removed a while ago so this is only consistent. (And in fact we had one function that accidentally took `MPlaceTy` instead of `&MPlaceTy`.)