rust/tests/ui/specialization/min_specialization
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
allow_internal_unstable.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
bad-const-wf-doesnt-specialize.rs Add ConstArgKind::Path and make ConstArg its own HIR node 2024-07-16 19:27:28 -07:00
bad-const-wf-doesnt-specialize.stderr Add ConstArgKind::Path and make ConstArg its own HIR node 2024-07-16 19:27:28 -07:00
dyn-trait-assoc-types.rs
dyn-trait-assoc-types.stderr
ice-const-not-fully-resolved-113045.rs add test for ICE: min_specialization: Ok(['?0, Const { ty: usize, kind: Leaf(0x0000000000000000) }]) is not fully resolved #113045 2024-03-24 10:19:25 +01:00
ice-const-not-fully-resolved-113045.stderr add test for ICE: min_specialization: Ok(['?0, Const { ty: usize, kind: Leaf(0x0000000000000000) }]) is not fully resolved #113045 2024-03-24 10:19:25 +01:00
impl-on-nonexisting.rs
impl-on-nonexisting.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
impl-on-opaque.rs Specialization already rejects defining opaque types 2024-04-04 10:01:45 +00:00
impl-on-opaque2.rs Specialization already rejects defining opaque types 2024-04-04 10:01:45 +00:00
impl-on-opaque2.stderr Specialization already rejects defining opaque types 2024-04-04 10:01:45 +00:00
impl_specialization_trait.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
impl_specialization_trait.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
implcit-well-formed-bounds.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-79224.rs Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
issue-79224.stderr Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
repeated_projection_type.rs
repeated_projection_type.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
repeating_lifetimes.rs
repeating_lifetimes.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
repeating_param.rs
repeating_param.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
spec-iter.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
spec-marker-supertraits.rs
spec-marker-supertraits.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
spec-reference.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
specialization_marker.rs
specialization_marker.stderr
specialization_super_trait.rs
specialization_super_trait.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
specialization_trait.rs
specialization_trait.stderr
specialize-associated-type.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
specialize_nothing.rs Disallow (min) specialization imps with no items 2023-05-05 16:19:18 +01:00
specialize_nothing.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
specialize_on_marker.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
specialize_on_spec_trait.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
specialize_on_static.rs
specialize_on_static.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
specialize_on_trait.rs
specialize_on_trait.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
specialize_on_type_error.rs Normalize consistently for specializations 2023-05-05 16:19:18 +01:00
specialize_on_type_error.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
specialize_with_generalize_lifetimes.rs Report nicer lifetime errors for specialization 2023-05-05 22:19:56 +01:00
specialize_with_generalize_lifetimes.stderr Report nicer lifetime errors for specialization 2023-05-05 22:19:56 +01:00