mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
fix: Always explicitly set trait ref self types when lowering
This commit is contained in:
parent
70ee4e5545
commit
20f7ab5ab4
9 changed files with 80 additions and 64 deletions
|
@ -1556,7 +1556,7 @@ fn builtin_derive_macro() {
|
|||
Bar,
|
||||
}
|
||||
#[derive(Clone)]
|
||||
struct X(i32, Z, i64)
|
||||
struct X(i32, Z, i64);
|
||||
#[derive(Clone)]
|
||||
struct Y {
|
||||
field1: i32,
|
||||
|
@ -1574,20 +1574,20 @@ fn builtin_derive_macro() {
|
|||
);
|
||||
check_number(
|
||||
r#"
|
||||
//- minicore: default, derive, builtin_impls
|
||||
#[derive(Default)]
|
||||
struct X(i32, Y, i64)
|
||||
#[derive(Default)]
|
||||
struct Y {
|
||||
field1: i32,
|
||||
field2: u8,
|
||||
}
|
||||
//- minicore: default, derive, builtin_impls
|
||||
#[derive(Default)]
|
||||
struct X(i32, Y, i64);
|
||||
#[derive(Default)]
|
||||
struct Y {
|
||||
field1: i32,
|
||||
field2: u8,
|
||||
}
|
||||
|
||||
const GOAL: u8 = {
|
||||
let x = X::default();
|
||||
x.1.field2
|
||||
};
|
||||
"#,
|
||||
const GOAL: u8 = {
|
||||
let x = X::default();
|
||||
x.1.field2
|
||||
};
|
||||
"#,
|
||||
0,
|
||||
);
|
||||
}
|
||||
|
@ -2828,7 +2828,7 @@ fn type_error() {
|
|||
y.0
|
||||
};
|
||||
"#,
|
||||
|e| matches!(e, ConstEvalError::MirLowerError(MirLowerError::TypeMismatch(_))),
|
||||
|e| matches!(e, ConstEvalError::MirLowerError(MirLowerError::HasErrors)),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue