about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-11-03clone lessMatthias Krüger-82/+76
2023-11-03Auto merge of #117510 - elichai:patch-3, r=cuviperbors-0/+1
Add track_caller to transmute_copy Currently if `size_of::<Src>() < size_of::<Dst>()` you will see the following error: ```rust thread 'test' panicked at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/mem/mod.rs:1056:5: cannot transmute_copy if Dst is larger than Src ``` This fixes it so it will show the invocation location
2023-11-03Auto merge of #116439 - compiler-errors:on-unimplemented, r=davidtwcobors-154/+169
Pretty print `Fn` traits in `rustc_on_unimplemented` I don't think that users really ever should need to think about `Fn*` traits' tupled args for a simple trait error. r? diagnostics
2023-11-03Auto merge of #117508 - nnethercote:symbols-FxIndexSet, r=cuviperbors-21/+12
Use `FxIndexSet` in the symbol interner. It makes the code a little nicer. r? `@ghost`
2023-11-03Auto merge of #117313 - GuillaumeGomez:cg_gcc-tests, r=onur-ozkanbors-16/+231
Run part of `rustc_codegen_gcc`'s tests in CI Thanks to #112701 and `@bjorn3,` it made this much easier. Also cc `@antoyo.` r? `@bjorn3`
2023-11-03Auto merge of #117131 - compiler-errors:projection-oops, r=lcnrbors-143/+204
Add all RPITITs when augmenting param-env with GAT bounds in `check_type_bounds` When checking that associated type definitions actually satisfy their associated type bounds in `check_type_bounds`, we construct a "`normalize_param_env`" which adds a projection predicate that allows us to assume that we can project the GAT to the definition we're checking. For example, in: ```rust type Foo { type Bar: Display = i32; } ``` We would add `<Self as Foo>::Bar = i32` as a projection predicate when checking that `i32: Display` holds. That `normalize_param_env` was, for some reason, only being used to normalize the predicate before it was registered. This is sketchy, because a nested obligation may require the GAT bound to hold, and also the projection cache is broken and doesn't differentiate projection cache keys that differ by param-envs 😿. This `normalize_param_env` is also not sufficient when we have nested RPITITs and default trait methods, since we need to be able to assume we can normalize both the RPITIT and all of its child RPITITs to sufficiently prove all of its bounds. This is the cause of #117104, which only starts to fail for RPITITs that are nested 3 and above due to the projection-cache bug above.[^1] ## First fix Use the `normalize_param_env` everywhere in `check_type_bounds`. This is reflected in a test I've constructed that fixes a GAT-only failure. ## Second fix For RPITITs, install projection predicates for each RPITIT in the same function in `check_type_bounds`. This fixes #117104. not sure who to request, so... r? `@lcnr` hehe feel free to reassign :3 [^1]: The projection cache bug specifically occurs because we try normalizing the `assumed_wf_types` with the non-normalization param-env. This causes us to insert a projection cache entry that keeps the outermost RPITIT rigid, and it trivially satisifes all its own bounds. Super sketchy![^2] [^2]: I haven't actually gone and fixed the projection cache bug because it's only marginally related, but I could, and it should no longer be triggered here.
2023-11-03Set some environment variables value only if ENABLE_GCC_CODEGEN is setGuillaume Gomez-6/+17
2023-11-02Auto merge of #117134 - lcnr:dropck_outlives-coroutine, r=compiler-errorsbors-59/+110
dropck_outlives check whether generator witness needs_drop see https://rust-lang.zulipchat.com/#narrow/stream/326866-t-types.2Fnominated/topic/.23116242.3A.20Code.20no.20longer.20compiles.20after.20-Zdrop-tracking-mir.20.E2.80.A6/near/398311627 for an explanation. Fixes #116242 (or well, the repro by `@jamuraa` in https://github.com/rust-lang/rust/issues/116242#issuecomment-1739802047). I did not add a regression test as it depends on other crates. We do have 1 test going from fail to pass, showing the intended behavior. r? types
2023-11-02Pretty print Fn traits in rustc_on_unimplementedMichael Goulet-154/+169
2023-11-02Add all RPITITs when augmenting param-env with GAT bounds in check_type_boundsMichael Goulet-77/+114
2023-11-02Use the normalizing param-env always in check_type_boundsMichael Goulet-143/+167
2023-11-03Use `FxIndexSet` in the symbol interner.Nicholas Nethercote-21/+12
It makes the code a little nicer. As part of this, the interner's `Default` impl is removed and `prefill` is used in a test instead.
2023-11-02Add comment explaining why the ENABLE_GCC_CODEGEN env variable is neededGuillaume Gomez-2/+8
2023-11-02Fix invalid enabling of gcc backend in `run.sh`Guillaume Gomez-3/+3
2023-11-02Rename `SKIP_CODEGEN_TESTS` into `ENABLE_GCC_CODEGEN`Guillaume Gomez-6/+6
2023-11-02Don't include GCC backend if SKIP_CODEGEN_TESTS is not enabledGuillaume Gomez-2/+7
2023-11-02Run codegen tests outside if not llvm-15Guillaume Gomez-3/+15
2023-11-02Add FIXME header for two comments in cg_gcc and cg_clif boostrap typesGuillaume Gomez-2/+2
2023-11-02Remove `libc` dependency in cg_gcc alloc_system exampleGuillaume Gomez-4/+14
2023-11-02Skip codegen tests in llvm-15 CI checkGuillaume Gomez-2/+2
2023-11-02Force mangling version for rustc_codegen_gccGuillaume Gomez-2/+5
2023-11-02Only run cg_gcc tests on linux x86_64Guillaume Gomez-10/+2
2023-11-02Pass `--sysroot` optionGuillaume Gomez-0/+4
2023-11-02Add comment explaning when to uncomment the `prepare` command codeGuillaume Gomez-0/+2
2023-11-02Fix rustc_codegen_gcc lto issueGuillaume Gomez-0/+4
2023-11-02Fix config.sh scriptGuillaume Gomez-1/+1
2023-11-02Fix missing error libgccjit in CIGuillaume Gomez-0/+8
2023-11-02Fix compilation errors in rustc_codegen_gcc examplesGuillaume Gomez-2/+2
2023-11-02Disable `master` feature by default when building rustc_codegen_gccGuillaume Gomez-1/+0
2023-11-02Run rustc_codegen_gcc tests in the CIGuillaume Gomez-3/+162
2023-11-02Auto merge of #117471 - onur-ozkan:tmp-fix, r=clubby789bors-1/+7
bootstrap: do not purge docs on CI environment This is a temporary fix for #117430, for more information please read https://github.com/rust-lang/rust/issues/117430#issuecomment-1788160523. Fixes #117430
2023-11-02bootstrap: do not purge docs on CI environmentonur-ozkan-1/+7
Temporary fix for https://github.com/rust-lang/rust/issues/117430 Signed-off-by: onur-ozkan <work@onurozkan.dev>
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-02review + add testslcnr-4/+45
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-02only erase param env regions where neededlcnr-2/+2
2023-11-02dropck_outlives check generator witness needs_droplcnr-58/+69
2023-11-02remove outdated commentlcnr-1/+0
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