mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Fix type inference for raw (byte) strings
This commit is contained in:
parent
2689348772
commit
d67eabb512
7 changed files with 119 additions and 65 deletions
|
@ -230,20 +230,19 @@ mod tests {
|
|||
assert_eq!("[unknown]", &type_name);
|
||||
}
|
||||
|
||||
// FIXME: improve type_of to make this work
|
||||
#[test]
|
||||
fn test_type_of_for_expr_2() {
|
||||
let (analysis, range) = single_file_with_range(
|
||||
"
|
||||
fn main() {
|
||||
let foo: usize = 1;
|
||||
let bar = <|>1 + foo_test<|>;
|
||||
let bar = <|>1 + foo<|>;
|
||||
}
|
||||
",
|
||||
);
|
||||
|
||||
let type_name = analysis.type_of(range).unwrap().unwrap();
|
||||
assert_eq!("[unknown]", &type_name);
|
||||
assert_eq!("usize", &type_name);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue