rust/tests/ui/unboxed-closures
Esteban Küber e7618756c0 On type error involving closure, avoid ICE
When we encounter a type error involving a closure, we try to typeck
prior closure invocations to see if they influenced the current expected
type. When trying to do so, ensure that the closure was defined in our
current scope.

Fix #116658.
2023-10-12 23:29:02 +00:00
..
auxiliary Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-18652.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-18661.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-30906.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-30906.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-53448.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
non-tupled-arg-mismatch.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
non-tupled-arg-mismatch.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
non-tupled-call.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
non-tupled-call.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
type-id-higher-rank.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-feature-gate.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-feature-gate.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-illegal-move.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-illegal-move.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-immutable-capture.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-immutable-capture.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-no-cyclic-sig.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-no-cyclic-sig.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-region.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-region.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-sugar-default.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-sugar-default.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-sugar-equiv.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-sugar-equiv.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-sugar-lifetime-elision.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-sugar-lifetime-elision.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-sugar-not-used-on-fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-sugar-not-used-on-fn.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-sugar-region.rs diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
unboxed-closure-sugar-region.stderr diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
unboxed-closure-sugar-used-on-struct-1.rs diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
unboxed-closure-sugar-used-on-struct-1.stderr diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
unboxed-closure-sugar-used-on-struct-3.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-sugar-used-on-struct-3.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-sugar-used-on-struct.rs diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
unboxed-closure-sugar-used-on-struct.stderr diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
unboxed-closure-sugar-wrong-number-number-type-parameters-1.rs print const and type errors in braces not square brackets 2023-05-26 16:01:29 +01:00
unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr print const and type errors in braces not square brackets 2023-05-26 16:01:29 +01:00
unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr print const and type errors in braces not square brackets 2023-05-26 16:01:29 +01:00
unboxed-closure-sugar-wrong-number-number-type-parameters.rs diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
unboxed-closure-sugar-wrong-number-number-type-parameters.stderr diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
unboxed-closure-sugar-wrong-trait.rs diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
unboxed-closure-sugar-wrong-trait.stderr diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
unboxed-closures-all-traits.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-blanket-fn-mut.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-blanket-fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-borrow-conflict.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-borrow-conflict.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
unboxed-closures-boxed.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-by-ref.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-call-fn-autoderef.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-call-sugar-autoderef.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-call-sugar-object-autoderef.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-call-sugar-object.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-counter-not-moved.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-counter-not-moved.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-cross-crate.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-direct-sugary-call.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-drop.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-extern-fn-hr.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-extern-fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-failed-recursive-fn-1.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-failed-recursive-fn-1.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
unboxed-closures-failed-recursive-fn-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-failed-recursive-fn-2.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-fn-as-fnmut-and-fnonce.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-fnmut-as-fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-fnmut-as-fn.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-fnmut-as-fnonce.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-generic.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-arg-types-from-expected-bound.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-arg-types-from-expected-object-type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-arg-types-w-bound-regs-from-expected-bound.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-argument-types-two-region-pointers.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-argument-types-two-region-pointers.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-explicit-call-early.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-fn-once-move-from-projection.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-fn-once-move-from-projection.stderr Specify what 'this' actually is 2023-02-21 05:21:07 +00:00
unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-fnmut-calling-fnmut-no-mut.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-fnmut-calling-fnmut.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-fnmut-missing-mut.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-fnmut-missing-mut.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-fnmut-move-missing-mut.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-fnmut-move-missing-mut.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-fnmut-move.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-fnmut.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-fnonce-call-twice.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-fnonce-call-twice.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-fnonce-move-call-twice.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-fnonce-move-call-twice.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-fnonce-move.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-fnonce.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-kind.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-recursive-fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-infer-upvar.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-manual-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-monomorphization.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-move-from-projection-issue-30046.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-move-mutable.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-move-mutable.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-move-some-upvars-in-by-ref-closure.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-mutate-upvar.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-mutate-upvar.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-mutated-upvar-from-fn-closure.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-mutated-upvar-from-fn-closure.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-prelude.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-recursive-fn-using-fn-mut.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-recursive-fn-using-fn-mut.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-simple.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-single-word-env.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-static-call-fn-once.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-static-call-wrong-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-static-call-wrong-trait.stderr adjust how closure/generator types and rvalues are printed 2023-09-21 22:20:58 +02:00
unboxed-closures-sugar-object.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-type-mismatch-closure-from-another-scope.rs On type error involving closure, avoid ICE 2023-10-12 23:29:02 +00:00
unboxed-closures-type-mismatch-closure-from-another-scope.stderr On type error involving closure, avoid ICE 2023-10-12 23:29:02 +00:00
unboxed-closures-type-mismatch.rs On type error of closure call argument, point at earlier calls that affected inference 2023-09-28 22:04:15 +00:00
unboxed-closures-type-mismatch.stderr On type error of closure call argument, point at earlier calls that affected inference 2023-09-28 22:04:15 +00:00
unboxed-closures-unique-type-id.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-unsafe-extern-fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-unsafe-extern-fn.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-wrong-abi.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-wrong-abi.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-wrong-arg-type-extern-fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-wrong-arg-type-extern-fn.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closures-zero-args.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00