We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f41f762 + d5f597e commit 83981c1Copy full SHA for 83981c1
crates/hir-ty/src/tests/regression/new_solver.rs
@@ -418,3 +418,35 @@ fn foo() {
418
"#]],
419
);
420
}
421
+
422
+#[test]
423
+fn regression_19637() {
424
+ check_no_mismatches(
425
+ r#"
426
+//- minicore: coerce_unsized
427
+pub trait Any {}
428
429
+impl<T: 'static> Any for T {}
430
431
+pub trait Trait: Any {
432
+ type F;
433
+}
434
435
+pub struct TT {}
436
437
+impl Trait for TT {
438
+ type F = f32;
439
440
441
+pub fn coercion(x: &mut dyn Any) -> &mut dyn Any {
442
+ x
443
444
445
+fn main() {
446
+ let mut t = TT {};
447
+ let tt = &mut t as &mut dyn Trait<F = f32>;
448
+ let st = coercion(tt);
449
450
+ "#,
451
+ );
452
0 commit comments