about summary refs log tree commit diff
path: root/compiler
AgeCommit message (Collapse)AuthorLines
2023-12-18Check generic params after sigature for main-fn-tyr0cky-52/+54
2023-12-18Auto merge of #118584 - gurry:118144-projection-kind-mismatched, r=WaffleLapkinbors-36/+24
Fix ICE `ProjectionKinds Deref and Field were mismatched` Fix #118144 Removed the check that ICEd if the sequence of projection kinds were different across captures. Instead we now sort based only on `Field` projection kinds.
2023-12-18Auto merge of #117818 - fmease:properly-reject-defaultness-on-free-consts, ↵bors-5/+7
r=cjgillot Properly reject `default` on free const items Fixes #117791. Technically speaking, this is a breaking change but I doubt it will lead to any real-world regressions (maybe in some macro-trickery crates?). Doing a crater run probably isn't worth it.
2023-12-18llvm-wrapper: adapt for LLVM API changesKrasimir Georgiev-0/+3
Adapt for https://github.com/llvm/llvm-project/commit/8ecbb0404d740d1ab173554e47cef39cd5e3ef8c.
2023-12-18Fix ICE `ProjectionKinds Deref and Field were mismatched`Gurinder Singh-36/+24
2023-12-18Use `.into_diagnostic()` less.Nicholas Nethercote-130/+109
This commit replaces this pattern: ``` err.into_diagnostic(dcx) ``` with this pattern: ``` dcx.create_err(err) ``` in a lot of places. It's a little shorter, makes the error level explicit, avoids some `IntoDiagnostic` imports, and is a necessary prerequisite for the next commit which will add a `level` arg to `into_diagnostic`. This requires adding `track_caller` on `create_err` to avoid mucking up the output of `tests/ui/track-diagnostics/track4.rs`. It probably should have been there already.
2023-12-18Add new tier 3 aarch64-apple-watchos targetleohowell-0/+20
2023-12-18Auto merge of #119069 - matthiaskrgr:rollup-xxk4m30, r=matthiaskrgrbors-24/+68
Rollup of 5 pull requests Successful merges: - #118852 (coverage: Skip instrumenting a function if no spans were extracted from MIR) - #118905 ([AIX] Fix XCOFF metadata) - #118967 (Add better ICE messages for some undescriptive panics) - #119051 (Replace `FileAllocationInfo` with `FileEndOfFileInfo`) - #119059 (Deny `~const` trait bounds in inherent impl headers) r? `@ghost` `@rustbot` modify labels: rollup
2023-12-18dont discard overflow from normalizes-to goalslcnr-22/+48
2023-12-18track the source of nested goalslcnr-81/+173
2023-12-18Rollup merge of #119059 - fmease:no-tilde-const-in-inh-impl-headers, r=fee1-deadMatthias Krüger-3/+17
Deny `~const` trait bounds in inherent impl headers Follow-up to #117817. Implements https://github.com/rust-lang/rust/pull/117817#discussion_r1416213747. Fixes #117004. r? fee1-dead or compiler
2023-12-18Rollup merge of #118967 - RossSmyth:panic-messages, r=TaKO8KiMatthias Krüger-4/+11
Add better ICE messages for some undescriptive panics Add some better messages at some panics re: #118955 I took a look at some others but either was not able to figure out what they did, or it was unclear what they should say instead. For example in the query system whether each time a poisoned value is matched upon if they should all just call `FatalError.raise()`
2023-12-18Rollup merge of #118905 - bzEq:revert-u64-on-xcoff, r=WaffleLapkinMatthias Krüger-10/+14
[AIX] Fix XCOFF metadata #118344 accidentally changed the way to get metadata from XCOFF file and broken our internal CI. This PR reverts part of #118344 .
2023-12-18Rollup merge of #118852 - Zalathar:no-spans, r=cjgillotMatthias Krüger-7/+26
coverage: Skip instrumenting a function if no spans were extracted from MIR The immediate symptoms of #118643 were fixed by #118666, but some users reported that their builds now encounter another coverage-related ICE: ``` error: internal compiler error: compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs:98:17: A used function should have had coverage mapping data but did not: (...) ``` I was able to reproduce at least one cause of this error: if no relevant spans could be extracted from a function, but the function contains `CoverageKind::SpanMarker` statements, then codegen still thinks the function is instrumented and complains about the fact that it has no coverage spans. This PR prevents that from happening in two ways: - If we didn't extract any relevant spans from MIR, skip instrumenting the entire function and don't create a `FunctionCoverateInfo` for it. - If coverage codegen sees a `CoverageKind::SpanMarker` statement, skip it early and avoid creating `func_coverage`. --- Fixes #118850.
2023-12-18Rename many `DiagCtxt` and `EarlyDiagCtxt` locals.Nicholas Nethercote-207/+199
2023-12-18Rename many `EarlyDiagCtxt` arguments.Nicholas Nethercote-168/+168
2023-12-18Rename many `DiagCtxt` arguments.Nicholas Nethercote-327/+291
2023-12-18Rename `__diagnostic_handler_sess` as `_sess`.Nicholas Nethercote-4/+5
2023-12-18Rename `DiagnosticDeriveKind::Diagnostic::handler` as ↵Nicholas Nethercote-10/+10
`DiagnosticDeriveKind::Diagnostic::dcx`.
2023-12-18Rename `CollectProcMacros::handler` as `CollectProcMacros::dcx`.Nicholas Nethercote-11/+11
2023-12-18Rename `EarlyDiagCtxt::handler` as `EarlyDiagCtxt::dcx`.Nicholas Nethercote-17/+14
2023-12-18Rename `SilentEmitter::fatal_handler` as `SilentEmitter::fatal_dcx`.Nicholas Nethercote-5/+5
2023-12-18Rename `UnstableOptions::diagnostic_handler_flags` as ↵Nicholas Nethercote-2/+2
`UnstableOptions::dcx_flags`.
2023-12-18Rename `CodegenContext::create_diag_handler` as `CodegenContext::create_dcx`.Nicholas Nethercote-14/+10
2023-12-18Rename `ShowSpanVisitor::span_diagnostic` as `ShowSpanVisitor::dcx`.Nicholas Nethercote-6/+6
2023-12-18Rename `AstValidator::err_handler` as `AstValidator::dcx`.Nicholas Nethercote-41/+38
2023-12-18Rename `DiagnosticBuilder::handler` as `DiagnosticBuilder::dcx`.Nicholas Nethercote-2/+2
2023-12-18Rename `ParseSess::with_span_handler` as `ParseSess::with_dcx`.Nicholas Nethercote-5/+5
2023-12-18Rename `Parser::span_diagnostic` as `Parser::dcx`.Nicholas Nethercote-42/+40
2023-12-18Rename `Session::span_diagnostic` as `Session::dcx`.Nicholas Nethercote-194/+166
2023-12-18Rename `ParseSess::span_diagnostic` as `ParseSess::dcx`.Nicholas Nethercote-83/+75
2023-12-18Rename `HandlerFlags` as `DiagCtxtFlags`.Nicholas Nethercote-8/+8
2023-12-18Rename `EarlyErrorHandler` as `EarlyDiagCtxt`.Nicholas Nethercote-73/+62
2023-12-18Rename `HandlerInner` as `DiagCtxtInner`.Nicholas Nethercote-10/+10
2023-12-18Rename `Handler` as `DiagCtxt`.Nicholas Nethercote-177/+188
2023-12-18Make sure all kinds of generators only return unitMichael Goulet-3/+4
2023-12-18Ensure `yield` expressions desugar correctly in async generatorsMichael Goulet-20/+32
2023-12-18Address commentKai Luo-1/+1
2023-12-18Deny ~const trait bounds in inherent impl headersLeón Orell Valerian Liehr-3/+17
2023-12-18resolve: Replace visibility table in resolver outputs with query feedingVadim Petrochenkov-82/+49
Also feed missing visibilities for import stems and trait impl items, which were previously evaluated lazily.
2023-12-17Tolerate overaligned MIR constants for codegen.Camille GILLOT-1/+1
2023-12-17Rollup merge of #119052 - cjgillot:gvn-index-overflow, r=compiler-errorsMatthias Krüger-5/+3
Avoid overflow in GVN constant indexing. Fixes https://github.com/rust-lang/rust/issues/118992 Fixes https://github.com/rust-lang/rust/issues/119008
2023-12-17Rollup merge of #119022 - compiler-errors:no-constness, r=fee1-deadMatthias Krüger-19/+12
Remove unnecessary constness from ProjectionCandidate Constness in an item bound will be represented by an effect param, so no need to record constness here. r? fee1-dead
2023-12-17Rollup merge of #118928 - EliseZeroTwo:EliseZeroTwo/fix-issue-118786, r=cjgillotMatthias Krüger-0/+7
fix: Overlapping spans in delimited meta-vars Closes #118786 Delimited meta-vars inside of MBE's spans were set to have the same opening and closing position resulting in an ICE when debug assertions were enabled and an error was present in the templated code. This ensures that the spans do not overlap, whilst still having the spans point at the usage of the meta-var inside the macro definition. It includes a regression test. 🖤
2023-12-17Rollup merge of #118880 - GearsDatapacks:issue-118859-fix, r=compiler-errorsMatthias Krüger-3/+32
More expressions correctly are marked to end with curly braces Fixes #118859, and replaces the mentioned match statement with an exhaustive list, so that this code doesn't get overlooked in the future
2023-12-17Avoid overflow in GVN constant indexing.Camille GILLOT-5/+3
2023-12-17Auto merge of #119048 - aliemjay:perf-register-pred, r=compiler-errorsbors-2/+3
don't fold ParamEnv in register_predicate_obligation \>5% perf gain for diesel!
2023-12-17don't fold ParamEnv in register_predicate_obligationAli MJ Al-Nasrawy-2/+3
2023-12-17Auto merge of #117884 - bvanjoi:fix-117794, r=compiler-errorsbors-0/+4
skip rpit constraint checker if borrowck return type error Fixes #117794 Fixes #117886 Fixes #119025 Prior to change #117418, the value of `concrete_opaque_types` for `mir_borrock(T::a::opaque)` was `None`. However, due to modifications in `body.local_decls`, the return value had been changed. The changed of `body.local_decls` has let to the addition of `ty:Error` to `infcx.opaque_type_storage.opaque_types` during `TypeChecker::equate_inputs_and_outputs`. This is due to it utilizing the output of a function signature that was appended during `construct_error`(which previously only appended a `ty::Error`) and then execute `TypeChecker::Related_types`. Therefore, in this PR, I've implemented a condition to bypass the rpit check when an error is encountered. r? `@compiler-errors`
2023-12-17Auto merge of #118828 - mu001999:master, r=b-naberbors-17/+0
Remove dead codes in rustc_codegen_gcc Detected by #118257