rust/src/test
bors d8dcb6345b Auto merge of #67476 - mark-i-m:simplify-borrow_check-5, r=matthewjasper
Region naming refactoring [6/N]

Followup to #67474

EDIT: this PR is probably best read commit-by-commit...

The major changes in this PR include:
- moving many functions around to modules that better suit them. In particular, a lot of methods were moved from `borrow_check::diagnostics::region_errors` to `borrow_check::region_infer`, and `report_region_errors` was moved from `borrow_check` to `borrow_check::diagnostics::region_errors`.
- `borrow_check::diagnostics::{region_errors, region_name}` are now most comprised of methods on `MirBorrowckCtxt` instead of `RegionInferenceContext`, allowing us to get rid of the annoying `pub(in crate::borrow_check)` on most of the fields of the latter, along with a number of method arguments on many methods.
- I renamed `MirBorrowckCtxt.nonlexical_regioncx` to just `regioncx` because their is no lexical lifetimes any more, and the old name was annoyingly verbose, causing many lines to wrap unnecessarily.
- I got rid of `ErrorRegionNamingContext`. Region naming is implemented as inherent methods on `MirBorrowckCtxt`, so we just move the naming stuff into that struct.

The PR is rather large, but the commits are fairly self-contained (though they don't all compile). There was one minor output change to one test with `compare-mode=nll`, which I think is acceptable.

Between this PR and the last one, a net of 200 lines are removed, most of which was function parameters and context structs 🎉

Some samples:

```diff
-                        self.nonlexical_regioncx.free_region_constraint_info(
-                            &self.body,
-                            &self.local_names,
-                            &self.upvars,
-                            self.mir_def_id,
-                            self.infcx,
-                            borrow_region_vid,
-                            region,
-                        );
+                        self.free_region_constraint_info(borrow_region_vid, region);
```

```diff
-            .or_else(|| {
-                self.give_name_if_anonymous_region_appears_in_yield_ty(
-                    infcx,
-                    body,
-                    *mir_def_id,
-                    fr,
-                    renctx,
-                )
-            });
+            .or_else(|| self.give_name_if_anonymous_region_appears_in_arguments(fr))
```

r? @matthewjasper

cc @eddyb
2020-01-17 21:43:23 +00:00
..
assembly
auxiliary
codegen Auto merge of #67900 - nikic:prepare-llvm-10, r=nagisa 2020-01-13 04:01:00 +00:00
codegen-units Update test output. 2019-10-25 14:52:39 +02:00
compile-fail Diagnostics should not end with a full stop 2020-01-12 15:37:50 +00:00
debuginfo Remove legacy debuginfo tests 2020-01-07 21:28:22 +01:00
incremental Add a test for #37333 2020-01-01 13:07:41 +01:00
mir-opt Rollup merge of #68236 - JohnTitor:ice-tests, r=Centril 2020-01-15 22:49:28 +05:30
pretty ast_stmt_expr_attr -> pretty & ui tests 2019-12-20 22:53:40 +01:00
run-fail Errors in promoteds may only cause lints not hard errors 2020-01-10 09:08:25 +01:00
run-make Check for the entry kind 2020-01-08 10:05:44 +01:00
run-make-fulldeps Rollup merge of #68244 - tmiasko:leak, r=Centril 2020-01-16 20:53:27 +05:30
run-pass-valgrind
rustdoc Rollup merge of #68263 - ollie27:rustdoc_invalid_syntax_highlight_escape, r=GuillaumeGomez 2020-01-16 20:53:30 +05:30
rustdoc-js
rustdoc-js-std
rustdoc-ui Update output-default.json and rustdoc test 2020-01-12 15:37:50 +00:00
rustfix
ui Auto merge of #67476 - mark-i-m:simplify-borrow_check-5, r=matthewjasper 2020-01-17 21:43:23 +00:00
ui-fulldeps fix ui-fulldeps & tests fallout 2020-01-11 07:42:26 +01:00
COMPILER_TESTS.md