about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-07-06Rollup merge of #113163 - JohnTitor:issue-112895, r=compiler-errorsfee1-dead-0/+40
Add a regression test for #112895 Closes #112895 if the second option is enough to close the issue r? `@compiler-errors`
2023-07-06Rollup merge of #113145 - ↵fee1-dead-2/+3
joshtriplett:style-guide-document-assignment-newlines, r=joshtriplett style-guide: Document newline rules for assignment operators The style guide gives general rules for binary operators including assignment, and one of those rules says to put the operator on the subsequent line; the style guide needs to explicitly state the exception of breaking *after* assignment operators rather than before. This is already what rustfmt does and what users do; this fixes the style guide to match the expected default style.
2023-07-06Rollup merge of #112791 - WaffleLapkin:wag_the_llvm, r=cuviperfee1-dead-0/+37
llvm ffi: Expose `CallInst->setTailCallKind` This is needed for the explicit tail calls experiment.
2023-07-06Rollup merge of #111119 - compiler-errors:style-nightly, r=joshtriplettfee1-dead-0/+6
style-guide: Add chapter about formatting for nightly-only syntax cc `@rust-lang/style` nightly policy mentioned below is being proposed in https://github.com/rust-lang/style-team/pull/180
2023-07-05style-guide: Add chapter for nightly formattingJosh Triplett-3/+5
Co-authored-by: Michael Goulet <michael@errs.io>
2023-07-05Clarify that style guide does not cover nightly-only featuresMichael Goulet-0/+4
2023-07-05Auto merge of #113287 - RalfJung:miri-test-libstd, r=JohnTitorbors-1/+1
enable test_join test in Miri Miri for quite a while now has a hack to support self-referential generators: non-`Unique` mutable references are exempt from aliasing conditions. So we can run this test now. (It passes.) Also extend a comment in a Vec test, while I am at it.
2023-07-06Add a regression test for #112895Yuki Okushi-0/+40
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-07-05Auto merge of #113370 - compiler-errors:rollup-8gvyy8e, r=compiler-errorsbors-1459/+2035
Rollup of 8 pull requests Successful merges: - #113010 (rust-installer & rls: remove exclusion from rustfmt & tidy ) - #113317 ( -Ztrait-solver=next: stop depending on old solver) - #113319 (`TypeParameterDefinition` always require a `DefId`) - #113320 (Add some extra information to opaque type cycle errors) - #113321 (Move `ty::ConstKind` to `rustc_type_ir`) - #113337 (Winnow specialized impls during selection in new solver) - #113355 (Move most coverage code out of `rustc_codegen_ssa`) - #113356 (Add support for NetBSD/riscv64 aka. riscv64gc-unknown-netbsd.) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-05Rollup merge of #113356 - he32:netbsd-riscv64, r=oli-obkMichael Goulet-2/+32
Add support for NetBSD/riscv64 aka. riscv64gc-unknown-netbsd.
2023-07-05Rollup merge of #113355 - Zalathar:ssa, r=oli-obkMichael Goulet-168/+88
Move most coverage code out of `rustc_codegen_ssa` *This is one step in my larger coverage refactoring ambitions described at <https://github.com/rust-lang/compiler-team/issues/645>.* The backend implementation of coverage instrumentation was originally split between SSA and LLVM, perhaps in the hopes that it could be used by other backends. In practice, this split mostly just makes the coverage implementation harder to navigate and harder to modify. It seems unlikely that any backend will actually implement coverage instrumentation in the foreseeable future, especially since many parts of the existing implementation (outside the LLVM backend) are heavily tied to the specific details of LLVM's coverage instrumentation features. The current shared implementation of `codegen_coverage` is heavily tied to the details of `StatementKind::Coverage`, which makes those details difficult to change. I have reason to want to change those details as part of future fixes/improvements, so this will reduce the amount of interface churn caused by those later changes. --- This is intended to be a pure refactoring change, with no changes to actual behaviour. All of the “added” code has really just been moved from other files.
2023-07-05Rollup merge of #113337 - compiler-errors:next-solver-winnow-specializing, ↵Michael Goulet-4/+37
r=lcnr Winnow specialized impls during selection in new solver We need to be able to winnow impls that are specialized by more specific impls in order for codegen to be able to proceed. r? ``@lcnr``
2023-07-05Rollup merge of #113321 - BoxyUwU:move_constkind_to_typeir, r=oli-obkMichael Goulet-250/+459
Move `ty::ConstKind` to `rustc_type_ir` Needed this in another PR for custom debug impls, and this will also be required to move the new solver into a separate crate that does not use `TyCtxt` so that r-a and friends can depend on the trait solver. Rebased on top of #113325, only the second and third commits needs reviewing
2023-07-05Rollup merge of #113320 - oli-obk:eval_obligation_query, r=petrochenkov,BoxyUwUMichael Goulet-55/+443
Add some extra information to opaque type cycle errors Plus a bunch of cleanups. This should help users debug query cycles due to auto trait checking. We'll probably want to fix cycle errors in most (or all?) cases by looking at the current item's hidden types (new solver does this), and by delaying the auto trait checks to after typeck.
2023-07-05Rollup merge of #113319 - lcnr:type-param-def-def-id, r=compiler-errorsMichael Goulet-8/+8
`TypeParameterDefinition` always require a `DefId` the `None` case never actually reaches diagnostics so it feels better for diagnostics to be able to rely on the `DefId` being there, cc #113310
2023-07-05Rollup merge of #113317 - lcnr:sketchy-new-select, r=oli-obkMichael Goulet-84/+87
-Ztrait-solver=next: stop depending on old solver removes the final dependencies on the old solver when `-Ztrait-solver=next` is enabled.
2023-07-05Rollup merge of #113010 - klensy:ri-rls-fmt, r=ozkanonurMichael Goulet-888/+881
rust-installer & rls: remove exclusion from rustfmt & tidy <strike>based on #112884</strike> `rust-installer` and `rls` no longer submodules, but not removed from exclude list for rustfmt and tidy, preventing running fmt and lints on them.
2023-07-05Add support for NetBSD/riscv64 aka. riscv64gc-unknown-netbsd.Havard Eidnes-2/+32
2023-07-05Auto merge of #113210 - fee1-dead-contrib:effects-mvp, r=oli-obkbors-26/+269
Effects/keyword generics MVP This adds `feature(effects)`, which adds `const host: bool` to the generics of const functions, const traits and const impls. This will be used to replace the current logic around const traits. r? `@oli-obk`
2023-07-05Auto merge of #112594 - ChrisDenton:process=-kill, r=Amanieubors-14/+32
Return `Ok` on kill if process has already exited This will require an FCP from `@rust-lang/libs-api.` Fixes #112423. See that issue for more details.
2023-07-05Move `coverageinfo::ffi` and `coverageinfo::map` out of SSAZalathar-6/+6
2023-07-05Remove trait `CoverageInfoMethods`, since non-LLVM backends don't need itZalathar-60/+13
These methods are only ever called from within `rustc_codegen_llvm`, so they can just be declared there as well.
2023-07-05Narrow trait `CoverageInfoBuilderMethods` down to just one methodZalathar-102/+69
This effectively inlines most of `FunctionCx::codegen_coverage` into the LLVM implementation of `CoverageInfoBuilderMethods`.
2023-07-05Workaround for old android not having echoChris Denton-1/+8
2023-07-05Auto merge of #112319 - oli-obk:assoc_ty_sized_bound_for_object_safety2, ↵bors-404/+652
r=compiler-errors Don't require associated types with Self: Sized bounds in `dyn Trait` objects Trait objects require *all* associated types to be specified, even if the associated type has an explicit `where Self: Sized` bound. The following snippet does not compile on master, but does with this PR. ```rust fn _assert_is_object_safe(_: &dyn Foo) {} pub trait Foo { type Bar where Self: Sized; } ``` In contrast, if a `Self: Sized` bound is added to a method, the methodjust isn't callable on trait objects, but the trait can be made object safe just fine. ```rust fn _assert_is_object_safe(_: &dyn Foo) {} pub trait Foo { fn foo() where Self: Sized; } ``` This PR closes this inconsistency (though it still exists for associated constants). Additionally this PR adds a new lint that informs users they can remove associated type bounds from their trait objects if those associated type bounds have a `where Self: Sized` bound, and are thus useless. r? `@compiler-errors`
2023-07-05Deal with falloutBoxy-29/+47
2023-07-05move `ConstKind` to typeir and move inherent impls to `Const`Boxy-222/+413
2023-07-05Test that you can't circumvent the `Sized` bound checkOli Scherer-0/+73
2023-07-05Only use a single loop over the associated typesOli Scherer-5/+2
2023-07-05Prefer `retain` over hand-rolling an inefficient version of itOli Scherer-7/+3
2023-07-05Make `unused_associated_type_bounds`'s lint level changeableOli Scherer-0/+4
2023-07-05Make all generics_require_sized_self go through the query to get caching.Oli Scherer-3/+3
2023-07-05Add more testsOli Scherer-0/+59
2023-07-05tidy: move a large function out of an even larger fileOli Scherer-406/+418
2023-07-05Add some extra information to opaque type cycle errorsOli Scherer-24/+421
2023-07-05Remove redundant `delay_span_bug`Oli Scherer-9/+3
2023-07-05Fix some tests to *only* test their main issue and not have secondary failuresOli Scherer-9/+9
2023-07-05Lint now-unnecessary associated type boundsOli Scherer-4/+102
2023-07-05Don't require associated types with `Self: Sized` bounds in `dyn Trait` objectsOli Scherer-14/+23
2023-07-05Show which type was not specialized on query cycle misuseOli Scherer-2/+5
2023-07-05Remove a redundant argumentOli Scherer-11/+5
2023-07-05Winnow specializing implsMichael Goulet-4/+37
2023-07-05Auto merge of #112697 - tgross35:explain-markdown, r=oli-obkbors-17/+1406
Add simple markdown formatting to `rustc --explain` output This is a second attempt at #104540, which is #63128 without dependencies. This PR adds basic markdown formatting to `rustc --explain` output when available. Currently, the output just displays raw markdown: this works of course, but it really doesn't look very elegant. (output is `rustc --explain E0038`) <img width="583" alt="image" src="https://github.com/rust-lang/rust/assets/13724985/ea418117-47af-455b-83c0-6fc59276efee"> After this patch, sample output from the same file: <img width="693" alt="image" src="https://github.com/rust-lang/rust/assets/13724985/12f7bf9b-a3fe-4104-b74b-c3e5227f3de9"> This also obeys the `--color always/auto/never` command option. Behavior: - If pager is available and supports color, print with formatting to the pager - If pager is not available or fails print with formatting to stdout - otherwise without formatting - Follow `--color always/never` if suppied - If everything fails, just print plain text to stdout r? `@oli-obk` cc `@estebank` (since the two of you were involved in the previous discussion)
2023-07-05Auto merge of #113329 - lcnr:probe_candidate, r=BoxyUwUbors-298/+280
add `ecx.probe_candidate` Not yet changing the candidate source to an enum because that would be more involved, but this by itself should already be a significant improvement imo r? `@BoxyUwU`
2023-07-04Auto merge of #113330 - matthiaskrgr:rollup-zm3owin, r=matthiaskrgrbors-93/+298
Rollup of 5 pull requests Successful merges: - #113192 (`assemble_candidates_after_normalizing_self_ty` docs) - #113251 (Use scoped-tls for SMIR to map between TyCtxt and SMIR datastructures) - #113282 (Update platform-support.md to improve ARM target descriptions) - #113296 (add flag for enabling global cache usage for proof trees and printing proof trees on error) - #113324 (implement `ConstEvaluatable` goals in new solver) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-04Auto merge of #113325 - BoxyUwU:move_mk_methods_to_const, r=lcnrbors-191/+284
Replace `mk_const` with `Const::new_x` methods Part of rust-lang/compiler-team#616. Instead of just havign `Const::new(` and nothing else I did it like this since this is more like how the `mk_x` works for `Ty`, and also another PR of mine will require changing from `Const::new(` to `Const::new_x(` anyway. r? `@oli-bok`
2023-07-04Auto merge of #113274 - workingjubilee:demote-mips, r=jyn514bors-24/+0
Remove `mips*-unknown-linux-gnu*` builders Pursuant to the current consensus in https://github.com/rust-lang/compiler-team/issues/648
2023-07-04add fixmeDeadbeef-0/+1
2023-07-04include `host_effect_index` in `Generics`Deadbeef-21/+34
2023-07-04fix typoklensy-1/+1