about summary refs log tree commit diff
path: root/src/test/ui/const-generics
AgeCommit message (Collapse)AuthorLines
2022-11-02Rollup merge of #99801 - ↵Matthias Krüger-0/+33
Neo-Zhixing:fix/generic_const_exprs_parent_opaque_predicates, r=oli-obk fix(generic_const_exprs): Fix predicate inheritance for children of opaque types Fixes #99705 We currently have a special case to perform predicate inheritance when the const item is in the generics. I think we're also going to need this for opaque return types. When evaluating the predicates applied to the associated item, it'll inherit from its parent, the opaque type, which will never have predicates applied. This PR bypass the opaque typed parent and inherit predicates directly from the function itself.
2022-11-01fix(generic_const_exprs): Fix predicate inheritance for children of opaque typesZhixing Zhang-0/+33
2022-10-27Correct inconsistent error messages in testsByron Zhong-1/+1
2022-10-22Auto merge of #103227 - lcnr:bye-bye-unevaluated-const, r=oli-obkbors-20/+24
stop using `ty::UnevaluatedConst` directly best reviewed commit by commit. simplifies #99798 because we now don't have to expand `ty::UnevaluatedConst` to `ty::Const`. I also remember some other places where using `ty::UnevaluatedConst` directly was annoying and caused issues, though I don't quite remember what they were rn '^^ r? `@oli-obk` cc `@JulianKnodt`
2022-10-18Clean up query descriptionsnils-2/+2
Use the same tense everywhere and prefer display over debug, as these descriptions are user facing.
2022-10-18`const_evaluatable_unchecked` to const evallcnr-20/+24
2022-10-13fix small word dupe typosRageking8-2/+2
2022-10-08Rollup merge of #102782 - Hosshii:issue-102124, r=Mark-SimulacrumMichael Howell-0/+20
Add regression test for #102124 closes #102124, which was already fixed on nightly.
2022-10-07Add regression test for #102124Hosshii-0/+20
2022-10-07fix a ICE #102768Takayuki Maeda-0/+47
2022-10-04Normalize substs before resolving instance in NoopMethodCall lintMichael Goulet-0/+23
2022-10-01bless ui testsMaybe Waffle-16/+16
2022-09-26Auto merge of #102184 - chenyukang:fix-102087-add-binding-sugg, r=nagisabors-0/+5
Suggest Default::default() when binding isn't initialized Fixes #102087
2022-09-26fix #102087, Suggest Default::default() when binding isn't initializedyukang-0/+5
2022-09-23Always print '_, even for erased lifetimes.Camille GILLOT-4/+4
2022-09-22Rollup merge of #102119 - steffahn:fix-pararmeter, r=dtolnayDylan DPC-1/+1
Fix a typo “pararmeter” in error message Issue reported on IRLO: https://internals.rust-lang.org/t/fixing-a-typo/17427
2022-09-22Bless test output changesFrank Steffahn-1/+1
2022-09-21Make error messages great again (and fix clippy and add test)Deadbeef-11/+6
2022-09-17bless tests againDeadbeef-6/+11
2022-09-16bless testsDeadbeef-1/+4
2022-09-10Rollup merge of #101578 - lcnr:resolve-hack, r=jackh726Dylan DPC-2/+2
remove bound var hack in `resolve` somehow dropped that change from #98900. r? `@jackh726`
2022-09-09reviewlcnr-10/+10
2022-09-09rename `codegen_fulfill_obligation`lcnr-2/+2
2022-09-08update ui testslcnr-10/+10
2022-09-01Auto merge of #100707 - dzvon:fix-typo, r=davidtwcobors-1/+1
Fix a bunch of typo This PR will fix some typos detected by [typos]. I only picked the ones I was sure were spelling errors to fix, mostly in the comments. [typos]: https://github.com/crate-ci/typos
2022-08-31Rollup merge of #100838 - ↵Matthias Krüger-3/+10
hkmatsumoto:move-gen-args-to-trait-when-appropriate, r=davidtwco Suggest moving redundant generic args of an assoc fn to its trait Closes #89064
2022-08-31Fix a bunch of typoDezhi Wu-1/+1
This PR will fix some typos detected by [typos]. I only picked the ones I was sure were spelling errors to fix, mostly in the comments. [typos]: https://github.com/crate-ci/typos
2022-08-29Rollup merge of #100437 - compiler-errors:better-const-mismatch-err, r=oli-obkMatthias Krüger-42/+164
Improve const mismatch `FulfillmentError` Fixes #100414
2022-08-28Support method callsHirochika Matsumoto-3/+10
2022-08-27use smaller span for suggestionsTakayuki Maeda-3/+5
2022-08-26make read_immediate error immediately on uninit, so ImmTy can carry ↵Ralf Jung-38/+20
initialized Scalar
2022-08-24Add test for #100414Michael Goulet-0/+44
2022-08-24Note binding obligation causes for const equate errorsMichael Goulet-0/+78
2022-08-24Call them constants instead of typesMichael Goulet-42/+42
2022-08-23Improve local generic parameter suggestions.Camille GILLOT-1/+1
2022-08-21Rework point-at-argMichael Goulet-14/+10
2022-08-18Reword "Required because of the requirements on the impl of ..."Andy Wang-8/+8
2022-08-18Rollup merge of #100643 - ↵Matthias Krüger-1/+3
TaKO8Ki:point-at-type-parameter-shadowing-another-type, r=estebank Point at a type parameter shadowing another type This patch fixes a part of #97459.
2022-08-17point at a type parameter shadowing another typeTakayuki Maeda-1/+3
2022-08-12Erase regions better in promote_candidateMichael Goulet-0/+25
2022-08-11Auto merge of #100315 - compiler-errors:norm-ct-in-proj, r=lcnrbors-0/+279
Keep going if normalized projection has unevaluated consts in `QueryNormalizer` #100312 was the wrong approach, I think this is the right one. When normalizing a type, if we see that it's a projection, we currently defer to `tcx.normalize_projection_ty`, which normalizes the projections away but doesn't touch the unevaluated constants. So now we just continue to fold the type if it has unevaluated constants so we make sure to evaluate those too, if we can. Fixes #100217 Fixes #83972 Fixes #84669 Fixes #86710 Fixes #82268 Fixes #73298
2022-08-10add testb-naber-0/+36
2022-08-09Keep going if normalized projection has unevaluated consts in QueryNormalizerMichael Goulet-0/+279
2022-08-03Warn about dead tuple struct fieldsFabian Wolff-2/+4
2022-07-27Rollup merge of #99651 - compiler-errors:fn-and-raw-ptr-in-const-generics, ↵Guillaume Gomez-13/+54
r=oli-obk Deeply deny fn and raw ptrs in const generics I think this is right -- just because we wrap a fn ptr in a wrapper type does not mean we should allow it in a const parameter. We now reject both of these in the same way: ``` #![feature(adt_const_params)] #[derive(Eq, PartialEq)] struct Wrapper(); fn foo<const W: Wrapper>() {} fn foo2<const F: fn()>() {} ``` This does regress one test (`src/test/ui/consts/refs_check_const_eq-issue-88384.stderr`), but I'm not sure it should've passed in the first place. cc: ``@b-naber`` who introduced that test^ fixes #99641
2022-07-26Fix diagnostics for unfulfilled obligationsDeadbeef-2/+0
2022-07-26bless tests, remove nonexistent E0395Deadbeef-44/+20
2022-07-25handle consts with param/infer in const_eval_resolve betterMichael Goulet-43/+2
2022-07-25Deeply deny fn and raw ptrs in const genericsMichael Goulet-13/+54
2022-07-22Do not resolve associated const when there is no provided valueMichael Goulet-18/+28