about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis
AgeCommit message (Collapse)AuthorLines
2023-06-14Auto merge of #112625 - matthiaskrgr:rollup-jcobj3g, r=matthiaskrgrbors-23/+53
Rollup of 7 pull requests Successful merges: - #112584 (loongarch64-none*: Remove environment component from llvm target) - #112600 (Introduce a `Stable` trait to translate MIR to SMIR) - #112605 (Improve docs/clean up negative overlap functions) - #112611 (Error on unconstrained lifetime in RPITIT) - #112612 (Fix explicit-outlives-requirements lint span) - #112613 (Fix rustdoc-gui tests on Windows) - #112620 (Fix small typo) r? `@ghost` `@rustbot` modify labels: rollup
2023-06-14Rollup merge of #112506 - compiler-errors:const-infer-ice, r=b-naberMatthias Krüger-13/+30
Properly check associated consts for infer placeholders We only reported an error if it was in a "suggestable" position (according to `is_suggestable_infer_ty`) -- this isn't correct for infer tys that can show up in other places in the constant's type, like behind a dyn trait. fixes #112491
2023-06-14remove hash_drain_filter feature usesThe 8472-1/+0
2023-06-14s/drain_filter/extract_if/ for Vec, Btree{Map,Set} and LinkedListThe 8472-1/+0
2023-06-14Error on unconstrained lifetime in RPITITMichael Goulet-23/+53
2023-06-13Suggest correct signature on missing fn returning RPITIT/AFITMichael Goulet-2/+29
2023-06-13Rollup merge of #111885 - compiler-errors:rust-call-abi-sized, r=eholkMatthias Krüger-1/+7
Don't ICE on unsized `extern "rust-call"` call Conceptually builds on #111864, but doesn't depend on it.
2023-06-11properly check associated consts for infer placeholdersMichael Goulet-13/+30
2023-06-11iat selection: normalize self ty & completely erase bound varsLeón Orell Valerian Liehr-19/+57
2023-06-08Rollup merge of #109953 - thomcc:thomcc/typeid128, r=WaffleLapkinMatthias Krüger-1/+1
Use 128 bits for TypeId hash Preliminary/Draft impl of https://github.com/rust-lang/compiler-team/issues/608 Prior art (probably incomplete list) - https://github.com/rust-lang/rust/pull/75923 - https://github.com/rust-lang/rust/pull/95845
2023-06-07Rollup merge of #112122 - compiler-errors:next-coherence, r=lcnrDylan DPC-4/+3
Add `-Ztrait-solver=next-coherence` Flag that conditionally uses the trait solver *only* during coherence, for more testing and/or eventual partial-migration onto the trait solver (in the medium- to long-term). * This still uses the selection context in some of the coherence methods I think, so it's not "complete". Putting this up for review and/or for further work in-tree. * I probably need to spend a bit more time making sure that we don't sneakily create any other infcx's during coherence that also need the new solver enabled. r? `@lcnr`
2023-06-07Auto merge of #111047 - compiler-errors:rtn-no-ty-ct-params, r=spastorinobors-39/+49
Emit an error when return-type-notation is used with type/const params These are not intended to be supported initially, even though the compiler supports them internally...
2023-06-06Don't ICE on unsized rust-call abi callMichael Goulet-1/+7
2023-06-06Make TraitEngine::new use the right solver, add compare modeMichael Goulet-3/+2
2023-06-06New trait solver is a property of inference contextMichael Goulet-1/+1
2023-06-06remove `has_error_field` helper methodlcnr-3/+5
2023-06-05Rollup merge of #112322 - ↵Matthias Krüger-1/+1
compiler-errors:no-IMPLIED_BOUNDS_ENTAILMENT-if-errs, r=eholk Don't mention `IMPLIED_BOUNDS_ENTAILMENT` if signatures reference error Fixes #112321
2023-06-05Don't mention IMPLIED_BOUNDS_ENTAILMENT if signatures reference errorMichael Goulet-1/+1
2023-06-05Remove redundant InferCtxtExt::fresh_item_substsMichael Goulet-36/+1
2023-06-05Emit an error when RTN is used with ty/ct paramsMichael Goulet-3/+48
2023-06-05Merge method, type and const object safety checksOli Scherer-0/+4
2023-06-05Avoid going through queries if a value of type `AssocItem` is already availableOli Scherer-4/+4
2023-06-04Use 128 bits for TypeId hashThom Chiovoloni-1/+1
- Switch TypeId to 128 bits - Hack around the fact that tracing-subscriber dislikes how TypeId is hashed - Remove lowering of type_id128 from rustc_codegen_llvm - Remove unnecessary `type_id128` intrinsic (just change return type of `type_id`) - Only hash the lower 64 bits of the TypeId - Reword comment
2023-06-02Rollup merge of #112183 - compiler-errors:new-solver-anon-ct, r=BoxyUwUMichael Goulet-3/+4
Normalize anon consts in new solver We don't do any of that `expand_abstract_consts` stuff so this isn't sufficient to make GCE work, but it does allow, e.g. `[(); 1]: Default`, to solve. r? `@BoxyUwU`
2023-06-02No more TyCtxt::lazy_normalizationMichael Goulet-3/+4
2023-06-02Separate AnonConst from ConstBlock in HIR.Camille GILLOT-22/+16
2023-06-02Rollup merge of #112165 - fee1-dead-contrib:rn-defualtness, r=compiler-errorsMatthias Krüger-4/+4
Rename `impl_defaultness` to `defaultness` Since this isn't just about the `impl`.
2023-06-02Auto merge of #112198 - compiler-errors:rollup-o2xe4of, r=compiler-errorsbors-77/+14
Rollup of 7 pull requests Successful merges: - #111670 (Require that const param tys implement `ConstParamTy`) - #111914 (CFI: Fix cfi with async: transform_ty: unexpected GeneratorWitness(Bi…) - #112030 (Migrate `item_trait_alias` to Askama) - #112150 (Support 128-bit atomics on all x86_64 Apple targets) - #112174 (Fix broken link) - #112190 (Improve comments on `TyCtxt` and `GlobalCtxt`.) - #112193 (Check tuple elements are `Sized` in `offset_of`) Failed merges: - #112071 (Group rfcs tests) r? `@ghost` `@rustbot` modify labels: rollup
2023-06-01Implement custom diagnostic for ConstParamTyMichael Goulet-1/+1
2023-06-01Require that const param tys implement ConstParamTyBoxy-77/+14
2023-06-01Use translatable diagnostics in `rustc_const_eval`Deadbeef-1/+1
2023-06-01Rename `impl_defaultness` to `defaultness`Deadbeef-4/+4
2023-06-01Rollup merge of #111980 - compiler-errors:unmapped-substs, r=lcnrDylan DPC-33/+78
Preserve substs in opaques recorded in typeck results This means that we now prepopulate MIR with opaques with the right substs. The first commit is a hack that I think we discussed, having to do with `DefiningAnchor::Bubble` basically being equivalent to `DefiningAnchor::Error` in the new solver, so having to use `DefiningAnchor::Bind` instead, lol. r? `@lcnr`
2023-05-31Check that RPITs are compatible with the opaques inferred during HIR typeck tooMichael Goulet-29/+36
2023-05-30Rollup merge of #112060 - lcnr:early-binder, r=jackh726Nilstrieb-13/+13
`EarlyBinder::new` -> `EarlyBinder::bind` for consistency with `Binder::bind`. it may make sense to also add `EarlyBinder::dummy` in places where we know that no parameters exist, but I left that out of this PR. r? `@jackh726` `@kylematsuda`
2023-05-30Auto merge of #112075 - WaffleLapkin:unmkII, r=lcnrbors-45/+69
Replace `tcx.mk_re_*` with `Region::new_*` Second step in implementing https://github.com/rust-lang/compiler-team/issues/616 r? `@lcnr`
2023-05-29Rollup merge of #112057 - MU001999:fix/self-sugg, r=compiler-errorsMatthias Krüger-1/+1
Suggest correct `self_ty` Fixes #112036
2023-05-29Rename `tcx.mk_re_*` => `Region::new_*`Maybe Waffle-45/+69
2023-05-29EarlyBinder::new -> EarlyBinder::bindlcnr-13/+13
2023-05-29Determine `self_ty` with expected `ty`mu001999-1/+1
2023-05-29Use `Cow` in `{D,Subd}iagnosticMessage`.Nicholas Nethercote-7/+9
Each of `{D,Subd}iagnosticMessage::{Str,Eager}` has a comment: ``` // FIXME(davidtwco): can a `Cow<'static, str>` be used here? ``` This commit answers that question in the affirmative. It's not the most compelling change ever, but it might be worth merging. This requires changing the `impl<'a> From<&'a str>` impls to `impl From<&'static str>`, which involves a bunch of knock-on changes that require/result in call sites being a little more precise about exactly what kind of string they use to create errors, and not just `&str`. This will result in fewer unnecessary allocations, though this will not have any notable perf effects given that these are error paths. Note that I was lazy within Clippy, using `to_string` in a few places to preserve the existing string imprecision. I could have used `impl Into<{D,Subd}iagnosticMessage>` in various places as is done in the compiler, but that would have required changes to *many* call sites (mostly changing `&format("...")` to `format!("...")`) which didn't seem worthwhile.
2023-05-28Make EarlyBinder's inner value private; and fix all of the resulting errorsKyle Matsuda-21/+27
2023-05-28Replace EarlyBinder(x) with EarlyBinder::new(x)Kyle Matsuda-13/+13
2023-05-26print const and type errors in braces not square bracketsBoxy-1/+1
2023-05-26Wait until type_of to remap HIR opaques back to their defn paramsMichael Goulet-28/+66
2023-05-26Fix diagnostics with errorsclubby789-1/+1
2023-05-25Ensure Fluent messages are in alphabetical orderclubby789-183/+183
2023-05-25Move DefiningAnchorMichael Goulet-1/+2
2023-05-25Auto merge of #111925 - Manishearth:rollup-z6z6l2v, r=Manishearthbors-13/+12
Rollup of 5 pull requests Successful merges: - #111741 (Use `ObligationCtxt` in custom type ops) - #111840 (Expose more information in `get_body_with_borrowck_facts`) - #111876 (Roll compiler_builtins to 0.1.92) - #111912 (Use `Option::is_some_and` and `Result::is_ok_and` in the compiler ) - #111915 (libtest: Improve error when missing `-Zunstable-options`) r? `@ghost` `@rustbot` modify labels: rollup
2023-05-24Split out opaque from type_ofMichael Goulet-305/+303