rust/tests
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
..
assembly Tune the is_ascii implementation used for short slices 2023-05-06 22:56:43 -07:00
auxiliary
codegen Auto merge of #111358 - compiler-errors:rollup-yv27vrp, r=compiler-errors 2023-05-08 21:00:50 +00:00
codegen-units
debuginfo Rollup merge of #108668 - gibbyfree:stabilizedebuggervisualizer, r=wesleywiser 2023-05-02 11:44:51 +05:30
incremental Add needs-unwind annotations to tests that need stack unwinding 2023-05-02 12:07:55 +00:00
mir-opt Rollup merge of #110694 - est31:builtin, r=petrochenkov 2023-05-09 12:33:45 +05:30
pretty Rollup merge of #111042 - Zalathar:no-coverage, r=wesleywiser 2023-05-01 17:10:24 +02:00
run-make Rollup merge of #110304 - cchiw:master, r=davidtwco 2023-05-09 12:33:44 +05:30
run-make-fulldeps Restrict From<S> for {D,Subd}iagnosticMessage. 2023-05-03 08:44:39 +10:00
run-pass-valgrind
rustdoc IAT: Rustdoc integration 2023-05-04 16:59:11 +02:00
rustdoc-gui Rollup merge of #110371 - notriddle:notriddle/search-corrections, r=GuillaumeGomez 2023-05-03 16:42:49 -07:00
rustdoc-js Rollup merge of #110780 - notriddle:notriddle/slice-index, r=GuillaumeGomez 2023-05-06 09:09:31 +09:00
rustdoc-js-std
rustdoc-json
rustdoc-ui Rollup merge of #110989 - jyn514:bug-report-url, r=WaffleLapkin 2023-05-06 13:30:04 +02:00
ui Rollup merge of #111215 - BoxyUwU:resolve_anon_consts_differently, r=cjgillot 2023-05-09 20:49:32 +02:00
ui-fulldeps Make spans a bit better 2023-05-08 03:34:46 +00:00
COMPILER_TESTS.md