rust/src/test/ui/const-generics
Dylan DPC e032bb7c65
Rollup merge of #77439 - varkor:min_const_generics-tests, r=lcnr,estebank
Fix missing diagnostic span for `impl Trait` with const generics, and add various tests for `min_const_generics` and `const_generics`

Closes https://github.com/rust-lang/rust/issues/61410.

Adds `min_const_generics` tests for:
- https://github.com/rust-lang/rust/issues/73727
- https://github.com/rust-lang/rust/issues/72293
- https://github.com/rust-lang/rust/issues/67375
- https://github.com/rust-lang/rust/issues/75153
- https://github.com/rust-lang/rust/issues/71922
- https://github.com/rust-lang/rust/issues/69913
- https://github.com/rust-lang/rust/issues/67945
- https://github.com/rust-lang/rust/issues/69239

Adds `const_generics` tests for:
- https://github.com/rust-lang/rust/issues/67375
- https://github.com/rust-lang/rust/issues/75153
- https://github.com/rust-lang/rust/issues/71922
- https://github.com/rust-lang/rust/issues/69913
- https://github.com/rust-lang/rust/issues/67945
- https://github.com/rust-lang/rust/issues/69239

(I only added separate `min_const_generics` and `const_generics` tests if they were handled differently by the two features.)

We need to figure out how to deduplicate when `const_generics` is stabilised, but we can discuss that later. For now, we should be checking neither feature breaks, so require regression tests for both. I've given them identical names when I've added both, which should make it easier to spot them later.

r? @lcnr
2020-10-05 02:29:36 +02:00
..
array-impls Fix copypaste in test into-iter-impls-length-33 (const generic 32 -> 33) 2020-07-05 19:06:02 +03:00
auxiliary Add revisions to const generic UI tests. 2020-09-10 09:40:54 +02:00
const_evaluatable_checked Replace "non trivial" with "non-trivial" 2020-10-03 14:28:54 +01:00
defaults Add revisions to const generic default UI tests. 2020-09-10 09:18:40 +02:00
infer use the correct span when dealing with inference variables 2020-09-23 10:44:11 +02:00
issues Rollup merge of #77439 - varkor:min_const_generics-tests, r=lcnr,estebank 2020-10-05 02:29:36 +02:00
min_const_generics Rollup merge of #77439 - varkor:min_const_generics-tests, r=lcnr,estebank 2020-10-05 02:29:36 +02:00
occurs-check add tests 2020-09-21 12:27:55 +02:00
std pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
type-dependent Add array window fn 2020-09-16 14:52:20 +00:00
apit-with-const-param.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
argument_order.full.stderr Fix duplicate error messages in const_generics tests 2020-08-31 18:52:22 +08:00
argument_order.min.stderr Fix duplicate error messages in const_generics tests 2020-08-31 18:52:22 +08:00
argument_order.rs Fix duplicate error messages in const_generics tests 2020-08-31 18:52:22 +08:00
array-size-in-generic-struct-param.full.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
array-size-in-generic-struct-param.min.stderr Replace "non trivial" with "non-trivial" 2020-10-03 14:28:54 +01:00
array-size-in-generic-struct-param.rs Replace "non trivial" with "non-trivial" 2020-10-03 14:28:54 +01:00
array-wrapper-struct-ctor.rs Added a lot of min_const_generics revisions 2020-08-26 18:50:17 +08:00
broken-mir-1.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
broken-mir-2.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
cannot-infer-type-for-const-param.rs Added a lot of min_const_generics revisions 2020-08-26 18:50:17 +08:00
coerce_unsized_array.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
concrete-const-as-fn-arg.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
concrete-const-impl-method.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
condition-in-trait-const-arg.rs Update stderr files 2020-08-12 20:04:36 +00:00
const-arg-in-fn.rs Update stderr files 2020-08-12 20:04:36 +00:00
const-arg-type-arg-misordered.full.stderr Added a lot of min_const_generics revisions 2020-08-26 18:50:17 +08:00
const-arg-type-arg-misordered.min.stderr Added a lot of min_const_generics revisions 2020-08-26 18:50:17 +08:00
const-arg-type-arg-misordered.rs Fix duplicate error messages in const_generics tests 2020-08-31 18:52:22 +08:00
const-argument-cross-crate-mismatch.full.stderr Add revisions to const generic UI tests. 2020-09-10 09:40:54 +02:00
const-argument-cross-crate-mismatch.min.stderr Add revisions to const generic UI tests. 2020-09-10 09:40:54 +02:00
const-argument-cross-crate-mismatch.rs Add revisions to const generic UI tests. 2020-09-10 09:40:54 +02:00
const-argument-cross-crate.rs Add revisions to const generic UI tests. 2020-09-10 09:40:54 +02:00
const-argument-if-length.full.stderr Move tests 2020-10-03 18:01:11 +01:00
const-argument-if-length.min.stderr Move tests 2020-10-03 18:01:11 +01:00
const-argument-if-length.rs Move tests 2020-10-03 18:01:11 +01:00
const-argument-non-static-lifetime.rs Update stderr files 2020-08-12 20:04:36 +00:00
const-expression-parameter.full.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
const-expression-parameter.min.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
const-expression-parameter.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
const-fn-with-const-param.rs Update stderr files 2020-08-12 20:04:36 +00:00
const-generic-array-wrapper.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
const-generic-type_name.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
const-param-after-const-literal-arg.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
const-param-before-other-params.full.stderr Added a lot of min_const_generics revisions 2020-08-26 18:50:17 +08:00
const-param-before-other-params.min.stderr Fix duplicate error messages in const_generics tests 2020-08-31 18:52:22 +08:00
const-param-before-other-params.rs Fix duplicate error messages in const_generics tests 2020-08-31 18:52:22 +08:00
const-param-elided-lifetime.full.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
const-param-elided-lifetime.min.stderr change const param ty warning message 2020-08-18 22:44:06 +02:00
const-param-elided-lifetime.rs change const param ty warning message 2020-08-18 22:44:06 +02:00
const-param-from-outer-fn.full.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
const-param-from-outer-fn.min.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
const-param-from-outer-fn.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
const-param-in-trait-ungated.rs Add tests 2019-05-04 14:39:43 +01:00
const-param-in-trait-ungated.stderr impl review 2020-08-05 18:30:37 +02:00
const-param-in-trait.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
const-param-type-depends-on-const-param.full.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
const-param-type-depends-on-const-param.min.stderr change const param ty warning message 2020-08-18 22:44:06 +02:00
const-param-type-depends-on-const-param.rs change const param ty warning message 2020-08-18 22:44:06 +02:00
const-param-type-depends-on-type-param-ungated.rs Add regression test for #69414 2020-07-17 15:45:50 +01:00
const-param-type-depends-on-type-param-ungated.stderr impl review 2020-08-05 18:30:37 +02:00
const-param-type-depends-on-type-param.full.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
const-param-type-depends-on-type-param.min.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
const-param-type-depends-on-type-param.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
const-parameter-uppercase-lint.full.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
const-parameter-uppercase-lint.min.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
const-parameter-uppercase-lint.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
const-types.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
derive-debug-array-wrapper.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
different_byref.full.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
different_byref.min.stderr change const param ty warning message 2020-08-18 22:44:06 +02:00
different_byref.rs change const param ty warning message 2020-08-18 22:44:06 +02:00
different_byref_simple.full.stderr Update stderr files 2020-08-12 20:04:36 +00:00
different_byref_simple.min.stderr Update stderr files 2020-08-12 20:04:36 +00:00
different_byref_simple.rs Update stderr files 2020-08-12 20:04:36 +00:00
fn-const-param-call.full.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
fn-const-param-call.min.stderr change const param ty warning message 2020-08-18 22:44:06 +02:00
fn-const-param-call.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
fn-const-param-infer.full.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
fn-const-param-infer.min.stderr change const param ty warning message 2020-08-18 22:44:06 +02:00
fn-const-param-infer.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
fn-taking-const-generic-array.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
forbid-non-structural_match-types.full.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
forbid-non-structural_match-types.min.stderr change const param ty warning message 2020-08-18 22:44:06 +02:00
forbid-non-structural_match-types.rs change const param ty warning message 2020-08-18 22:44:06 +02:00
foreign-item-const-parameter.full.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
foreign-item-const-parameter.min.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
foreign-item-const-parameter.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
generic-function-call-in-array-length.full.stderr Move tests 2020-10-03 18:01:11 +01:00
generic-function-call-in-array-length.min.stderr Move tests 2020-10-03 18:01:11 +01:00
generic-function-call-in-array-length.rs Move tests 2020-10-03 18:01:11 +01:00
generic-sum-in-array-length.full.stderr Move tests 2020-10-03 18:01:11 +01:00
generic-sum-in-array-length.min.stderr Move tests 2020-10-03 18:01:11 +01:00
generic-sum-in-array-length.rs Move tests 2020-10-03 18:01:11 +01:00
impl-const-generic-struct.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
impl-trait-with-const-arguments.full.stderr Add const_generics test for impl-trait-with-const-arguments 2020-10-03 18:48:56 +01:00
impl-trait-with-const-arguments.min.stderr Add const_generics test for impl-trait-with-const-arguments 2020-10-03 18:48:56 +01:00
impl-trait-with-const-arguments.rs Add const_generics test for impl-trait-with-const-arguments 2020-10-03 18:48:56 +01:00
incorrect-number-of-const-args.full.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
incorrect-number-of-const-args.min.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
incorrect-number-of-const-args.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
infer_arg_from_pat.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
infer_arr_len_from_pat.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
integer-literal-generic-arg-in-where-clause.rs Update stderr files 2020-08-12 20:04:36 +00:00
intrinsics-type_name-as-const-argument.full.stderr Move tests 2020-10-03 18:01:11 +01:00
intrinsics-type_name-as-const-argument.min.stderr Move tests 2020-10-03 18:01:11 +01:00
intrinsics-type_name-as-const-argument.rs Move tests 2020-10-03 18:01:11 +01:00
invalid-const-arg-for-type-param.rs Add a test for invalid const arguments 2019-05-10 20:53:35 +01:00
invalid-const-arg-for-type-param.stderr Unify output of "variant not found" errors 2020-01-08 08:05:31 -08:00
invalid-constant-in-args.rs Add a test for invalid const arguments 2019-03-07 23:39:01 +00:00
invalid-constant-in-args.stderr Update tests 2019-03-11 23:10:26 +03:00
invalid-enum.rs Add further tests and liberalize type checking 2020-09-03 17:46:27 +00:00
invalid-enum.stderr Add further tests and liberalize type checking 2020-09-03 17:46:27 +00:00
issue-61522-array-len-succ.full.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
issue-61522-array-len-succ.min.stderr Replace "non trivial" with "non-trivial" 2020-10-03 14:28:54 +01:00
issue-61522-array-len-succ.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
issue-66596-impl-trait-for-str-const-arg.min.stderr change const param ty warning message 2020-08-18 22:44:06 +02:00
issue-66596-impl-trait-for-str-const-arg.rs change const param ty warning message 2020-08-18 22:44:06 +02:00
issue-67375.full.stderr Move tests 2020-10-03 18:01:11 +01:00
issue-67375.min.stderr Move tests 2020-10-03 18:01:11 +01:00
issue-67375.rs Move tests 2020-10-03 18:01:11 +01:00
issue-67945-1.full.stderr Move tests 2020-10-03 18:01:11 +01:00
issue-67945-1.min.stderr Move tests 2020-10-03 18:01:11 +01:00
issue-67945-1.rs Move tests 2020-10-03 18:01:11 +01:00
issue-67945-2.full.stderr Move tests 2020-10-03 18:01:11 +01:00
issue-67945-2.min.stderr Move tests 2020-10-03 18:01:11 +01:00
issue-67945-2.rs Move tests 2020-10-03 18:01:11 +01:00
issue-67945-3.full.stderr Move tests 2020-10-03 18:01:11 +01:00
issue-67945-3.min.stderr Move tests 2020-10-03 18:01:11 +01:00
issue-67945-3.rs Move tests 2020-10-03 18:01:11 +01:00
issue-68104-print-stack-overflow.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
issue-70180-1-stalled_on.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
issue-70180-2-stalled_on.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
issue-71986.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
issue-74906.rs Add test for async/await combined with const-generics. 2020-09-29 13:19:51 +02:00
min-and-full-same-time.rs Implementation of incompatible features error 2020-09-04 22:17:28 +08:00
min-and-full-same-time.stderr Implementation of incompatible features error 2020-09-04 22:17:28 +08:00
mut-ref-const-param-array.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
nested-type.full.stderr Move from {{closure}}#0 syntax to {closure#0} for (def) path components 2020-09-25 22:46:14 +01:00
nested-type.min.stderr Move from {{closure}}#0 syntax to {closure#0} for (def) path components 2020-09-25 22:46:14 +01:00
nested-type.rs change const param ty warning message 2020-08-18 22:44:06 +02:00
params-in-ct-in-ty-param-lazy-norm.full.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
params-in-ct-in-ty-param-lazy-norm.min.stderr Replace "non trivial" with "non-trivial" 2020-10-03 14:28:54 +01:00
params-in-ct-in-ty-param-lazy-norm.rs Replace "non trivial" with "non-trivial" 2020-10-03 14:28:54 +01:00
raw-ptr-const-param-deref.full.stderr Add a bunch of revisions 2020-08-12 08:30:17 +00:00
raw-ptr-const-param-deref.min.stderr change const param ty warning message 2020-08-18 22:44:06 +02:00
raw-ptr-const-param-deref.rs Update stderr files 2020-08-12 20:04:36 +00:00
raw-ptr-const-param.full.stderr Add a bunch of revisions 2020-08-12 08:30:17 +00:00
raw-ptr-const-param.min.stderr change const param ty warning message 2020-08-18 22:44:06 +02:00
raw-ptr-const-param.rs Add a bunch of revisions 2020-08-12 08:30:17 +00:00
slice-const-param-mismatch.full.stderr Update stderr files 2020-08-12 20:04:36 +00:00
slice-const-param-mismatch.min.stderr change const param ty warning message 2020-08-18 22:44:06 +02:00
slice-const-param-mismatch.rs Update stderr files 2020-08-12 20:04:36 +00:00
slice-const-param.min.stderr change const param ty warning message 2020-08-18 22:44:06 +02:00
slice-const-param.rs change const param ty warning message 2020-08-18 22:44:06 +02:00
struct-with-invalid-const-param.full.stderr Update stderr files 2020-08-12 20:04:36 +00:00
struct-with-invalid-const-param.min.stderr Update stderr files 2020-08-12 20:04:36 +00:00
struct-with-invalid-const-param.rs Add a bunch of revisions 2020-08-12 08:30:17 +00:00
struct-with-invalid-const-param.stderr Do not suggest similarly named enclosing item 2020-08-10 12:04:10 -07:00
trait-const-args.rs Add a bunch of revisions 2020-08-12 08:30:17 +00:00
transparent-maybeunit-array-wrapper.rs Add a bunch of revisions 2020-08-12 08:30:17 +00:00
type-after-const-ok.min.stderr Added a lot of min_const_generics revisions 2020-08-26 18:50:17 +08:00
type-after-const-ok.rs Added a lot of min_const_generics revisions 2020-08-26 18:50:17 +08:00
type_of_anon_const.rs Add a bunch of revisions 2020-08-12 08:30:17 +00:00
types-mismatch-const-args.full.stderr Fix duplicate error messages in const_generics tests 2020-08-31 18:52:22 +08:00
types-mismatch-const-args.min.stderr Fix duplicate error messages in const_generics tests 2020-08-31 18:52:22 +08:00
types-mismatch-const-args.rs Fix duplicate error messages in const_generics tests 2020-08-31 18:52:22 +08:00
uninferred-consts-during-codegen-1.rs Added a lot of min_const_generics revisions 2020-08-26 18:50:17 +08:00
uninferred-consts-during-codegen-2.rs Added a lot of min_const_generics revisions 2020-08-26 18:50:17 +08:00
unknown_adt.full.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
unknown_adt.min.stderr Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
unknown_adt.rs Add missing tests in root const-gen dir 2020-08-12 08:30:17 +00:00
unused-const-param.rs Add a bunch of revisions 2020-08-12 08:30:17 +00:00
unused_braces.fixed unused_delims: trim expr 2020-08-10 12:04:51 +02:00
unused_braces.full.fixed Update stderr files 2020-08-12 20:04:36 +00:00
unused_braces.full.stderr Add a bunch of revisions 2020-08-12 08:30:17 +00:00
unused_braces.min.fixed Update stderr files 2020-08-12 20:04:36 +00:00
unused_braces.min.stderr Add a bunch of revisions 2020-08-12 08:30:17 +00:00
unused_braces.rs Add a bunch of revisions 2020-08-12 08:30:17 +00:00
wf-misc.full.stderr Add a bunch of revisions 2020-08-12 08:30:17 +00:00
wf-misc.min.stderr Replace "non trivial" with "non-trivial" 2020-10-03 14:28:54 +01:00
wf-misc.rs Replace "non trivial" with "non-trivial" 2020-10-03 14:28:54 +01:00