about summary refs log tree commit diff
path: root/src/test/ui/rfc-2632-const-trait-impl
AgeCommit message (Collapse)AuthorLines
2022-07-29Recover keywords in boundsMaybe Waffle-4/+11
For example, this fixes a error for `impl fn()` (notice the capitalization)
2022-07-26Fix diagnostics for unfulfilled obligationsDeadbeef-7/+1
2022-07-26bless tests, remove nonexistent E0395Deadbeef-87/+77
2022-07-23Add testsDeadbeef-0/+100
2022-06-16diagnostics: fix trailing spaceklensy-2/+2
2022-06-11Handle empty where-clause betterMichael Goulet-2/+2
2022-05-30Remove `#[default..]` and add `#[const_trait]`Deadbeef-141/+33
2022-05-19Fix up testsOli Scherer-4/+83
2022-05-19Stable const things need a stability attributeOli Scherer-4/+7
2022-05-19Move check to existing passJacob Pratt-98/+36
This alters the diagnostics a bit, as the trait method is still stable. The only thing this check does is ensure that compilation fails if a trait implementation is declared const-stable.
2022-05-19Proper const stability check, default to unstableJacob Pratt-64/+67
Rather than deferring to const eval for checking if a trait is const, we now check up-front. This allows the error to be emitted earlier, notably at the same time as other stability checks. Also included in this commit is a change of the default const stability level to UNstable. Previously, an item that was `const` but did not explicitly state it was unstable was implicitly stable.
2022-04-21make `E0117` error clearTakayuki Maeda-2/+2
2022-04-11Auto merge of #94243 - compiler-errors:compiler-flags-typo, r=Mark-Simulacrumbors-1/+1
`s/compiler-flags/compile-flags` in compiletest Also make compiletest panic so this doesn't happen in the future! I literally always forget which it's called, so I wanted to make my life easier in the future. Also open to the possibility of parsing both.
2022-04-05Suggest derivable trait on E0277ohno418-0/+4
2022-03-24Properly track `ImplObligation`sEsteban Kuber-0/+12
Instead of probing for all possible impls that could have caused an `ImplObligation`, keep track of its `DefId` and obligation spans for accurate error reporting. Follow up to #89580. Addresses #89418. Remove some unnecessary clones. Tweak output for auto trait impl obligations.
2022-03-21Tidy upDeadbeef-1/+5
2022-03-21Rename `~const Drop` to `~const Destruct`Deadbeef-51/+44
2022-03-07Update tests after feature stabilizationEric Holk-78/+49
2022-03-03Cleanup feature gates.Camille GILLOT-2/+5
2022-02-21rename compiler-flags to compile-flagsMichael Goulet-1/+1
2022-02-12ReblessDeadbeef-0/+36
2022-02-12Report the selection error when possibleDeadbeef-22/+71
2022-02-12bless youDeadbeef-27/+49
2022-01-26add note suggesting that predicate is satisfied but is not constMichael Goulet-0/+35
2022-01-26Add a minimal working `append_const_msg` argumentDeadbeef-3/+3
2022-01-26Improve selection errors for `~const` trait boundsDeadbeef-35/+59
2022-01-19Foreign types are trivially dropMichael Goulet-0/+13
- Also rename a trivial_const_drop to match style of other functions in the util module. - Also add a test for `const Drop` that doesn't depend on a `~const` bound. - Also comment a bit why we remove the const bound during dropck impl check.
2022-01-19never is trivially const-drop, and add testMichael Goulet-0/+2
2022-01-18adjust testsMichael Goulet-67/+67
2022-01-11Add testDeadbeef-0/+26
2021-12-25normalize env constness for nested obligationsDeadbeef-0/+14
2021-12-22Fixed a small typo in ui test commentsfee1-dead-1/+1
2021-12-21Fix bad caching of `~const Drop` boundsDeadbeef-0/+29
2021-12-17Use a const ParamEnv when in default_method_body_is_constDeadbeef-0/+36
2021-12-16Fix default_method_body_is_const when used across cratesDeadbeef-0/+21
2021-12-12Add trailing newlineDeadbeef-1/+1
2021-12-12Revert "Auto merge of #91491 - spastorino:revert-91354, r=oli-obk"Deadbeef-3/+2
This reverts commit ff2439b7b9bafcfdff86b7847128014699df8442, reversing changes made to 2a9e0831d6603d87220cedd1b1293e2eb82ef55c.
2021-12-12Fix #91489Deadbeef-0/+18
2021-12-11Tweak assoc type obligation spansEsteban Kuber-2/+2
* 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-12-03Revert "Auto merge of #91354 - fee1-dead:const_env, r=spastorino"Santiago Pastorino-2/+3
This reverts commit 18bb8c61a975fff6424cda831ace5b0404277145, reversing changes made to d9baa361902b172be716f96619b909f340802dea.
2021-11-29`ParamEnv` should be const when `ImplItem` is within a const impl.Deadbeef-2/+21
2021-11-29Reformat everythingDeadbeef-1/+1
2021-11-29FixupOli Scherer-4/+2
2021-11-29Use the constness from the param env instead of having a separate dimension ↵Oli Scherer-21/+3
for it This breaks a ~const test that will be fixed in a follow up commit of this PR
2021-11-24Allow features like const_try in d_m_b_i_cDeadbeef-0/+51
2021-11-24Allow more cases to match ~const Drop.Deadbeef-0/+20
2021-11-20Point at source of trait bound obligations in more placesEsteban Kuber-51/+18
Be more thorough in using `ItemObligation` and `BindingObligation` when evaluating obligations so that we can point at trait bounds that introduced unfulfilled obligations. We no longer incorrectly point at unrelated trait bounds (`substs-ppaux.verbose.stderr`). In particular, we now point at trait bounds on method calls. We no longer point at "obvious" obligation sources (we no longer have a note pointing at `Trait` saying "required by a bound in `Trait`", like in `associated-types-no-suitable-supertrait*`). Address part of #89418.
2021-11-10no overlap errors after failing the orphan checklcnr-19/+85
2021-10-25fix(rustc_typeck): report function argument errors on matching typeMichael Howell-6/+0
Fixes #90101
2021-10-19Revert "Rollup merge of #86011 - tlyu:correct-sized-bound-spans, r=estebank"Yuki Okushi-6/+6
This reverts commit 36a1076d24697621a3bb67ef654b4eb79647aa54, reversing changes made to e1e9319d93aea755c444c8f8ff863b0936d7a4b6.