mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Add a regression test for a fixed new trait solver bug
Not sure what exactly fixed it, but why not.
This commit is contained in:
parent
a79e27b8d2
commit
aa2bb65417
@ -1,6 +1,6 @@
|
||||
use expect_test::expect;
|
||||
|
||||
use super::check_infer;
|
||||
use crate::tests::{check_infer, check_no_mismatches};
|
||||
|
||||
#[test]
|
||||
fn opaque_generics() {
|
||||
@ -50,3 +50,24 @@ fn main() {
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn regression_20487() {
|
||||
check_no_mismatches(
|
||||
r#"
|
||||
//- minicore: coerce_unsized, dispatch_from_dyn
|
||||
trait Foo {
|
||||
fn bar(&self) -> u32 {
|
||||
0xCAFE
|
||||
}
|
||||
}
|
||||
|
||||
fn debug(_: &dyn Foo) {}
|
||||
|
||||
impl Foo for i32 {}
|
||||
|
||||
fn main() {
|
||||
debug(&1);
|
||||
}"#,
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user