summary refs log tree commit diff
path: root/tests/ui/const-generics/generic_const_exprs
AgeCommit message (Collapse)AuthorLines
2023-06-29Fix type privacy lints error messageBryanskiy-4/+4
2023-06-29Rollup merge of #112670 - petrochenkov:typriv, r=eholkMatthias Krüger-1/+1
privacy: Type privacy lints fixes and cleanups See individual commits. Follow up to https://github.com/rust-lang/rust/pull/111801.
2023-06-25Rollup merge of #112990 - JohnTitor:issue-96699, r=TaKO8KiGuillaume Gomez-0/+87
Add a regression test for #96699 Closes #96699 r? `@BoxyUwU`
2023-06-24Add a regression test for #96699Yuki Okushi-0/+87
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-06-24Add a regression test for #109141Yuki Okushi-0/+39
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-06-15privacy: Feature gate new type privacy lintsVadim Petrochenkov-1/+1
2023-06-13Auto merge of #112549 - jieyouxu:fix-tests-for-unit-bindings, r=Nilstriebbors-1/+1
Adjust UI tests for `unit_bindings` lint - Explicitly annotate `let x: () = expr;` where `x` has unit type, or remove the unit binding to leave only `expr;` instead. - Use `let () = init;` or `let pat = ();` where appropriate. - Fix disjoint-capture-in-same-closure test which wasn't actually testing a closure: `tests/ui/closures/2229_closure_analysis/run_pass/disjoint-capture-in-same-closure.rs`. Note that unfortunately there's *a lot* of UI tests, there are a couple of places where I may have left something like `let (): ()` (this is not needed but is left over from an ealier version of the lint) which is bad style. This PR is to help with the `unit_bindings` lint at #112380.
2023-06-12Adjust UI tests for `unit_bindings`许杰友 Jieyou Xu (Joe)-1/+1
- Either explicitly annotate `let x: () = expr;` where `x` has unit type, or remove the unit binding to leave only `expr;` instead. - Fix disjoint-capture-in-same-closure test
2023-06-12Private-in-public lints implementationBryanskiy-2/+26
2023-06-08add a test for #105709Takayuki Maeda-0/+9
replace build with check Co-authored-by: Michael Goulet <michael@errs.io> use appropriate test name
2023-06-02Auto merge of #112198 - compiler-errors:rollup-o2xe4of, r=compiler-errorsbors-3/+7
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-3/+7
2023-06-01Use translatable diagnostics in `rustc_const_eval`Deadbeef-2/+2
2023-05-26Blesses UI tests, add known bug to typeid-equality-by-subtypingonestacked-4/+17
2023-05-05improve diagnostics and bless testsBoxy-7/+29
2023-05-04Rollup merge of #111103 - BoxyUwU:normal_fold_with_gce_norm, r=compiler-errorsMatthias Krüger-11/+13
correctly recurse when expanding anon consts recursing with `super_fold_with` is wrong in case `bac` is itself normalizable, the test that was supposed to test for this being wrong did not actually test for this in reality because of the usage of `{ (N) }` instead of `{{ N }}`. The former resulting in a simple `ConstKind::Param` instead of `ConstKind::Unevaluated`. Tbh generally this test seems very brittle and it will be a lot easier to test once we have normalization of assoc consts since then we can just test that `T::ASSOC` normalizes to some `U::OTHER` which normalizes to some third thing. r? `@compiler-errors`
2023-05-03rustc_middle: Fix `opt_item_ident` for non-local def idsVadim Petrochenkov-0/+6
2023-05-02correctly recurse when expanding anon constsBoxy-11/+13
2023-04-16fix library and rustdoc testsDeadbeef-6/+8
2023-04-12Special-case item attributes in the suggestion outputEsteban Küber-1/+0
2023-04-12Tweak output for 'add line' suggestionEsteban Küber-0/+1
2023-03-27Bless tidyMaybe Waffle-1/+1
2023-03-23Refine error spans for const args in hir typeckMichael Goulet-4/+4
2023-03-23Rollup merge of #109380 - Randl:patch-1, r=oli-obkMatthias Krüger-0/+52
add `known-bug` test for unsoundness issue Test for https://github.com/rust-lang/rust/issues/97156
2023-03-20Add `known-bug` test for typeid unsoundness issueEvgenii Zheltonozhskii-0/+52
2023-03-19Only expect a GAT const argMichael Goulet-0/+29
2023-02-23diagnostics: remove inconsistent English article "this" from E0107Michael Howell-5/+5
Consider `tests/ui/const-generics/generic_const_exprs/issue-102768.stderr`, the error message where it gives additional notes about where the associated type is defined, and how the dead code lint doesn't have an article, like in `tests/ui/lint/dead-code/issue-85255.stderr`. They don't have articles, so it seems unnecessary to have one here.
2023-02-22diagnostics: update test cases to refer to assoc fn with `self` as methodMichael Howell-1/+1
2023-02-21Specify what 'this' actually isMichael Goulet-3/+3
2023-02-11make `relate`'s const ty assertion use semantic equalityBoxy-0/+181
2023-02-05emit `ConstEquate` in `TypeRelating<D>`Boxy-0/+70
2023-01-31Auto merge of #106399 - estebank:type-err-span-label, r=nagisabors-1/+1
Modify primary span label for E0308 Looking at the reactions to https://hachyderm.io/`@ekuber/109622160673605438,` a lot of people seem to have trouble understanding the current output, where the primary span label on type errors talks about the specific types that diverged, but these can be deeply nested type parameters. Because of that we could see "expected i32, found u32" in the label while the note said "expected Vec<i32>, found Vec<u32>". This understandably confuses people. I believe that once people learn to read these errors it starts to make more sense, but this PR changes the output to be more in line with what people might expect, without sacrificing terseness. Fix #68220.
2023-01-30Modify primary span label for E0308Esteban Küber-1/+1
The previous output was unintuitive to users.
2023-01-30Use ObligationCtxt::new_in_snapshot in satisfied_from_param_envMichael Goulet-0/+39
2023-01-18i am freeBoxy-2/+2
2023-01-18actually print out non local anon constsBoxy-2/+2
2023-01-18test for non local anon const printingBoxy-0/+36
2023-01-18defer array len printing to const arg printingBoxy-4/+4
2023-01-16Properly pluralize 'generic constants'Michael Goulet-7/+7
2023-01-16ConstBlocks are poly if their substs are polyMichael Goulet-0/+31
2023-01-12Rollup merge of #106702 - estebank:trait-bounds, r=compiler-errorsMatthias Krüger-4/+19
Conserve cause of `ImplDerivedObligation` in E0599 CC #86377.
2023-01-12Rollup merge of #106309 - compiler-errors:prefer-non-err-candidates, r=oli-obkMatthias Krüger-42/+3
Prefer non-`[type error]` candidates during selection Fixes #102130 Fixes #106351 r? types note: Alternatively we could filter out error where-clauses during param-env construction? But we still need to filter out impls with errors during `match_impl`, I think.
2023-01-11Filter impl and where-clause candidates that reference errorsMichael Goulet-42/+3
2023-01-11Note predicate span on ImplDerivedObligationMichael Goulet-4/+6
2023-01-11Conserve cause of `ImplDerivedObligation` in E0599Esteban Küber-4/+19
CC #86377.
2023-01-11Move /src/test to /testsAlbert Larsan-0/+3267