rust/tests/ui/const-generics/generic_const_exprs
bors 2ca8d358e5 Auto merge of #112549 - jieyouxu:fix-tests-for-unit-bindings, r=Nilstrieb
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-13 13:07:43 +00:00
..
assoc_const_unification
auxiliary test for non local anon const printing 2023-01-18 04:07:39 +00:00
const_kind_expr make relate's const ty assertion use semantic equality 2023-02-11 23:05:16 +00:00
abstract-const-as-cast-1.rs
abstract-const-as-cast-2.rs
abstract-const-as-cast-2.stderr
abstract-const-as-cast-3.rs
abstract-const-as-cast-3.stderr
abstract-const-as-cast-4.rs
abstract-consts-as-cast-5.rs
abstract-consts-as-cast-5.stderr
array-size-in-generic-struct-param.full.stderr Implement custom diagnostic for ConstParamTy 2023-06-01 18:21:42 +00:00
array-size-in-generic-struct-param.min.stderr Implement custom diagnostic for ConstParamTy 2023-06-01 18:21:42 +00:00
array-size-in-generic-struct-param.rs Implement custom diagnostic for ConstParamTy 2023-06-01 18:21:42 +00:00
associated-const.rs
associated-consts.rs
closures.rs
closures.stderr
const_eval_resolve_canonical.rs
const-block-is-poly.rs ConstBlocks are poly if their substs are poly 2023-01-16 20:09:31 +00:00
const-block-is-poly.stderr Properly pluralize 'generic constants' 2023-01-16 20:21:29 +00:00
cross_crate_predicate.rs
cross_crate_predicate.stderr rustc_middle: Fix opt_item_ident for non-local def ids 2023-05-03 20:09:10 +03:00
cross_crate.rs
dependence_lint.full.stderr
dependence_lint.gce.stderr
dependence_lint.rs
different-fn.rs
different-fn.stderr
division.rs
dont-eagerly-error-in-is-const-evaluatable.rs
drop_impl.rs
elaborate-trait-pred.rs
eval-privacy.rs Private-in-public lints implementation 2023-06-12 01:02:19 +03:00
eval-privacy.stderr Private-in-public lints implementation 2023-06-12 01:02:19 +03:00
eval-try-unify.rs
eval-try-unify.stderr
evaluated-to-ambig.rs
feature-gate-generic_const_exprs.rs
feature-gate-generic_const_exprs.stderr
fn_call.rs
from-sig-fail.rs
from-sig-fail.stderr
from-sig.rs
function-call.rs
function-call.stderr
impl-bounds.rs
infer-too-generic.rs
inline-const-in-const-generic-defaults.rs add a test for #105709 2023-06-08 15:24:09 +09:00
issue-62504.full.stderr
issue-62504.min.stderr defer array len printing to const arg printing 2023-01-18 04:07:39 +00:00
issue-62504.rs
issue-69654.rs
issue-69654.stderr
issue-72787.min.stderr Filter impl and where-clause candidates that reference errors 2023-01-11 20:03:29 +00:00
issue-72787.rs Filter impl and where-clause candidates that reference errors 2023-01-11 20:03:29 +00:00
issue-72819-generic-in-const-eval.full.stderr Specify what 'this' actually is 2023-02-21 05:21:07 +00:00
issue-72819-generic-in-const-eval.min.stderr
issue-72819-generic-in-const-eval.rs
issue-73298.rs
issue-73899.rs
issue-74634.rs
issue-74713.rs improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-74713.stderr improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-76595.rs
issue-76595.stderr diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
issue-79518-default_trait_method_normalization.rs
issue-79518-default_trait_method_normalization.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
issue-80561-incorrect-param-env.rs
issue-80742.rs
issue-80742.stderr Use translatable diagnostics in rustc_const_eval 2023-06-01 14:45:18 +00:00
issue-82268.rs
issue-83765.rs
issue-83765.stderr
issue-83972.rs
issue-84408.rs
issue-84669.rs
issue-85848.rs
issue-85848.stderr Note predicate span on ImplDerivedObligation 2023-01-11 19:46:45 +00:00
issue-86710.rs Adjust UI tests for unit_bindings 2023-06-12 20:24:48 +08:00
issue-89851.rs
issue-90847.rs
issue-94287.rs
issue-94287.stderr Special-case item attributes in the suggestion output 2023-04-12 22:50:10 +00:00
issue-94293.rs
issue-97047-ice-1.rs
issue-97047-ice-1.stderr
issue-97047-ice-2.rs
issue-97047-ice-2.stderr
issue-99647.rs
issue-99705.rs
issue-100217.rs
issue-100360.rs
issue-102074.rs
issue-102768.rs diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
issue-102768.stderr diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
issue-105257.rs
issue-105257.stderr
issue-105608.rs
issue-105608.stderr diagnostics: update test cases to refer to assoc fn with self as method 2023-02-22 08:40:47 -07:00
less_than.rs
let-bindings.rs
let-bindings.stderr Properly pluralize 'generic constants' 2023-01-16 20:21:29 +00:00
mismatched-gat-subst-kind.rs Only expect a GAT const arg 2023-03-19 23:46:09 +00:00
mismatched-gat-subst-kind.stderr Only expect a GAT const arg 2023-03-19 23:46:09 +00:00
needs_where_clause.rs
needs_where_clause.stderr
nested_uneval_unification-1.rs
nested_uneval_unification-2.rs correctly recurse when expanding anon consts 2023-05-02 18:42:55 +01:00
nested-abstract-consts-1.rs
nested-abstract-consts-2.rs
no_dependence.rs
no_where_clause.rs
no_where_clause.stderr
non_local_anon_const_diagnostics.rs test for non local anon const printing 2023-01-18 04:07:39 +00:00
non_local_anon_const_diagnostics.stderr i am free 2023-01-18 04:45:43 +00:00
normed_to_param_is_evaluatable.rs
object-safety-err-ret.rs
object-safety-err-ret.stderr
object-safety-err-where-bounds.rs
object-safety-err-where-bounds.stderr
object-safety-ok-infer-err.rs
object-safety-ok-infer-err.stderr
object-safety-ok.rs
obligation-cause.rs
obligation-cause.stderr Specify what 'this' actually is 2023-02-21 05:21:07 +00:00
simple_fail.rs
simple_fail.stderr
single-satisfied-ConstEvaluatable-in-probe.rs Use ObligationCtxt::new_in_snapshot in satisfied_from_param_env 2023-01-30 19:04:59 +00:00
subexprs_are_const_evalutable.rs
ty-alias-substitution.rs
typeid-equality-by-subtyping.rs Blesses UI tests, add known bug to typeid-equality-by-subtyping 2023-05-26 09:53:05 +02:00
typeid-equality-by-subtyping.stderr Blesses UI tests, add known bug to typeid-equality-by-subtyping 2023-05-26 09:53:05 +02:00
unify-op-with-fn-call.rs fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
unify-op-with-fn-call.stderr fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
unop.rs
unresolved_lifetimes_error.rs improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
unresolved_lifetimes_error.stderr improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
unused_expr.rs
unused_expr.stderr Properly pluralize 'generic constants' 2023-01-16 20:21:29 +00:00
unused-complex-default-expr.rs