about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
AgeCommit message (Collapse)AuthorLines
2022-11-09Use `LayoutError`'s implementation of `IntoDiagnostic`SLASHLogin-4/+4
2022-11-09var_subdiag refinementAndyJado-0/+1
trim old
2022-11-09another optimization attemptRalf Jung-66/+83
2022-11-08Add support for custom MIR parsingJakob Degen-0/+59
2022-11-09Auto merge of #104179 - Manishearth:rollup-yvsx5hh, r=Manishearthbors-1/+3
Rollup of 7 pull requests Successful merges: - #100508 (avoid making substs of type aliases late bound when used as fn args) - #101381 (Test that target feature mix up with homogeneous floats is sound) - #103353 (Fix Access Violation when using lld & ThinLTO on windows-msvc) - #103521 (Avoid possible infinite loop when next_point reaching the end of file) - #103559 (first move on a nested span_label) - #103778 (Update several crates for improved support of the new targets) - #103827 (Properly remap and check for substs compatibility in `confirm_impl_trait_in_trait_candidate`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-08Rollup merge of #103827 - compiler-errors:rpitit-substs-compat, r=wesleywiserManish Goregaokar-1/+3
Properly remap and check for substs compatibility in `confirm_impl_trait_in_trait_candidate` Fixes #103824
2022-11-09Auto merge of #103171 - jackh726:gen-interior-hrtb-error, r=cjgillotbors-11/+15
Better error for HRTB error from generator interior cc #100013 This is just a first pass at an error. It could be better, and shouldn't really be emitted in the first place. But this is better than what was being emitted before.
2022-11-08Auto merge of #104168 - GuillaumeGomez:rollup-tf4edqc, r=GuillaumeGomezbors-1/+22
Rollup of 12 pull requests Successful merges: - #103928 (Add 'ty_error_with_guaranteed' and 'const_error_with_guaranteed') - #104027 (Place config.toml in current working directory if config not found) - #104093 (disable btree size tests on Miri) - #104097 (run alloc benchmarks in Miri and fix UB) - #104104 (Add split-debuginfo print option) - #104109 (rustdoc: Add mutable to the description) - #104113 (Fix `const_fn_trait_ref_impl`, add test for it) - #104114 (Fix invalid background-image file name) - #104132 (fix: lint against lint functions) - #104139 (Clarify licensing situation of MPSC and SPSC queue) - #104147 (Remove an address comparison from the parser) - #104165 (Add llvm-main to triagebot.toml) Failed merges: - #104115 (Migrate crate-search element to CSS variables) r? `@ghost` `@rustbot` modify labels: rollup
2022-11-08another attempt at performance improvementsRalf Jung-23/+26
2022-11-08Rollup merge of #104132 - Rejyr:rustc_lint-function-lints, r=davidtwcoGuillaume Gomez-0/+1
fix: lint against lint functions Add `#[rustc_lint_diagnostics]` to lint functions missing them. From [this discussion](https://github.com/rust-lang/rust/pull/101138#issuecomment-1306379999). r? ```@davidtwco```
2022-11-08Rollup merge of #103928 - ↵Guillaume Gomez-1/+21
chenyukang:yukang/fix-103874-add-ty_error_with_guaranteed, r=lcnr Add 'ty_error_with_guaranteed' and 'const_error_with_guaranteed' Part of #103874
2022-11-08Auto merge of #103252 - lcnr:recompute_applicable_impls, r=jackh726bors-7/+4
selection failure: recompute applicable impls The way we currently skip errors for ambiguous trait obligations seems pretty fragile so we get some duplicate errors because of this. Removing this info from selection errors changes this system to be closer to my image of our new trait solver and is also making it far easier to change overflow errors to be non-fatal :sparkles: r? types cc `@estebank`
2022-11-08Auto merge of #103965 - petrochenkov:effvisperf3, r=oli-obkbors-21/+103
resolve: More detailed effective visibility tracking for imports Per-`DefId` tracking is not enough, due to glob imports in particular, which have a single `DefId` for the whole glob import item. We need to track this stuff per every introduced name (`NameBinding`). Also drop `extern` blocks from the effective visibility table, they are nominally private and it doesn't make sense to keep them there. Later commits add some debug-only invariant checking and optimiaztions to mitigate regressions in https://github.com/rust-lang/rust/pull/103965#issuecomment-1304256445. This is a bugfix and continuation of https://github.com/rust-lang/rust/pull/102026.
2022-11-08selection failure: recompute applicable implslcnr-7/+4
2022-11-08code cleanup with err.emit_unlessyukang-1/+1
2022-11-08deprecate unchecked_claim_error_was_emitted in error_reportedyukang-1/+5
2022-11-08add 'ty_error_with_guaranteed' and 'const_error_with_guaranteed'yukang-0/+16
2022-11-07fix: lint against lint functionsRejyr-0/+1
fix: lint against the functions `LintContext::{lookup_with_diagnostics,lookup,struct_span_lint,lint}`, `TyCtxt::struct_lint_node`, `LintLevelsBuilder::struct_lint`.
2022-11-07less unsupported errors in Miri, and clarifying commentsRalf Jung-9/+9
2022-11-07Add an optional Span to BrAnon and use it to print better error for HRTB ↵Jack Huey-11/+15
error from generator interior
2022-11-07Only assume Stacked Borrows if -Zunsound-mir-opts is givenJannis Christopher Köhl-0/+9
2022-11-07Prevent registration inside references if target is !FreezeJannis Christopher Köhl-1/+1
2022-11-07Only track (trivially) freeze typesJannis Christopher Köhl-1/+1
2022-11-07try to make things faster when only ptr provenance can existRalf Jung-5/+17
2022-11-07Rollup merge of #104059 - Rejyr:rustc_middle-lint-typo, r=petrochenkovYuki Okushi-1/+1
Fix typo in `rustc_middle/lint.rs`
2022-11-06cfg-step codeMark Rousskov-1/+0
2022-11-06Auto merge of #99943 - compiler-errors:tuple-trait, r=jackh726bors-0/+2
Implement `std::marker::Tuple`, use it in `extern "rust-call"` and `Fn`-family traits Implements rust-lang/compiler-team#537 I made a few opinionated decisions in this implementation, specifically: 1. Enforcing `extern "rust-call"` on fn items during wfcheck, 2. Enforcing this for all functions (not just ones that have bodies), 3. Gating this `Tuple` marker trait behind its own feature, instead of grouping it into (e.g.) `unboxed_closures`. Still needing to be done: 1. Enforce that `extern "rust-call"` `fn`-ptrs are well-formed only if they have 1/2 args and the second one implements `Tuple`. (Doing this would fix ICE in #66696.) 2. Deny all explicit/user `impl`s of the `Tuple` trait, kinda like `Sized`. 3. Fixing `Tuple` trait built-in impl for chalk, so that chalkification tests are un-broken. Open questions: 1. Does this need t-lang or t-libs signoff? Fixes #99820
2022-11-06make uninit_mask a unit testRalf Jung-1/+22
2022-11-06fix: typoRejyr-1/+1
2022-11-06move InitMask to its own moduleRalf Jung-592/+578
2022-11-06dont debug-print allocations, that's too verboseRalf Jung-4/+4
2022-11-06interpret: support for per-byte provenanceRalf Jung-204/+328
2022-11-06Auto merge of #103720 - crlf0710:most_translation_attr, r=compiler-errorsbors-1/+4
Lint against usages of `struct_span_lint_hir`. r? `@compiler-errors`
2022-11-06Rollup merge of #104016 - Nilstrieb:query-descs-more, r=compiler-errorsMatthias Krüger-1/+17
Add internal descriptions to a few queries helps with #104008
2022-11-06Auto merge of #103975 - oli-obk:tracing, r=jackh726bors-2/+2
Some tracing and comment cleanups Pulled out of https://github.com/rust-lang/rust/pull/101900 to see if that is the perf impact
2022-11-05Use `FmtPrinter` instead of creating `Instance`clubby789-0/+6
2022-11-05Enforce rust-check ABI in signatures, callsMichael Goulet-0/+2
2022-11-05Add internal descriptions to a few queriesNilstrieb-1/+17
2022-11-05resolve: Fill effective visibilities for import def ids in a separate passVadim Petrochenkov-2/+28
This should result in less update calls than doing it repeatedly during the fix point iteration.
2022-11-05privacy: Check effective visibility invariantsVadim Petrochenkov-1/+50
2022-11-05resolve: More detailed effective visibility tracking for importsVadim Petrochenkov-18/+25
Also drop `extern` blocks from the effective visibility table, they are nominally private and it doesn't make sense to keep them there.
2022-11-05Rollup merge of #103984 - V0ldek:103974-refactor-mk_const, r=BoxyUwUMatthias Krüger-36/+31
Refactor tcx mk_const parameters. Unroll the `ty::ConstS` parameter to `TyCtxt::mk_const` into separate `ty::ConstKind` and `Ty` parameters. Signature change is in: https://github.com/V0ldek/rust/blob/c97fd8183a98d6a89b8fc2e02eb068298e6fb7dc/compiler/rustc_middle/src/ty/context.rs#L2234 and https://github.com/V0ldek/rust/blob/c97fd8183a98d6a89b8fc2e02eb068298e6fb7dc/compiler/rustc_middle/src/ty/context.rs#L2572-L2575 the rest is callsites. Closes #103974 r? `@oli-obk`
2022-11-04Refactor tcx mk_const parameters.Mateusz-36/+31
2022-11-04Rollup merge of #103937 - BoxyUwU:misc_cleanups, r=compiler-errorsMatthias Krüger-1/+15
minor changes to make method lookup diagnostic code easier to read The end result of around 4 days of trying to understand this 1000+ line long function- a bunch of tiny nitpicks r? `@compiler-errors`
2022-11-04Some tracing and comment cleanupsOli Scherer-2/+2
2022-11-04Rollup merge of #103915 - chenyukang:yukang/fix-103874, r=lcnrMatthias Krüger-24/+11
Improve use of ErrorGuaranteed and code cleanup Part of #103874
2022-11-03CleanupsBoxy-1/+15
2022-11-03change error_reported to use Result instead of an optionyukang-8/+5
2022-11-02deprecate DelaySpanBugEmitted and use ErrorGuaranteed directlyyukang-17/+7
2022-11-01Format dyn Trait better in type_name intrinsicMichael Goulet-1/+1