about summary refs log tree commit diff
path: root/tests/ui/const-generics/generic_arg_infer
AgeCommit message (Collapse)AuthorLines
2025-09-29Make replacement suggestion `_` in type verboseEsteban Küber-13/+23
``` error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types --> $DIR/in-signature.rs:6:21 | LL | fn arr_fn() -> [u8; _] { | ^ not allowed in type signatures | help: replace with the correct return type | LL - fn arr_fn() -> [u8; _] { LL + fn arr_fn() -> [u8; 3] { | ```
2025-07-03gai: remove typo from test file, and add a reference idTshepang Mbambo-0/+1
2025-06-27Report infer ty errors during hir ty loweringOli Scherer-10/+20
This centralizes the placeholder type error reporting in one location, but it also exposes the granularity at which we convert things from hir to ty more. E.g. previously infer types in where bounds were errored together with the function signature, but now they are independent.
2025-06-11stabilize gaiBoxy-93/+23
2025-04-10Allow parenthesis around inferred array lengthsBoxy-1/+72
2025-02-14fallout :skull_emoji:lcnr-4/+4
2025-02-10Show diff suggestion format on verbose replacementEsteban Küber-12/+18
``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL - let _ = 2.l; LL + let _ = 2.0f64; | ```
2025-01-23Handle parenthesised infer argsBoxy-0/+12
2025-01-02Make suggestion verbose and tweak error messageMichael Goulet-26/+40
2025-01-02More refined spans for placeholder error in const/staticMichael Goulet-24/+26
2025-01-02Remove diagnostic_only_typeck and fix placeholder suggestion for const/staticMichael Goulet-2/+8
2024-12-03Use correct `hir_id` for array const arg infersBoxy-0/+12
2024-09-16Relate receiver invariantly in method probe for Mode::PathMichael Goulet-2/+2
2024-07-22Revert suggestion verbosity changeEsteban Küber-6/+3
2024-07-22On generic and lifetime removal suggestion, do not leave behind stray `,`Esteban Küber-1/+1
2024-07-22Change suggestion message wordingEsteban Küber-1/+1
2024-07-22Use verbose suggestion for "wrong # of generics"Esteban Küber-3/+6
2024-06-19Const generic parameters aren't bounds, even if we end up erroring because ↵Oli Scherer-2/+2
of the bound that binds the parameter's type
2024-06-19Taint infcx when reporting errorsOli Scherer-11/+18
2024-06-17Use subtyping instead of equality, since method resolution also uses subtypingOli Scherer-1/+1
2024-05-29Partially implement `ConstArgHasType`Boxy-1/+1
2024-04-10Use `fn` ptr signature instead of `{closure@..}` in infer errorEsteban Küber-1/+1
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! { | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ``` Fix #123630.
2024-03-27Use `TraitRef::to_string` sorting in favor of `TraitRef::ord`, as the latter ↵Oli Scherer-2/+2
compares `DefId`s which we need to avoid
2024-03-07Use the same collection order as check_mod_type_wfOli Scherer-20/+20
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-3/+3
2024-02-01Improve the diagnostics for unused generic parametersLeón Orell Valerian Liehr-3/+3
2024-01-24Deduplicate more sized errors on call exprsEsteban Küber-1/+1
Change the implicit `Sized` `Obligation` `Span` for call expressions to include the whole expression. This aids the existing deduplication machinery to reduce the number of errors caused by a single unsized expression.
2023-11-26Update std::simd usage and test outputsCaleb Zulawski-4/+4
2023-11-24Show number in error message even for one errorNilstrieb-1/+1
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-20Avoid a `track_errors` by bubbling up most errors from `check_well_formed`Oli Scherer-3/+18
2023-06-27Don't sort strings right after we just sorted by typesMichael Goulet-2/+2
2023-06-11properly check associated consts for infer placeholdersMichael Goulet-6/+6
2023-01-11Move /src/test to /testsAlbert Larsan-0/+297