about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-07-07Rollup merge of #113456 - spastorino:new-rpitit-31, r=compiler-errorsMichael Goulet-2/+94
Avoid calling report_forbidden_specialization for RPITITs Fixes #113438 r? ``@compiler-errors``
2023-07-07Rollup merge of #113453 - spastorino:new-rpitit-30, r=compiler-errorsMichael Goulet-20/+52
Remove unused from_method from rustc_on_unimplemented Fixes #113439 `on_unimplemented_note` was calling `item_name` for RPITITs and that produced ICEs. I've added a regression test for that but also have removed `from_method` symbol entirely because it wasn't even used and by doing that the `item_name` call was also removed. r? ``@compiler-errors``
2023-07-07Rollup merge of #113441 - RalfJung:assign-no-overlap, r=oli-obkMichael Goulet-1/+49
miri: check that assignments do not self-overlap r? `````@oli-obk`````
2023-07-07Rollup merge of #113427 - compiler-errors:no-variances-of-rpitit-gat, ↵Michael Goulet-20/+3
r=spastorino Remove `variances_of` on RPITIT GATs, remove its one use-case It doesn't make sense to implement variances on a GAT anyways, since we don't relate GATs with variance: https://github.com/rust-lang/rust/blob/85bf07972a1041b9e25393b803d0e006bec3eaaf/compiler/rustc_middle/src/ty/relate.rs#L569-L579 r? ``@spastorino``
2023-07-07Rollup merge of #113426 - compiler-errors:rtn-in-impl-header, r=fee1-deadMichael Goulet-2/+43
Don't ICE in `resolve_bound_vars` when associated return-type bounds are in bad positions I couldn't find a better way to avoid hitting this ICE, so let's just delay it. The problem is that we really shouldn't even be *trying* to visit associated type bounds in `resolve_bound_vars` when they show up in impl headers, but we don't have enough context to do this. Fixes #113423
2023-07-07Rollup merge of #113413 - Nilstrieb:this-needs-some-triaging, r=albertlarsan68Michael Goulet-0/+4
Add needs-triage to all new issues Closes #113261 The label: https://github.com/rust-lang/rust/labels/needs-triage
2023-07-08Auto merge of #113455 - Alexendoo:clippy-tests, r=Nilstriebbors-41/+21
Fix failing clippy tests Comments out the C string literals due to https://github.com/rust-lang/rust/pull/113334 Fixes https://github.com/rust-lang/rust-clippy/issues/11121 Opened against `rust-lang/rust` in order to unblock https://github.com/rust-lang/rust/pull/113450 r? `@Nilstrieb`
2023-07-07Don't ICE in resolve_bound_vars when associated return-type bounds are in ↵Michael Goulet-2/+43
bad positions
2023-07-07Avoid calling report_forbidden_specialization for RPITITsSantiago Pastorino-2/+94
2023-07-07Add regression test for RPITITsSantiago Pastorino-0/+51
2023-07-07Remove unused from_method symbolSantiago Pastorino-20/+1
2023-07-07Fix failing clippy testsAlex Macleod-41/+21
Comments out the C string literals due to https://github.com/rust-lang/rust/pull/113334 Fixes https://github.com/rust-lang/rust-clippy/issues/11121
2023-07-07Auto merge of #113245 - lukas-code:unsizing-sanity-check, r=the8472bors-56/+107
sanity check field offsets in unsizeable structs As promised in https://github.com/rust-lang/rust/pull/112062#issuecomment-1567494994, this PR extends the layout sanity checks to ensure that structs fields don't move around when unsizing and prevent issues like https://github.com/rust-lang/rust/issues/112048 in the future. Like most other layout sanity checks, this only runs on compilers with debug assertions enabled. Here is how it looks when it fails: ```text error: internal compiler error: compiler/rustc_ty_utils/src/layout.rs:533:21: unsizing GcNode<std::boxed::Box<i32>> changed field order! Layout { size: Size(32 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Aggregate { sized: true }, fields: Arbitrary { offsets: [Size(0 bytes), Size(8 bytes), Size(24 bytes)], memory_index: [0, 1, 2] }, largest_niche: Some(Niche { offset: Size(24 bytes), value: Pointer(AddressSpace(0)), valid_range: 1..=18446744073709551615 }), variants: Single { index: 0 } } Layout { size: Size(24 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Aggregate { sized: false }, fields: Arbitrary { offsets: [Size(16 bytes), Size(0 bytes), Size(24 bytes)], memory_index: [1, 0, 2] }, largest_niche: None, variants: Single { index: 0 } } ``` r? `@the8472`
2023-07-07miri: check that assignments do not self-overlapRalf Jung-1/+49
2023-07-07Auto merge of #113437 - workingjubilee:sync-simd-2023-july-07, r=workingjubileebors-134/+339
Sync portable-simd to 2023 July 07 r? `@ghost`
2023-07-07Use new std::simd fn in miri testsJubilee Young-1/+1
Old fn were slightly divergent.
2023-07-07Sync portable-simd to 2023 July 07Jubilee Young-133/+338
Sync up to rust-lang/portable-simd@7c7dbe0c505ccbc02ff30c1e37381ab1d47bf46f
2023-07-07Remove unused importJubilee Young-1/+1
2023-07-07Fixed cast imports in doctest (rust-lang/portable-simd#355)Jubilee-1/+3
2023-07-07Disable MIPS jobs in CIJubilee Young-4/+5
2023-07-07Auto merge of #113308 - compiler-errors:poly-select, r=lcnrbors-112/+125
Split `SelectionContext::select` into fns that take a binder and don't *most* usages of `SelectionContext::select` don't need to use a binder, but wrap them in a dummy because of the signature. Let's split this out into `SelectionContext::{select,poly_select}` and limit the usages of the latter. Right now, we only have 3 places where we're calling `poly_select` -- fulfillment, internally within the old solver, and the auto-trait finder. r? `@lcnr`
2023-07-07Merge pull request #353 from rust-lang/sync-upstream-2023-06-07Jubilee-12/+16
Sync upstream
2023-07-07Auto merge of #113270 - the8472:opt-macro-tts, r=nnethercotebors-5/+13
perform TokenStream replacement in-place when possible in expand_macro
2023-07-07Auto merge of #113429 - compiler-errors:rollup-wkv4w9a, r=compiler-errorsbors-151/+307
Rollup of 8 pull requests Successful merges: - #111917 (Simplify duplicate checks for mir validator) - #112008 (Fix incorrect documented default bufsize in bufreader/writer) - #112825 (Don't call `type_of` on TAIT in defining scope in new solver) - #113164 (Add a regression test for #109054) - #113318 (Revert "alloc: Allow comparing Boxs over different allocators", add regression test) - #113397 (Prefer object candidates in new selection) - #113419 (Avoid calling item_name for RPITIT) - #113421 (Do not assert >1 RPITITs on collect_return_position_impl_trait_in_trait_tys) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-06Rollup merge of #113421 - spastorino:new-rpitit-29, r=compiler-errorsMichael Goulet-5/+45
Do not assert >1 RPITITs on collect_return_position_impl_trait_in_trait_tys Fixes #113403 Assert on collect_return_position_impl_trait_in_trait_tys is not correct when we call it from type_of(GAT). The included test is an example of a situation that collector collects 0 types. r? `@compiler-errors`
2023-07-06Rollup merge of #113419 - spastorino:new-rpitit-28, r=compiler-errorsMichael Goulet-3/+102
Avoid calling item_name for RPITIT Fixes #113405 r? `@compiler-errors`
2023-07-06Rollup merge of #113397 - compiler-errors:new-select-prefer-obj, r=lcnrMichael Goulet-0/+21
Prefer object candidates in new selection `dyn Any` shouldn't be using [this implementation](https://doc.rust-lang.org/std/any/trait.Any.html#impl-Any-for-T) during codegen. Prefer object candidates over other candidates, except for other object candidates.
2023-07-06Rollup merge of #113318 - tgross35:113283-allocator-trait-eq, r=m-ou-seMichael Goulet-26/+27
Revert "alloc: Allow comparing Boxs over different allocators", add regression test Temporary fix for #113283 Adds a test to fix the regression introduced in 001b081cc1b and revert that commit. The test fails without the revert.
2023-07-06Rollup merge of #113164 - JohnTitor:issue-109054, r=compiler-errorsMichael Goulet-0/+34
Add a regression test for #109054 Closes #109054 r? ``@compiler-errors``
2023-07-06Rollup merge of #112825 - compiler-errors:tait-defining-cycle, r=lcnrMichael Goulet-101/+67
Don't call `type_of` on TAIT in defining scope in new solver It's *never* productive to call `consider_auto_trait_candidate` on a TAIT in the defining scope, since it will always lead to a query cycle since we call `type_of` on the TAIT. So let's just don't. I've reserved this behavior just to `SolverMode::Normal` just to avoid any future problems, since this is *technically* incomplete since we're discarding a candidate that could *theoretically* apply. But given such candidate assembly *always* leads to a query cycle, I think it's relatively low risk, and I could be convinced otherwise and make this apply to both solver mode. I assume it's far less likely to be encountered in coherence, though. This is much more likely to encounter in the new solver, though it can also be encountered in the old solver too, so I'm happy to discuss whether this new behavior we even want in the first place... I encountered this in a couple of failing UI tests: * `tests/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs` * `tests/ui/type-alias-impl-trait/issue-93411.rs` r? `@lcnr`
2023-07-06Rollup merge of #112008 - intruder-kat:master, r=NilstriebMichael Goulet-2/+2
Fix incorrect documented default bufsize in bufreader/writer
2023-07-06Rollup merge of #111917 - WaffleLapkin:validate_unalloc, r=oli-obkMichael Goulet-14/+9
Simplify duplicate checks for mir validator This removes unnecessary allocations & is less code.
2023-07-07Auto merge of #112816 - Amanieu:llvm-riscv-arch, r=cuviperbors-0/+0
Update LLVM submodule This adds https://github.com/rust-lang/llvm-project/pull/147.
2023-07-07Remove variances_of on RPITIT gats, remove its one use-caseMichael Goulet-20/+3
2023-07-07Auto merge of #112796 - Kobzol:ci-merge-msvc-cargo-tools, r=pietroalbinibors-17/+6
CI: merge msvc cargo and tools jobs The `x86_64-msvc-cargo` and `x86_64-msvc-tools` jobs both run for ~1 hour, but most of that time is actually spent in building LLVM and `rustc`, so I want to try merging them. ![image](https://github.com/rust-lang/rust/assets/4539057/8652fa2a-b8b7-41d0-8f16-555d31acd9a5)
2023-07-06Don't call type_of on TAIT in defining scope in new solverMichael Goulet-101/+67
2023-07-06Do not assert >1 RPITITs on collect_return_position_impl_trait_in_trait_tysSantiago Pastorino-5/+45
2023-07-06Avoid calling item_name for RPITITSantiago Pastorino-3/+102
2023-07-06Auto merge of #113269 - jyn514:update-compiler-builtins, r=Amanieubors-4/+3
Update compiler builtins cc https://github.com/rust-lang/compiler-builtins/pull/532#discussion_r1249354225 in particular this pulls in https://github.com/rust-lang/compiler-builtins/pull/532 and https://github.com/rust-lang/compiler-builtins/pull/535. Fixes https://github.com/rust-lang/rust/issues/93166. Fixes https://github.com/rust-lang/git2-rs/issues/706. Fixes https://github.com/rust-lang/rust/issues/109064. Fixes https://github.com/rust-lang/wg-cargo-std-aware/issues/74.
2023-07-06get rid of a bit more calls to poly_selectMichael Goulet-12/+12
2023-07-06Coercion doesn't need binders eitherMichael Goulet-7/+6
2023-07-06Separate select calls that don't need a binderMichael Goulet-44/+58
2023-07-06TraitObligation -> PolyTraitObligationMichael Goulet-70/+70
2023-07-06Auto merge of #112779 - Kobzol:ci-merge-llvm-14, r=pietroalbinibors-80/+41
CI: merge x86_64-gnu-llvm-14 and x86_64-gnu-llvm-14-stage1 CI jobs Another attempt to shorten CI job times. Suggested by `@the8472` [here](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/CI.20usage/near/367172221).
2023-07-06Add needs-triage to all new issuesNilstrieb-0/+4
Closes #113261
2023-07-06add helper methods for accessing struct tailLukas Markeffsky-34/+31
2023-07-06sanity check field offsets in unsizeable structsLukas Markeffsky-0/+49
2023-07-06clean up struct layout codeLukas Markeffsky-36/+41
2023-07-06Auto merge of #113323 - Kobzol:pgo-script-llvm-ci, r=jyn514bors-2/+7
Use `llvm-config` instead of `download-ci-llvm` in PGO script This should avoid CI breakage when the LLVM stamp is updated, and also it will avoid an unnecessary LLVM download from CI. r? `@jyn514`
2023-07-06Auto merge of #113406 - matthiaskrgr:rollup-0rprs5k, r=matthiaskrgrbors-8/+21
Rollup of 4 pull requests Successful merges: - #112295 (Fix the tests-listing-format-json test on Windows) - #113246 (fix compiletest crash) - #113395 (Dont ICE for `dyn* Trait: Trait` (built-in object) goals during selection in new trait solver) - #113402 (Diagnose unsorted CGUs.) r? `@ghost` `@rustbot` modify labels: rollup