ae88766286
Use `fn` ptr signature instead of `{closure@..}` in infer error When suggesting a type on inference error, do not use `{closure@..}`. Instead, replace with an appropriate `fn` ptr. On the error message, use `short_ty_string` and write long types to disk. ``` error[E0284]: type annotations needed for `Select<{closure@lib.rs:2782:13}, _, Expression<'_>, _>` --> crates/lang/src/parser.rs:41:13 | 41 | let lit = select! { | ^^^ 42 | Token::Int(i) = e => Expression::new(Expr::Lit(ast::Lit::Int(i.parse().unwrap())), e.span()), | ---- type must be known at this point | = note: the full type name has been written to '/home/gh-estebank/iowo/target/debug/deps/lang-e2d6e25819442273.long-type-4587393693885174369.txt' = note: cannot satisfy `<_ as chumsky::input::Input<'_>>::Span == SimpleSpan` help: consider giving `lit` an explicit type, where the type for type parameter `I` is specified | 41 | let lit: Select<for<'a, 'b> fn(tokens::Token<'_>, &'a mut MapExtra<'_, 'b, _, _>) -> Option<Expression<'_>>, _, Expression<'_>, _> = select! { | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ``` instead of ``` error[E0284]: type annotations needed for `Select<{closure@/home/gh-estebank/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chumsky-1.0.0-alpha.6/src/lib.rs:2782:13: 2782:28}, _, Expression<'_>, _>` --> crates/lang/src/parser.rs:41:13 | 41 | let lit = select! { | ^^^ 42 | Token::Int(i) = e => Expression::new(Expr::Lit(ast::Lit::Int(i.parse().unwrap())), e.span()), | ---- type must be known at this point | = note: cannot satisfy `<_ as chumsky::input::Input<'_>>::Span == SimpleSpan` help: consider giving `lit` an explicit type, where the type for type parameter `I` is specified | 41 | let lit: Select<{closure@/home/gh-estebank/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chumsky-1.0.0-alpha.6/src/lib.rs:2782:13: 2782:28}, _, Expression<'_>, _> = select! { | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ``` Address #123630 (test missing). |
||
---|---|---|
.. | ||
auxiliary | ||
issues | ||
assign-to-method.rs | ||
assign-to-method.stderr | ||
call_method_unknown_pointee.rs | ||
call_method_unknown_pointee.stderr | ||
disambiguate-associated-function-first-arg.rs | ||
disambiguate-associated-function-first-arg.stderr | ||
disambiguate-multiple-blanket-impl.rs | ||
disambiguate-multiple-blanket-impl.stderr | ||
disambiguate-multiple-impl.rs | ||
disambiguate-multiple-impl.stderr | ||
disambiguate-multiple-trait-2.rs | ||
disambiguate-multiple-trait-2.stderr | ||
disambiguate-multiple-trait.rs | ||
disambiguate-multiple-trait.stderr | ||
field-method-suggestion-using-return-ty.rs | ||
field-method-suggestion-using-return-ty.stderr | ||
inherent-bound-in-probe.rs | ||
inherent-bound-in-probe.stderr | ||
issue-3707.rs | ||
issue-3707.stderr | ||
issue-7950.rs | ||
issue-7950.stderr | ||
issue-19521.rs | ||
issue-19521.stderr | ||
method-ambig-one-trait-unknown-int-type.rs | ||
method-ambig-one-trait-unknown-int-type.stderr | ||
method-ambig-two-traits-cross-crate.rs | ||
method-ambig-two-traits-cross-crate.stderr | ||
method-ambig-two-traits-from-bounds.rs | ||
method-ambig-two-traits-from-bounds.stderr | ||
method-ambig-two-traits-from-impls.rs | ||
method-ambig-two-traits-from-impls.stderr | ||
method-ambig-two-traits-from-impls2.rs | ||
method-ambig-two-traits-from-impls2.stderr | ||
method-ambig-two-traits-with-default-method.rs | ||
method-ambig-two-traits-with-default-method.stderr | ||
method-ambiguity-no-rcvr.rs | ||
method-ambiguity-no-rcvr.stderr | ||
method-argument-inference-associated-type.rs | ||
method-call-err-msg.rs | ||
method-call-err-msg.stderr | ||
method-call-lifetime-args-fail.rs | ||
method-call-lifetime-args-fail.stderr | ||
method-call-lifetime-args-lint-fail.rs | ||
method-call-lifetime-args-lint-fail.stderr | ||
method-call-lifetime-args-lint.rs | ||
method-call-lifetime-args-lint.stderr | ||
method-call-lifetime-args-subst-index.rs | ||
method-call-lifetime-args-unresolved.rs | ||
method-call-lifetime-args-unresolved.stderr | ||
method-call-lifetime-args.rs | ||
method-call-lifetime-args.stderr | ||
method-call-type-binding.rs | ||
method-call-type-binding.stderr | ||
method-deref-to-same-trait-object-with-separate-params.rs | ||
method-deref-to-same-trait-object-with-separate-params.stderr | ||
method-early-bound-lifetimes-on-self.rs | ||
method-lookup-order.rs | ||
method-macro-backtrace.rs | ||
method-macro-backtrace.stderr | ||
method-missing-call.rs | ||
method-missing-call.stderr | ||
method-mut-self-modifies-mut-slice-lvalue.rs | ||
method-normalize-bounds-issue-20604.rs | ||
method-not-found-but-doc-alias.rs | ||
method-not-found-but-doc-alias.stderr | ||
method-not-found-generic-arg-elision.rs | ||
method-not-found-generic-arg-elision.stderr | ||
method-on-ambiguous-numeric-type.rs | ||
method-on-ambiguous-numeric-type.stderr | ||
method-path-in-pattern.rs | ||
method-path-in-pattern.stderr | ||
method-probe-no-guessing-dyn-trait.rs | ||
method-projection.rs | ||
method-recursive-blanket-impl.rs | ||
method-recursive-blanket-impl.stderr | ||
method-resolvable-path-in-pattern.rs | ||
method-resolvable-path-in-pattern.stderr | ||
method-self-arg-1.rs | ||
method-self-arg-1.stderr | ||
method-self-arg-2.rs | ||
method-self-arg-2.stderr | ||
method-self-arg-aux1.rs | ||
method-self-arg-aux2.rs | ||
method-self-arg-trait.rs | ||
method-self-arg.rs | ||
method-trait-object-with-hrtb.rs | ||
method-two-trait-defer-resolution-1.rs | ||
method-two-trait-defer-resolution-2.rs | ||
method-two-trait-defer-resolution-2.stderr | ||
method-two-traits-distinguished-via-where-clause.rs | ||
method-two-traits-distinguished-via-where-clause.stderr | ||
method-where-clause.rs | ||
opaque_param_in_ufc.rs | ||
opaque_param_in_ufc.stderr | ||
probe-overflow-due-to-sized-predicate-ordering.rs | ||
suggest-method-on-call-with-macro-rcvr.rs | ||
suggest-method-on-call-with-macro-rcvr.stderr |