rust/src/test/ui/unboxed-closures
bors 3d0774d0dc Auto merge of #86700 - lqd:matthews-nll-hrtb-errors, r=nikomatsakis
Matthew's work on improving NLL's "higher-ranked subtype error"s

This PR rebases `@matthewjasper's` [branch](https://github.com/matthewjasper/rust/tree/nll-hrtb-errors) which has great work to fix the obscure higher-ranked subtype errors that are tracked in #57374.

These are a blocker to turning full NLLs on, and doing some internal cleanups to remove some of the old region code.

The goal is so `@nikomatsakis` can take a look at this early, and I'll then do my best to help do the changes and followup work to land this work, and move closer to turning off the migration mode.

I've only updated the branch and made it compile, removed a warning or two.

r? `@nikomatsakis`

(Here's the [zulip topic to discuss this](https://rust-lang.zulipchat.com/#narrow/stream/122657-t-compiler.2Fwg-nll/topic/.2357374.3A.20improving.20higher-ranked.20subtype.20errors.20via.20.2386700) that Niko wanted)
2021-08-18 15:54:59 +00:00
..
auxiliary tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
issue-18661.rs Move some tests to more suitable subdirs 2021-03-06 18:24:53 +09:00
issue-30906.nll.stderr Report nicer errors for HRTB NLL errors from queries 2021-08-15 09:11:01 +02:00
issue-30906.rs Report "nice" placeholder errors more often 2021-02-09 22:59:32 +00:00
issue-30906.stderr Report "nice" placeholder errors more often 2021-02-09 22:59:32 +00:00
issue-53448.rs Add a regression test for issue-53448 2020-10-09 18:32:13 +09:00
issue-53448.stderr Modify structured suggestion output 2021-08-11 09:46:24 +00:00
type-id-higher-rank.rs Move some tests to more reasonable directories 2021-02-16 21:22:21 -03:00
unboxed-closure-feature-gate.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
unboxed-closure-feature-gate.stderr Revert old span change 2020-04-22 12:12:33 -07:00
unboxed-closure-illegal-move.rs Remove licenses 2018-12-25 21:08:33 -07:00
unboxed-closure-illegal-move.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
unboxed-closure-immutable-capture.rs update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
unboxed-closure-immutable-capture.stderr Update ui tests 2019-11-18 19:00:10 +01:00
unboxed-closure-no-cyclic-sig.rs Remove licenses 2018-12-25 21:08:33 -07:00
unboxed-closure-no-cyclic-sig.stderr --bless --compare-mode=nll 2020-02-09 20:43:49 +01:00
unboxed-closure-region.rs Remove licenses 2018-12-25 21:08:33 -07:00
unboxed-closure-region.stderr update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
unboxed-closure-sugar-default.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
unboxed-closure-sugar-default.stderr Use note to point at bound introducing requirement 2021-08-16 17:47:22 +00:00
unboxed-closure-sugar-equiv.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
unboxed-closure-sugar-equiv.stderr Use note to point at bound introducing requirement 2021-08-16 17:47:22 +00:00
unboxed-closure-sugar-lifetime-elision.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
unboxed-closure-sugar-lifetime-elision.stderr Modify structured suggestion output 2021-08-11 09:46:24 +00:00
unboxed-closure-sugar-not-used-on-fn.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
unboxed-closure-sugar-not-used-on-fn.stderr Revert old span change 2020-04-22 12:12:33 -07:00
unboxed-closure-sugar-region.rs Rework diagnostics for wrong number of generic args 2021-01-10 13:07:40 +01:00
unboxed-closure-sugar-region.stderr Rework diagnostics for wrong number of generic args 2021-01-10 13:07:40 +01:00
unboxed-closure-sugar-used-on-struct-1.rs Bless tests 2021-05-12 13:57:30 +02:00
unboxed-closure-sugar-used-on-struct-1.stderr Modify structured suggestion output 2021-08-11 09:46:24 +00:00
unboxed-closure-sugar-used-on-struct-3.rs Do not suggest angle brackets when there are no type arguments 2019-01-20 02:47:51 -08:00
unboxed-closure-sugar-used-on-struct-3.stderr Point at correct span for parenthesized types 2019-09-22 11:33:12 -07:00
unboxed-closure-sugar-used-on-struct.rs Bless tests 2021-05-12 13:57:30 +02:00
unboxed-closure-sugar-used-on-struct.stderr Modify structured suggestion output 2021-08-11 09:46:24 +00:00
unboxed-closure-sugar-wrong-number-number-type-parameters-1.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr Point at correct span for parenthesized types 2019-09-22 11:33:12 -07:00
unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs improve diagnosts for GATs 2021-05-11 14:09:46 +02:00
unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr improve diagnosts for GATs 2021-05-11 14:09:46 +02:00
unboxed-closure-sugar-wrong-number-number-type-parameters.rs improve diagnosts for GATs 2021-05-11 14:09:46 +02:00
unboxed-closure-sugar-wrong-number-number-type-parameters.stderr improve diagnosts for GATs 2021-05-11 14:09:46 +02:00
unboxed-closure-sugar-wrong-trait.rs improve diagnosts for GATs 2021-05-11 14:09:46 +02:00
unboxed-closure-sugar-wrong-trait.stderr improve diagnosts for GATs 2021-05-11 14:09:46 +02:00
unboxed-closures-all-traits.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-blanket-fn-mut.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-blanket-fn.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-borrow-conflict.rs Remove licenses 2018-12-25 21:08:33 -07:00
unboxed-closures-borrow-conflict.stderr update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
unboxed-closures-boxed.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-by-ref.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-call-fn-autoderef.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-call-sugar-autoderef.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-call-sugar-object-autoderef.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-call-sugar-object.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-counter-not-moved.rs liveness: Warn about unused captured variables 2020-05-29 17:46:38 +02:00
unboxed-closures-counter-not-moved.stderr liveness: Warn about unused captured variables 2020-05-29 17:46:38 +02:00
unboxed-closures-cross-crate.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-direct-sugary-call.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-drop.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-extern-fn-hr.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-extern-fn.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-failed-recursive-fn-1.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
unboxed-closures-failed-recursive-fn-1.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
unboxed-closures-failed-recursive-fn-2.rs Remove licenses 2018-12-25 21:08:33 -07:00
unboxed-closures-failed-recursive-fn-2.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
unboxed-closures-fn-as-fnmut-and-fnonce.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-fnmut-as-fn.rs Remove licenses 2018-12-25 21:08:33 -07:00
unboxed-closures-fnmut-as-fn.stderr Use note to point at bound introducing requirement 2021-08-16 17:47:22 +00:00
unboxed-closures-fnmut-as-fnonce.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-generic.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-infer-arg-types-from-expected-bound.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-infer-arg-types-from-expected-object-type.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-infer-arg-types-w-bound-regs-from-expected-bound.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-infer-argument-types-two-region-pointers.nll.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
unboxed-closures-infer-argument-types-two-region-pointers.rs Remove licenses 2018-12-25 21:08:33 -07:00
unboxed-closures-infer-argument-types-two-region-pointers.stderr Make anonymous binders start at 0 2020-10-29 18:50:23 -04:00
unboxed-closures-infer-explicit-call-early.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-infer-fn-once-move-from-projection.rs Remove licenses 2018-12-25 21:08:33 -07:00
unboxed-closures-infer-fn-once-move-from-projection.stderr Simplify mem_categorization 2019-11-27 19:47:12 +00:00
unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
unboxed-closures-infer-fnmut-calling-fnmut-no-mut.stderr Point to span of upvar making closure FnMut 2021-01-25 16:53:27 +11:00
unboxed-closures-infer-fnmut-calling-fnmut.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-infer-fnmut-missing-mut.rs update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
unboxed-closures-infer-fnmut-missing-mut.stderr Point to span of upvar making closure FnMut 2021-01-25 16:53:27 +11:00
unboxed-closures-infer-fnmut-move-missing-mut.rs update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
unboxed-closures-infer-fnmut-move-missing-mut.stderr Point to span of upvar making closure FnMut 2021-01-25 16:53:27 +11:00
unboxed-closures-infer-fnmut-move.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-infer-fnmut.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-infer-fnonce-call-twice.rs Remove licenses 2018-12-25 21:08:33 -07:00
unboxed-closures-infer-fnonce-call-twice.stderr Explain move errors that occur due to method calls involving self 2020-06-26 16:28:09 -04:00
unboxed-closures-infer-fnonce-move-call-twice.rs Remove licenses 2018-12-25 21:08:33 -07:00
unboxed-closures-infer-fnonce-move-call-twice.stderr Explain move errors that occur due to method calls involving self 2020-06-26 16:28:09 -04:00
unboxed-closures-infer-fnonce-move.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-infer-fnonce.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-infer-kind.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-infer-recursive-fn.rs Prefer https link for wikipedia URLs 2020-08-23 10:02:42 +00:00
unboxed-closures-infer-upvar.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-manual-impl.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-monomorphization.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-move-from-projection-issue-30046.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-move-mutable.rs Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
unboxed-closures-move-mutable.stderr Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
unboxed-closures-move-some-upvars-in-by-ref-closure.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-mutate-upvar.rs update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
unboxed-closures-mutate-upvar.stderr Tweak borrow error on FnMut when Fn is expected 2020-02-03 18:02:44 -08:00
unboxed-closures-mutated-upvar-from-fn-closure.rs update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
unboxed-closures-mutated-upvar-from-fn-closure.stderr Tweak borrow error on FnMut when Fn is expected 2020-02-03 18:02:44 -08:00
unboxed-closures-prelude.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-recursive-fn-using-fn-mut.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
unboxed-closures-recursive-fn-using-fn-mut.stderr update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
unboxed-closures-simple.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-single-word-env.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-static-call-fn-once.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-static-call-wrong-trait.rs Remove licenses 2018-12-25 21:08:33 -07:00
unboxed-closures-static-call-wrong-trait.stderr Add backticks in appropriate places 2020-01-12 15:37:50 +00:00
unboxed-closures-sugar-object.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
unboxed-closures-type-mismatch.rs Remove licenses 2018-12-25 21:08:33 -07:00
unboxed-closures-type-mismatch.stderr Modify structured suggestion output 2021-08-11 09:46:24 +00:00
unboxed-closures-unique-type-id.rs rust_ast::ast => rustc_ast 2020-08-17 20:32:32 +00:00
unboxed-closures-unsafe-extern-fn.rs move leak-check to during coherence, candidate eval 2020-06-22 15:33:05 +00:00
unboxed-closures-unsafe-extern-fn.stderr Use note to point at bound introducing requirement 2021-08-16 17:47:22 +00:00
unboxed-closures-wrong-abi.rs move leak-check to during coherence, candidate eval 2020-06-22 15:33:05 +00:00
unboxed-closures-wrong-abi.stderr Use note to point at bound introducing requirement 2021-08-16 17:47:22 +00:00
unboxed-closures-wrong-arg-type-extern-fn.rs move leak-check to during coherence, candidate eval 2020-06-22 15:33:05 +00:00
unboxed-closures-wrong-arg-type-extern-fn.stderr Use note to point at bound introducing requirement 2021-08-16 17:47:22 +00:00
unboxed-closures-zero-args.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00