about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-11-02Auto merge of #117521 - GuillaumeGomez:impl-on-foreign-order, r=notriddlebors-2/+28
Fix order of implementations in the "implementations on foreign types" section Fixes #117391. We forgot to run the `sort_by_cached_key` on this section. This fixes it. r? `@notriddle`
2023-11-02Add GUI test to ensure that implementations on foreign types are in the ↵Guillaume Gomez-1/+26
expected order
2023-11-02Fix order of implementations in the "implementations on foreign types" sectionGuillaume Gomez-1/+2
2023-11-02Auto merge of #117513 - matthiaskrgr:rollup-jvl6y84, r=matthiaskrgrbors-161/+281
Rollup of 4 pull requests Successful merges: - #117394 (use global cache when computing proof trees) - #117495 (Clarify `Unsize` documentation) - #117509 (Remove support for alias `-Z symbol-mangling-version`) - #117512 (Expand mem::offset_of! docs) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-02Rollup merge of #117512 - joshlf:patch-8, r=dtolnayMatthias Krüger-2/+63
Expand mem::offset_of! docs Makes progress on #106655
2023-11-02Rollup merge of #117509 - Zalathar:zsymbol, r=petrochenkovMatthias Krüger-27/+39
Remove support for alias `-Z symbol-mangling-version` (This is very similar to the removal of `-Z instrument-coverage` in #117111.) `-C symbol-mangling-version` was stabilized back in rustc 1.59.0 (2022-02-24) via #90128, with the old unstable flag kept around (with a warning) as an alias to ease migration.
2023-11-02Rollup merge of #117495 - compiler-errors:unsize-docs, r=lcnrMatthias Krüger-6/+41
Clarify `Unsize` documentation The documentation erroneously says that: ```rust /// - Types implementing a trait `Trait` also implement `Unsize<dyn Trait>`. /// - Structs `Foo<..., T, ...>` implement `Unsize<Foo<..., U, ...>>` if all of these conditions /// are met: /// - `T: Unsize<U>`. /// - Only the last field of `Foo` has a type involving `T`. /// - `Bar<T>: Unsize<Bar<U>>`, where `Bar<T>` stands for the actual type of that last field. ``` Specifically, `T: Unsize<U>` is not required to hold -- only the final field must implement `FinalField<T>: Unsize<FinalField<U>>`. This can be demonstrated by the test I added. --- Second commit fleshes out the documentation a lot more.
2023-11-02Rollup merge of #117394 - lcnr:proof-tree-cache4, r=compiler-errorsMatthias Krüger-126/+138
use global cache when computing proof trees we're writing the solver while relying on the existence of the global cache to avoid exponential blowup. By disabling the global cache when building proof trees, it is easy to get hangs, e.g. when computing intercrate ambiguity causes. Removes the unstable `-Zdump_solver_proof_tree_use_cache` option, as we now always return a full proof tree. r? `@compiler-errors`
2023-11-02Update mod.rsJoshua Liebow-Feeser-0/+2
2023-11-02Update mod.rsJoshua Liebow-Feeser-2/+1
2023-11-02Auto merge of #117466 - compiler-errors:alias-bound, r=aliemjaybors-1/+64
Don't check for alias bounds in liveness when aliases have escaping bound vars I actually have no idea how we *should* be treating aliases with escaping bound vars here... but the simplest behavior is just doing what we used to do before. r? aliemjay Fixes #117455
2023-11-02Remove trailing spaceJoshua Liebow-Feeser-1/+1
2023-11-02Expand mem::offset_of! docsJoshua Liebow-Feeser-2/+62
Makes progress on #106655
2023-11-02Don't check for alias bounds in liveness when aliases have escaping bound varsMichael Goulet-1/+64
2023-11-02Auto merge of #117204 - nnethercote:rustc_ast_passes, r=compiler-errorsbors-176/+145
Minor improvements to `rustc_ast_passes` Some improvements I found while looking at this code. r? `@compiler-errors`
2023-11-02use global cache when computing proof treeslcnr-126/+138
2023-11-02Auto merge of #117386 - roblabla:fix-switch-stdio-win7, r=ChrisDentonbors-3/+21
Fix switch_stdout_to on Windows7 The `switch_stdout_to` test was broken on Windows7, as deleting the temporary test folder would fail since the `switch-stdout-output` file we redirected the stdout to is never closed, and it's impossible on Win7 to delete an opened file. To fix this issue, we make `switch_stdout_to` return the previous handle. Using this, we add a new `switch_stdout_to` call at the end of the test to return the stdio handles to their original state, and recover the handle to the file we opened. This handle is automatically closed at the end of the function, which should allow the temporary test folder to be deleted properly.
2023-11-02Remove support for alias `-Z symbol-mangling-version`Zalathar-26/+13
2023-11-02Add UI tests for values accepted by `-C symbol-mangling-version`Zalathar-1/+26
2023-11-02Auto merge of #117506 - massivebird:ord-typo, r=ChrisDentonbors-1/+1
fixes: typo in `std::cmp::Ord` trait docs Pluralizes the word "sequence"
2023-11-01fixes: typo in `std::cmp::Ord` trait docsmassivebird-1/+1
2023-11-01Auto merge of #117498 - matthiaskrgr:rollup-z7mg4ck, r=matthiaskrgrbors-41/+540
Rollup of 4 pull requests Successful merges: - #117298 (Recover from missing param list in function definitions) - #117373 (Avoid the path trimming ICE lint in error reporting) - #117441 (Do not assert in op_to_const.) - #117488 (Update minifier-rs version to 0.3.0) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-01Rollup merge of #117488 - GuillaumeGomez:update-minifier, r=notriddleMatthias Krüger-3/+3
Update minifier-rs version to 0.3.0 It fixes https://github.com/GuillaumeGomez/minifier-rs/issues/105. r? ```@notriddle```
2023-11-01Rollup merge of #117441 - cjgillot:diag-noassert, r=oli-obk,RalfJungMatthias Krüger-11/+468
Do not assert in op_to_const. `op_to_const` is used in `try_destructure_mir_constant_for_diagnostics`, which may encounter invalid constants created by optimizations and debugging. r? ``@oli-obk`` Fixes https://github.com/rust-lang/rust/issues/117368
2023-11-01Rollup merge of #117373 - saethlin:avoid-ice-lint, r=compiler-errorsMatthias Krüger-8/+4
Avoid the path trimming ICE lint in error reporting Types or really anything in MIR should never be formatted without path trimming disabled, because its formatting often tries to construct trimmed paths. In this case, the lint turns a nice error report into an irrelevant ICE.
2023-11-01Rollup merge of #117298 - clubby789:fn-missing-params, r=petrochenkovMatthias Krüger-19/+65
Recover from missing param list in function definitions Addresses the other issue mentioned in #108109
2023-11-01Auto merge of #117029 - rmehri01:mir_opt_filecheck_inline_tests, r=cjgillotbors-51/+156
Add FileCheck annotations to MIR-opt inlining tests Part of #116971, adds FileCheck annotations to MIR-opt tests in `tests/mir-opt/inline`. I left out a few (such as `inline_cycle`) where it mentioned that the particular outcome of inlining isn't important, just that the inliner doesn't get stuck in an infinite loop. r? cjgillot
2023-11-01Rework unsize documentationMichael Goulet-5/+12
2023-11-01Remove a false statement from Unsize docs, add a testMichael Goulet-1/+29
2023-11-01Comment `for_diagnostics` flag.Camille GILLOT-0/+5
2023-11-01Auto merge of #117289 - estebank:issue-72298, r=cjgillotbors-1/+127
Account for `ref` and `mut` in the wrong place for pattern ident renaming If the user writes `S { ref field: name }` instead of `S { field: ref name }`, we suggest the correct code. Fix #72298.
2023-11-01Specify diagnostic path.Camille GILLOT-6/+13
2023-11-01Rebase fallout.Camille GILLOT-10/+2
2023-11-01Rename hook.Camille GILLOT-6/+6
2023-11-01Make ui into mir-opt test.Camille GILLOT-11/+453
2023-11-01Do not assert in op_to_const.Camille GILLOT-2/+13
2023-11-01Auto merge of #117307 - taiki-e:espidf-atomic-64, r=Amanieubors-3/+3
Set max_atomic_width for riscv32*-esp-espidf to 32 Fixes #117305 > Since riscv32 does not have 64-bit atomic instructions, I do not believe there is any way to fix this problem other than setting max_atomic_width of these targets to 32. This is a breaking change because Atomic\*64 will become unavailable, but all affected targets are tier 3, and the current Atomic*64 violates the standard library's API contract and can cause problems with code that rely on the standard library's atomic types being lock-free. r? `@Amanieu` cc `@ivmarkov` `@MabezDev`
2023-11-01fix spans for inline_couroutine panic-abortRyan Mehri-11/+11
2023-11-01Avoid the path trimming ICE lint in error reportingBen Kimock-8/+4
2023-11-01Recover from missing param list in function definitionsclubby789-19/+65
2023-11-01Update minifier-rs version to 0.3.0Guillaume Gomez-3/+3
2023-11-01Auto merge of #114208 - GKFX:offset_of_enum, r=wesleywiserbors-89/+477
Support enum variants in offset_of! This MR implements support for navigating through enum variants in `offset_of!`, placing the enum variant name in the second argument to `offset_of!`. The RFC placed it in the first argument, but I think it interacts better with nested field access in the second, as you can then write things like ```rust offset_of!(Type, field.Variant.field) ``` Alternatively, a syntactic distinction could be made between variants and fields (e.g. `field::Variant.field`) but I'm not convinced this would be helpful. [RFC 3308 # Enum Support](https://rust-lang.github.io/rfcs/3308-offset_of.html#enum-support-offset_ofsomeenumstructvariant-field_on_variant) Tracking Issue #106655.
2023-11-01Auto merge of #117482 - matthiaskrgr:rollup-doc6jgm, r=matthiaskrgrbors-1394/+1376
Rollup of 4 pull requests Successful merges: - #115626 (Clean up unchecked_math, separate out unchecked_shifts) - #117397 (Don't emit delayed good-path bugs on panic) - #117401 (Refactor: move suggestion functions from demand to suggestions) - #117475 (Inline and remove `create_session`.) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-01Rollup merge of #117475 - nnethercote:rm-create_session, r=oli-obkMatthias Krüger-97/+54
Inline and remove `create_session`. Currently the parts of session initialization that happen within `rustc_interface` are split between `run_compiler` and `create_session`. This split isn't necessary and obscures what's happening. This commit merges the two functions. I think a single longer function is much clearer than splitting this code across two functions in different modules, especially when `create_session` has 13 parameters, and is misnamed (it also creates the codegen backend). The net result is 43 fewer lines of code. r? ``@oli-obk``
2023-11-01Rollup merge of #117401 - chenyukang:yukang-cleanup-hir-typeck-suggestions, ↵Matthias Krüger-1273/+1272
r=compiler-errors Refactor: move suggestion functions from demand to suggestions follow-up from https://github.com/rust-lang/rust/pull/116841#discussion_r1370506700
2023-11-01Rollup merge of #117397 - compiler-errors:dont-emit-good-path-on-panic, ↵Matthias Krüger-1/+1
r=TaKO8Ki Don't emit delayed good-path bugs on panic This should fix #117381, cc ``@RalfJung`` As opposed to delayed bugs, delayed *good path* bugs really don't make sense to show on panics.
2023-11-01Rollup merge of #115626 - clarfonthey:unchecked-math, r=thomccMatthias Krüger-23/+49
Clean up unchecked_math, separate out unchecked_shifts Tracking issue: #85122 Changes: 1. Remove `const_inherent_unchecked_arith` flag and make const-stability flags the same as the method feature flags. Given the number of other unsafe const fns already stabilised, it makes sense to just stabilise these in const context when they're stabilised. 2. Move `unchecked_shl` and `unchecked_shr` into a separate `unchecked_shifts` flag, since the semantics for them are unclear and they'll likely be stabilised separately as a result. 3. Add an `unchecked_neg` method exclusively to signed integers, under the `unchecked_neg` flag. This is because it's a new API and probably needs some time to marinate before it's stabilised, and while it *would* make sense to have a similar version for unsigned integers since `checked_neg` also exists for those there is absolutely no case where that would be a good idea, IMQHO. The longer-term goal here is to prepare the `unchecked_math` methods for an FCP and stabilisation since they've existed for a while, their semantics are clear, and people seem in favour of stabilising them.
2023-11-01Auto merge of #117436 - nikic:update-llvm-16, r=cuviperbors-0/+0
Update to LLVM 17.0.4 Fixes #116668. Fixes #116941. Fixes #116976. r? `@cuviper`
2023-11-01Auto merge of #115356 - devnexen:haiku_set_name_use_return, r=thomccbors-1/+3
`std::thread::set_name` exploit the return on haiku
2023-11-01Auto merge of #117422 - joshtriplett:stabilize-file-times, r=workingjubileebors-21/+19
Stabilize `file_set_times` Approved via FCP in https://github.com/rust-lang/rust/issues/98245 .