about summary refs log tree commit diff
path: root/tests/ui/traits/object
AgeCommit message (Collapse)AuthorLines
2025-06-03builtin dyn impl no guide inferencelcnr-0/+50
2025-05-27Use more detailed spans in dyn compat errors within bodiesOli Scherer-31/+14
2025-05-26Deduplicate dyn compatibility violations due to coercionMichael Goulet-53/+2
2025-05-17Only select true errors in impossible_predicatesMichael Goulet-0/+37
2025-05-07ReviewMichael Goulet-1/+1
2025-05-07Only include associated type bounds for Self:Sized associated types if they ↵Michael Goulet-3/+46
are provided
2025-04-10replace `//@ compile-flags: --edition` with `//@ edition`Pietro Albini-1/+1
2025-04-08UI tests: add missing diagnostic kinds where possibleVadim Petrochenkov-1/+1
2025-04-01Skip suggest impl or dyn when poly trait is not a real traitxizheyin-15/+0
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-04-01Add ui test ui/traits/object/suggestion-trait-object-issue-139174.rsxizheyin-0/+79
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-03-09Rollup merge of #136968 - oli-obk:bye-bye, r=compiler-errorsMatthias Krüger-85/+13
Turn order dependent trait objects future incompat warning into a hard error fixes #56484 r? ``@ghost`` will FCP when we have a crater result
2025-02-21Do not deduplicate list of associated types provided by dyn principalMichael Goulet-3/+145
2025-02-20Turn order dependent trait objects future incompat warning into a hard errorOli Scherer-85/+13
2025-02-02Rollup merge of #136328 - estebank:long-ty-path, r=jieyouxu,lqdMatthias Krüger-2/+2
Rework "long type names" printing logic Make it so more type-system types can be printed in a shortened version (like `Predicate`s). Centralize printing the information about the "full type name path". Make the "long type path" for the file where long types are written part of `Diag`, so that it becomes easier to keep track of it, and ensure it will always will be printed out last in the diagnostic by making its addition to the output implicit. Tweak the shortening of types in "expected/found" labels. Remove dead file `note.rs`.
2025-01-31Rework "long type names" printing logicEsteban Küber-2/+2
Make it so more type-system types can be printed in a shortened version (like `Predicate`s). Centralize printing the information about the "full type name path". Make the "long type path" for the file where long types are written part of `Diag`, so that it becomes easier to keep track of it, and ensure it will always will be printed out last in the diagnostic by making its addition to the output implicit. Tweak the shortening of types in "expected/found" labels. Remove dead file `note.rs`.
2025-01-31Rollup merge of #135860 - fmease:compiler-mv-obj-save-dyn-compat-ii, r=jieyouxuMatthias Krüger-5/+5
Compiler: Finalize dyn compatibility renaming Update the Reference link to use the new URL fragment from https://github.com/rust-lang/reference/pull/1666 (this change has finally hit stable). Fixes a FIXME. Follow-up to #130826. Part of #130852. ~~Blocking it on #133372.~~ (merged) r? ghost
2025-01-30Remove print_vtable_sizesMichael Goulet-73/+0
2025-01-26Compiler: Finalize dyn compatibility renamingLeón Orell Valerian Liehr-5/+5
2025-01-24Properly report error when object type param default references selfMichael Goulet-2/+19
2025-01-22Refactor dyn-compatibility error and suggestionsTaylor Cramer-25/+30
This CL makes a number of small changes to dyn compatibility errors: - "object safety" has been renamed to "dyn-compatibility" throughout - "Convert to enum" suggestions are no longer generated when there exists a type-generic impl of the trait or an impl for `dyn OtherTrait` - Several error messages are reorganized for user readability Additionally, the dyn compatibility error creation code has been split out into functions. cc #132713 cc #133267
2025-01-15Rework trait expansion to happen once explicitlyMichael Goulet-10/+1
2024-11-21Stop being so bail-y in candidate assemblyMichael Goulet-1/+25
2024-10-18Never emit `vptr` for empty/auto traitsRuihan Li-2/+2
2024-10-10Rollup merge of #131475 - fmease:compiler-mv-obj-safe-dyn-compat-2, r=jieyouxuMatthias Krüger-77/+2
Compiler & its UI tests: Rename remaining occurrences of "object safe" to "dyn compatible" Follow-up to #130826. Part of #130852. 1. 1st commit: Fix stupid oversights. Should've been part of #130826. 2. 2nd commit: Rename the unstable feature `object_safe_for_dispatch` to `dyn_compatible_for_dispatch`. Might not be worth the churn, you decide. 3. 3rd commit: Apply the renaming to all UI tests (contents and paths).
2024-10-10UI tests: Rename "object safe" to "dyn compatible"León Orell Valerian Liehr-77/+2
2024-10-04Elaborate supertrait span correctly to label the error betterMichael Goulet-0/+3
2024-10-04Check elaborated projections from dyn don't mention unconstrained late bound ↵Michael Goulet-14/+36
lifetimes
2024-09-25Compiler: Rename "object safe" to "dyn compatible"León Orell Valerian Liehr-9/+9
2024-08-22Pretty-print own args of existential projectionsLeón Orell Valerian Liehr-15/+42
2024-08-03Revert "Rollup merge of #125572 - mu001999-contrib:dead/enhance, r=pnkfelix"Michael Goulet-1/+0
This reverts commit 13314df21b0bb0cdd02c6760581d1b9f1052fa7e, reversing changes made to 6e534c73c35f569492ed5fb5f349075d58ed8b7e.
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-05Detect pub structs never constructed and unused associated constants in traitsr0cky-0/+1
2024-03-23regression test for #103626Kalle Wachsmuth-0/+48
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-14/+14
2024-02-07address review comments and add more testsLukas Markeffsky-33/+72
2024-02-07improve pretty printing for trait objectsLukas Markeffsky-25/+25
2024-02-07add test for pretty printing trait objectsLukas Markeffsky-0/+155
2024-01-09Avoid silencing relevant follow-up errorsOli Scherer-1/+51
2024-01-02Adjust compiler tests for unused_tuple_struct_fields -> dead_codeJake Goulding-2/+2
2023-11-24Show number in error message even for one errorNilstrieb-8/+8
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-05Use the actual computed crate name for -Zprint-vtable-sizesbjorn3-11/+11
2023-10-30Auto merge of #116405 - estebank:issue-103155, r=davidtwcobors-4/+29
Detect object safety errors when assoc type is missing When an associated type with GATs isn't specified in a `dyn Trait`, emit an object safety error instead of only complaining about the missing associated type, as it will lead the user down a path of three different errors before letting them know that what they were trying to do is impossible to begin with. Fix #103155.
2023-10-30Add testEsteban Küber-0/+25
2023-10-30Detect object safety errors when assoc type is missingEsteban Küber-4/+4
When an associated type with GATs isn't specified in a `dyn Trait`, emit an object safety error instead of only complaining about the missing associated type, as it will lead the user down a path of three different errors before letting them know that what they were trying to do is impossible to begin with. Fix #103155.
2023-10-29On object safety error, mention new enum as alternativeEsteban Küber-0/+2
When we encounter a `dyn Trait` that isn't object safe, look for its implementors. If there's one, mention using it directly If there are less than 9, mention the possibility of creating a new enum and using that instead. Account for object unsafe `impl Trait on dyn Trait {}`. Make a distinction between public and sealed traits. Fix #80194.
2023-09-07Ensure that dyn trait bounds stay sortedMichael Goulet-2/+2
2023-07-19Don't emit useless vptrs for marker traitsMaybe Waffle-3/+4