diff options
| author | Michael Goulet <michael@errs.io> | 2024-10-03 15:19:23 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-10-03 15:19:23 -0400 |
| commit | bc5f9520c117b372b7ad7326fda1252cd9da3f4e (patch) | |
| tree | 2c4f96ac50dd52f016c5ad7a182677bfe362bc5d /compiler/rustc_trait_selection/src | |
| parent | 5b1a2b8712887fff7e0295d4e87aac24ea73797d (diff) | |
| download | rust-bc5f9520c117b372b7ad7326fda1252cd9da3f4e.tar.gz rust-bc5f9520c117b372b7ad7326fda1252cd9da3f4e.zip | |
Remove crashes, add comment
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs index f494d9637f3..e2d067e012c 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs @@ -2224,6 +2224,8 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { ) -> GetSafeTransmuteErrorAndReason { use rustc_transmute::Answer; + // We don't assemble a transmutability candidate for types that are generic + // and we should have ambiguity for types that still have non-region infer. if obligation.predicate.has_non_region_param() || obligation.has_non_region_infer() { return GetSafeTransmuteErrorAndReason::Default; } |
