about summary refs log tree commit diff
path: root/src/test/ui/associated-consts
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-1958/+0
2023-01-04Move testsCaio-0/+134
2022-12-04Add regression test for #47814Yuki Okushi-0/+28
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-02Rollup merge of #104614 - Nilstrieb:type-ascribe!, r=TaKO8KiMatthias Krüger-48/+25
Add `type_ascribe!` macro as placeholder syntax for type ascription This makes it still possible to test the internal semantics of type ascription even once the `:`-syntax is removed from the parser. The macro now gets used in a bunch of UI tests that test the semantics and not syntax of type ascription. I might have forgotten a few tests but this should hopefully be most of them. The remaining ones will certainly be found once type ascription is removed from the parser altogether. Part of #101728
2022-11-20Move testsCaio-0/+38
2022-11-19Use `type_ascribe!` in many UI testsNilstrieb-48/+25
Use it in all UI tests that are about the semantics and not the syntax of type ascription.
2022-11-16cleanup and dedupe CTFE and Miri error reportingRalf Jung-18/+33
2022-10-07make const_err a hard errorRalf Jung-37/+6
2022-10-06Rollup merge of #98496 - BoxyUwU:instancers_bad_equality, r=lcnrMatthias Krüger-1/+41
make `compare_const_impl` a query and use it in `instance.rs` Fixes #88365 the bug in #88365 was caused by some `instance.rs` code using the `PartialEq` impl on `Ty` to check that the type of the associated const in an impl is the same as the type of the associated const in the trait definition. This was wrong for two reasons: - the check typeck does is that the impl type is a subtype of the trait definition's type (see `mismatched_impl_ty_2.rs` which [was ICEing](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=f6d60ebe6745011f0d52ab2bc712025d) before this PR on stable) - it assumes that if two types are equal then the `PartialEq` impl will reflect that which isnt true for higher ranked types or type level constants when `feature(generic_const_exprs)` is enabled (see `mismatched_impl_ty_3.rs` for higher ranked types which was [ICEing on stable](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=d7af131a655ed515b035624626c62c71)) r? `@lcnr`
2022-10-01bless ui testsMaybe Waffle-3/+3
2022-09-30blessBoxy-1/+1
2022-09-30make `compare_const_impl` a query and use it in `instance.rs`Boxy-0/+40
2022-09-27Deny associated type bindings within associated type bindingsMichael Goulet-0/+21
2022-09-13Use tcx.hir() utils for spans in MIR building.Camille GILLOT-5/+5
This corrects the `span_with_body` in the case of closures, which was incorrectly shortened to the `def_span`.
2022-08-22bless ui testsNilstrieb-5/+5
2022-08-03Warn about dead tuple struct fieldsFabian Wolff-1/+1
2022-07-29Do not allow bad projection term to leak into the type checkerMichael Goulet-6/+6
2022-07-24Combine redundant obligation cause codesMichael Goulet-2/+2
2022-07-19Add E0790 as more specific variant of E0283aticu-19/+13
2022-07-01Auto merge of #93967 - cjgillot:short-struct-span, r=petrochenkovbors-33/+29
Shorten def_span for more items. The `def_span` query only returns the signature span for functions. Struct/enum/union definitions can also have a very long body. This PR shortens the associated span.
2022-07-01Shorten def_span for more items.Camille GILLOT-33/+29
2022-07-01Auto merge of #98402 - cjgillot:undead, r=michaelwoeristerbors-2/+2
Rewrite dead-code pass to avoid fetching HIR. This allows to get a more uniform handling of spans, and to simplify the grouping of diagnostics for variants and fields.
2022-06-25make const_err show up in future breakage reportsRalf Jung-0/+25
2022-06-22Uniform spans in dead code lint.Camille GILLOT-2/+2
2022-06-19collapse dead code warnings into a single diagnosticTakayuki Maeda-2/+2
add comments in `store_dead_field_or_variant` support multiple log level add a item ident label fix ui tests fix a ui test fix a rustdoc ui test use let chain refactor: remove `store_dead_field_or_variant` fix a tiny bug
2022-06-16--bless uiMaybe Waffle-4/+3
2022-06-15Add regression test for #93775Yuki Okushi-0/+29
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-06-14rebaseb-naber-9/+9
2022-06-14implement valtrees as the type-system representation for constant valuesb-naber-80/+7
2022-05-12Add tests.Camille GILLOT-0/+24
2022-03-23separate const prop lint from optimizationsCarl Scherer-18/+33
2022-03-09keep ERROR in messageb-naber-1/+1
2022-03-09normalization change and rebaseb-naber-40/+101
2022-03-09bless testsb-naber-101/+40
2022-03-03Cleanup feature gates.Camille GILLOT-4/+2
2022-02-10Fix ICE if no trait assoc const eqkadmin-0/+76
2022-02-03Fix ret > 1 bound if shadowed by constkadmin-0/+31
Prior to a change, it would only look at types in bounds. When it started looking for consts, shadowing type variables with a const would cause an ICE, so now defer looking at consts only if there are no types present.
2022-02-01Fix w/ commentskadmin-6/+65
2022-01-31Add ValuePairs::Terms & Fix compile errorkadmin-0/+16
And use correct substs.
2022-01-28Remove generalization over projectionkadmin-0/+29
Instead, just use a term everywhere.
2022-01-27Continue work on assoc const eqkadmin-19/+6
2022-01-17Update with final commentskadmin-24/+5
2022-01-17Add term to ExistentialProjectionkadmin-2/+37
Also prevent ICE when adding a const in associated const equality.
2022-01-17Use Term in ProjectionPredicatekadmin-0/+5
ProjectionPredicate should be able to handle both associated types and consts so this adds the first step of that. It mainly just pipes types all the way down, not entirely sure how to handle consts, but hopefully that'll come with time.
2022-01-17add eq constraints on associated constantskadmin-0/+14
2021-12-11Tweak assoc type obligation spansEsteban Kuber-6/+11
* Point at RHS of associated type in obligation span * Point at `impl` assoc type on projection error * Reduce verbosity of recursive obligations * Point at source of binding lifetime obligation * Tweak "required bound" note * Tweak "expected... found opaque (return) type" labels * Point at set type in impl assoc type WF errors
2021-11-20Do not mention associated items when they introduce an obligationEsteban Kuber-16/+0
2021-10-15Bless testsCameron Steffen-1/+1
2021-10-13Remove textual span from diagnostic stringOli Scherer-1/+1
2021-09-25Fix incorrect disambiguation suggestion for associated itemsFabian Wolff-4/+4