rust/tests/ui/const-generics/issues
Noah Lev 37ed7a4438 Add ConstArgKind::Path and make ConstArg its own HIR node
This is a very large commit since a lot needs to be changed in order to
make the tests pass. The salient changes are:

- `ConstArgKind` gets a new `Path` variant, and all const params are now
  represented using it. Non-param paths still use `ConstArgKind::Anon`
  to prevent this change from getting too large, but they will soon use
  the `Path` variant too.

- `ConstArg` gets a distinct `hir_id` field and its own variant in
  `hir::Node`. This affected many parts of the compiler that expected
  the parent of an `AnonConst` to be the containing context (e.g., an
  array repeat expression). They have been changed to check the
  "grandparent" where necessary.

- Some `ast::AnonConst`s now have their `DefId`s created in
  rustc_ast_lowering rather than `DefCollector`. This is because in some
  cases they will end up becoming a `ConstArgKind::Path` instead, which
  has no `DefId`. We have to solve this in a hacky way where we guess
  whether the `AnonConst` could end up as a path const since we can't
  know for sure until after name resolution (`N` could refer to a free
  const or a nullary struct). If it has no chance as being a const
  param, then we create a `DefId` in `DefCollector` -- otherwise we
  decide during ast_lowering. This will have to be updated once all path
  consts use `ConstArgKind::Path`.

- We explicitly use `ConstArgHasType` for array lengths, rather than
  implicitly relying on anon const type feeding -- this is due to the
  addition of `ConstArgKind::Path`.

- Some tests have their outputs changed, but the changes are for the
  most part minor (including removing duplicate or almost-duplicate
  errors). One test now ICEs, but it is for an incomplete, unstable
  feature and is now tracked at #127009.
2024-07-16 19:27:28 -07:00
..
auxiliary Remove some unnecessary allow(incomplete_features) 2024-03-11 19:42:04 +00:00
issue-56445-1.full.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-56445-1.min.stderr Provide structured suggestion for #![feature(foo)] 2024-03-18 16:08:58 +00:00
issue-56445-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-56445-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-56445-2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-56445-3.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-56445-3.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-60818-struct-constructors.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-61336-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-61336-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-61336-2.stderr Remove extra # from url 2024-01-24 00:41:45 +01:00
issue-61336.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-61336.stderr Remove extra # from url 2024-01-24 00:41:45 +01:00
issue-61422.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-61432.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-62187-encountered-polymorphic-const.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-62878.full.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-62878.min.stderr Automatically taint when reporting errors from ItemCtxt 2024-07-09 07:44:17 +00:00
issue-62878.rs Automatically taint when reporting errors from ItemCtxt 2024-07-09 07:44:17 +00:00
issue-63322-forbid-dyn.full.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-63322-forbid-dyn.min.stderr Provide structured suggestion for #![feature(foo)] 2024-03-18 16:08:58 +00:00
issue-63322-forbid-dyn.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-64519.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-66596-impl-trait-for-str-const-arg.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-66906.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-67185-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-67185-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-67185-2.stderr Use TraitRef::to_string sorting in favor of TraitRef::ord, as the latter compares DefIds which we need to avoid 2024-03-27 14:02:15 +00:00
issue-67375.full.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-67375.min.stderr Improve the diagnostics for unused generic parameters 2024-02-01 16:18:03 +01:00
issue-67375.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-67739.full.stderr Provide structured suggestion for unconstrained generic constant 2024-03-21 00:03:59 +00:00
issue-67739.min.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-67739.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-67945-1.full.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-67945-1.min.stderr Improve the diagnostics for unused generic parameters 2024-02-01 16:18:03 +01:00
issue-67945-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-67945-2.full.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-67945-2.min.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-67945-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-67945-3.full.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-67945-3.min.stderr Improve the diagnostics for unused generic parameters 2024-02-01 16:18:03 +01:00
issue-67945-3.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-67945-4.full.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-67945-4.min.stderr Improve the diagnostics for unused generic parameters 2024-02-01 16:18:03 +01:00
issue-67945-4.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-68104-print-stack-overflow.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-68366.full.stderr Provide structured suggestion for #![feature(foo)] 2024-03-18 16:08:58 +00:00
issue-68366.min.stderr Provide structured suggestion for #![feature(foo)] 2024-03-18 16:08:58 +00:00
issue-68366.rs Merge check_mod_impl_wf and check_mod_type_wf 2024-03-07 06:27:09 +00:00
issue-68596.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-68615-adt.min.stderr Provide structured suggestion for #![feature(foo)] 2024-03-18 16:08:58 +00:00
issue-68615-adt.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-68615-array.min.stderr Provide structured suggestion for #![feature(foo)] 2024-03-18 16:08:58 +00:00
issue-68615-array.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-69654-run-pass.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-69654-run-pass.stderr Update tests 2024-02-07 10:42:01 +08:00
issue-70125-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-70125-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-70167.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-70180-1-stalled_on.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-70180-2-stalled_on.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-70225.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-70273-assoc-fn.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-71169.full.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-71169.min.stderr Provide structured suggestion for #![feature(foo)] 2024-03-18 16:08:58 +00:00
issue-71169.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-71202.rs Check that return type is WF in typeck 2024-03-06 16:51:17 +05:30
issue-71202.stderr Provide structured suggestion for unconstrained generic constant 2024-03-21 00:03:59 +00:00
issue-71381.full.stderr Avoid follow-up errors and ICEs after missing lifetime errors on data structures 2024-07-11 11:00:15 +00:00
issue-71381.min.stderr Avoid follow-up errors and ICEs after missing lifetime errors on data structures 2024-07-11 11:00:15 +00:00
issue-71381.rs Avoid follow-up errors and ICEs after missing lifetime errors on data structures 2024-07-11 11:00:15 +00:00
issue-71382.full.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-71382.min.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-71382.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-71547.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-71611.full.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-71611.min.stderr Allow type_of to return partially non-error types if the type was already tainted 2024-05-28 11:55:20 +00:00
issue-71611.rs Allow type_of to return partially non-error types if the type was already tainted 2024-05-28 11:55:20 +00:00
issue-71986.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-72352.full.stderr Use the correct char type on all platforms 2024-02-14 11:12:19 +00:00
issue-72352.min.stderr Use the correct char type on all platforms 2024-02-14 11:12:19 +00:00
issue-72352.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-72845.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-72845.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-73120.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-73260.rs Remove save-analysis. 2023-02-16 15:14:45 +11:00
issue-73260.stderr Specify what 'this' actually is 2023-02-21 05:21:07 +00:00
issue-73491.min.stderr Provide structured suggestion for #![feature(foo)] 2024-03-18 16:08:58 +00:00
issue-73491.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-73727-static-reference-array-const-param.min.stderr Provide structured suggestion for #![feature(foo)] 2024-03-18 16:08:58 +00:00
issue-73727-static-reference-array-const-param.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-74101.min.stderr Provide structured suggestion for #![feature(foo)] 2024-03-18 16:08:58 +00:00
issue-74101.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-74255.min.stderr Provide structured suggestion for #![feature(foo)] 2024-03-18 16:08:58 +00:00
issue-74255.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-74906.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-74950.min.stderr Provide structured suggestion for #![feature(foo)] 2024-03-18 16:08:58 +00:00
issue-74950.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-75047.min.stderr Provide structured suggestion for #![feature(foo)] 2024-03-18 16:08:58 +00:00
issue-75047.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-75299.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-76701-ty-param-in-const.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-76701-ty-param-in-const.stderr generic_const_exprs: suggest to add the feature, not use it 2023-11-30 20:59:51 +01:00
issue-79674.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-79674.stderr Deduplicate more sized errors on call exprs 2024-01-24 02:53:15 +00:00
issue-80062.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-80062.stderr generic_const_exprs: suggest to add the feature, not use it 2023-11-30 20:59:51 +01:00
issue-80375.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-80375.stderr generic_const_exprs: suggest to add the feature, not use it 2023-11-30 20:59:51 +01:00
issue-82956.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-82956.stderr Tweak output of import suggestions 2024-06-13 20:22:21 +00:00
issue-83249.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-83249.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-83288.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-83466.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-83466.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-83765.rs Reorder check_item_type diagnostics so they occur next to the corresponding check_well_formed diagnostics 2024-01-02 14:17:56 +00:00
issue-83765.stderr Reorder check_item_type diagnostics so they occur next to the corresponding check_well_formed diagnostics 2024-01-02 14:17:56 +00:00
issue-84659.fixed Provide structured suggestion for unconstrained generic constant 2024-03-21 00:03:59 +00:00
issue-84659.rs Provide structured suggestion for unconstrained generic constant 2024-03-21 00:03:59 +00:00
issue-84659.stderr Provide structured suggestion for unconstrained generic constant 2024-03-21 00:03:59 +00:00
issue-85031-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-85031-2.stderr Fix known-bug, silence ICE stderr 2023-01-19 20:20:58 +00:00
issue-86033.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-86530.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-86530.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-86535-2.rs Improve dead code analysis 2024-07-04 22:05:00 +08:00
issue-86535.rs Improve dead code analysis 2024-07-04 22:05:00 +08:00
issue-86820.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-86820.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-87076.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-87470.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-87493.rs diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
issue-87493.stderr diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
issue-87964.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-88119.rs Migrate tests to use -Znext-solver 2024-06-30 17:08:45 +00:00
issue-88119.stderr Add ConstArgKind::Path and make ConstArg its own HIR node 2024-07-16 19:27:28 -07:00
issue-88468.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-88997.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-88997.stderr improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-89146.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-89304.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-89320.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-89334.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-90318.rs Continue to borrowck even if there were previous errors 2024-02-08 08:10:43 +00:00
issue-90318.stderr Provide structured suggestion for #![feature(foo)] 2024-03-18 16:08:58 +00:00
issue-90364.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-90364.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-90455.fixed Provide structured suggestion for unconstrained generic constant 2024-03-21 00:03:59 +00:00
issue-90455.rs Provide structured suggestion for unconstrained generic constant 2024-03-21 00:03:59 +00:00
issue-90455.stderr Provide structured suggestion for unconstrained generic constant 2024-03-21 00:03:59 +00:00
issue-92186.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-96654.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-97278.rs Implement custom diagnostic for ConstParamTy 2023-06-01 18:21:42 +00:00
issue-97278.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-97634.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-98629.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-98629.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-99641.rs Implement custom diagnostic for ConstParamTy 2023-06-01 18:21:42 +00:00
issue-99641.stderr Implement custom diagnostic for ConstParamTy 2023-06-01 18:21:42 +00:00
issue-100313.rs Always evaluate free constants and statics, even if previous errors occurred 2024-02-19 22:11:13 +00:00
issue-100313.stderr Always evaluate free constants and statics, even if previous errors occurred 2024-02-19 22:11:13 +00:00
issue-105037.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-105821.rs Partially implement ConstArgHasType 2024-05-29 17:06:54 +01:00