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 639db34 + aa2bb65 commit fa19df2Copy full SHA for fa19df2
crates/hir-ty/src/tests/regression/new_solver.rs
@@ -1,6 +1,6 @@
1
use expect_test::expect;
2
3
-use super::check_infer;
+use crate::tests::{check_infer, check_no_mismatches};
4
5
#[test]
6
fn opaque_generics() {
@@ -50,3 +50,24 @@ fn main() {
50
"#]],
51
);
52
}
53
+
54
+#[test]
55
+fn regression_20487() {
56
+ check_no_mismatches(
57
+ r#"
58
+//- minicore: coerce_unsized, dispatch_from_dyn
59
+trait Foo {
60
+ fn bar(&self) -> u32 {
61
+ 0xCAFE
62
+ }
63
+}
64
65
+fn debug(_: &dyn Foo) {}
66
67
+impl Foo for i32 {}
68
69
+fn main() {
70
+ debug(&1);
71
+}"#,
72
+ );
73
0 commit comments