rust/tests/ui/const-generics/issues
Matthias Krüger 363d158cd8
Rollup merge of #111215 - BoxyUwU:resolve_anon_consts_differently, r=cjgillot
Various changes to name resolution of anon consts

Sorry this PR is kind of all over the place ^^'

Fixes #111012

- Rewrites anon const nameres to all go through `fn resolve_anon_const` explicitly instead of `visit_anon_const` to ensure that we do not accidentally resolve anon consts as if they are allowed to use generics when they aren't. Also means that we dont have bits of code for resolving anon consts that will get out of sync (i.e. legacy const generics and resolving path consts that were parsed as type arguments)
- Renames two of the `LifetimeRibKind`, `AnonConst -> ConcreteAnonConst` and `ConstGeneric -> ConstParamTy`
- Noticed while doing this that under `generic_const_exprs` all lifetimes currently get resolved to errors without any error being emitted which was causing a bunch of tests to pass without their bugs having been fixed, incidentally fixed that in this PR and marked those tests as `// known-bug:`. I'm fine to break those since `generic_const_exprs` is a very unstable incomplete feature and this PR _does_ make generic_const_exprs "less broken" as a whole, also I can't be assed to figure out what the underlying causes of all of them are. This PR reopens #77357 #83993
- Changed `generics_of` to stop providing generics and predicates to enum variant discriminant anon consts since those are not allowed to use generic parameters
- Updated the error for non 'static lifetime in const arguments and the error for non 'static lifetime in const param tys to use `derive(Diagnostic)`

I have a vague idea why const-arg-in-const-arg.rs, in-closure.rs and simple.rs have started failing which is unfortunate since these were deliberately made to work, I think lifetime resolution being broken just means this regressed at some point and nobody noticed because the tests were not testing anything :( I'm fine breaking these too for the same reason as the tests for #77357 #83993. I couldn't get `// known-bug` to work for these ICEs and just kept getting different stderr between CI and local `--bless` so I just removed them and will create an issue to track re-adding (and fixing) the bugs if this PR lands.

r? `@cjgillot` cc `@compiler-errors`
2023-05-09 20:49:32 +02:00
..
auxiliary
issue-56445-1.full.stderr improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-56445-1.min.stderr improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-56445-1.rs improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-56445-2.rs
issue-56445-2.stderr
issue-56445-3.rs
issue-56445-3.stderr
issue-60818-struct-constructors.rs
issue-61336-1.rs
issue-61336-2.rs
issue-61336-2.stderr
issue-61336.rs
issue-61336.stderr
issue-61422.rs
issue-61432.rs
issue-62187-encountered-polymorphic-const.rs
issue-62878.full.stderr improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-62878.min.stderr improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-62878.rs defer array len printing to const arg printing 2023-01-18 04:07:39 +00:00
issue-63322-forbid-dyn.full.stderr
issue-63322-forbid-dyn.min.stderr
issue-63322-forbid-dyn.rs
issue-64519.rs
issue-66596-impl-trait-for-str-const-arg.rs
issue-66906.rs
issue-67185-1.rs
issue-67185-2.rs
issue-67185-2.stderr Specify what 'this' actually is 2023-02-21 05:21:07 +00:00
issue-67375.full.stderr
issue-67375.min.stderr
issue-67375.rs
issue-67739.full.stderr
issue-67739.min.stderr
issue-67739.rs
issue-67945-1.full.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
issue-67945-1.min.stderr
issue-67945-1.rs
issue-67945-2.full.stderr
issue-67945-2.min.stderr
issue-67945-2.rs
issue-67945-3.full.stderr
issue-67945-3.min.stderr
issue-67945-3.rs
issue-67945-4.full.stderr
issue-67945-4.min.stderr
issue-67945-4.rs
issue-68104-print-stack-overflow.rs
issue-68366.full.stderr
issue-68366.min.stderr
issue-68366.rs
issue-68596.rs
issue-68615-adt.min.stderr
issue-68615-adt.rs
issue-68615-array.min.stderr
issue-68615-array.rs
issue-69654-run-pass.rs
issue-70125-1.rs
issue-70125-2.rs
issue-70167.rs
issue-70180-1-stalled_on.rs
issue-70180-2-stalled_on.rs
issue-70225.rs
issue-70273-assoc-fn.rs
issue-71169.full.stderr improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-71169.min.stderr improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-71169.rs defer array len printing to const arg printing 2023-01-18 04:07:39 +00:00
issue-71202.rs
issue-71202.stderr
issue-71381.full.stderr improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-71381.min.stderr improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-71381.rs
issue-71382.full.stderr
issue-71382.min.stderr
issue-71382.rs
issue-71547.rs
issue-71611.full.stderr improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-71611.min.stderr improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-71611.rs
issue-71986.rs
issue-72352.full.stderr
issue-72352.min.stderr
issue-72352.rs
issue-72845.rs
issue-72845.stderr
issue-73120.rs
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 defer array len printing to const arg printing 2023-01-18 04:07:39 +00:00
issue-73491.rs defer array len printing to const arg printing 2023-01-18 04:07:39 +00:00
issue-73727-static-reference-array-const-param.min.stderr
issue-73727-static-reference-array-const-param.rs
issue-74101.min.stderr defer array len printing to const arg printing 2023-01-18 04:07:39 +00:00
issue-74101.rs defer array len printing to const arg printing 2023-01-18 04:07:39 +00:00
issue-74255.min.stderr
issue-74255.rs
issue-74906.rs
issue-74950.min.stderr
issue-74950.rs
issue-75047.min.stderr defer array len printing to const arg printing 2023-01-18 04:07:39 +00:00
issue-75047.rs defer array len printing to const arg printing 2023-01-18 04:07:39 +00:00
issue-75299.rs
issue-76701-ty-param-in-const.rs
issue-76701-ty-param-in-const.stderr
issue-79674.rs
issue-79674.stderr Specify what 'this' actually is 2023-02-21 05:21:07 +00:00
issue-80062.rs
issue-80062.stderr
issue-80375.rs
issue-80375.stderr
issue-82956.rs
issue-82956.stderr Special-case item attributes in the suggestion output 2023-04-12 22:50:10 +00:00
issue-83249.rs
issue-83249.stderr
issue-83288.rs
issue-83466.rs
issue-83466.stderr
issue-83765.rs
issue-83765.stderr
issue-84659.rs
issue-84659.stderr
issue-85031-2.rs Fix known-bug, silence ICE stderr 2023-01-19 20:20:58 +00:00
issue-85031-2.stderr Fix known-bug, silence ICE stderr 2023-01-19 20:20:58 +00:00
issue-86033.rs
issue-86530.rs
issue-86530.stderr Specify what 'this' actually is 2023-02-21 05:21:07 +00:00
issue-86535-2.rs
issue-86535.rs
issue-86820.rs
issue-86820.stderr
issue-87076.rs
issue-87470.rs
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
issue-88119.rs
issue-88468.rs
issue-88997.rs
issue-88997.stderr improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-89146.rs
issue-89304.rs
issue-89320.rs
issue-89334.rs
issue-90318.rs Constify TypeId ordering impls 2023-01-16 21:26:03 +01:00
issue-90318.stderr Constify TypeId ordering impls 2023-01-16 21:26:03 +01:00
issue-90364.rs
issue-90364.stderr improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-90455.rs
issue-90455.stderr
issue-92186.rs
issue-96654.rs
issue-97278.rs
issue-97278.stderr
issue-97634.rs
issue-98629.rs
issue-98629.stderr
issue-99641.rs
issue-99641.stderr
issue-100313.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-100313.stderr
issue-105037.rs
issue-105821.rs Stabilize const_ptr_read 2023-05-05 20:36:21 +02:00