mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Add flag to disallow opaque types for DisplayTarget::SourceCode
This commit is contained in:
parent
7501d3b721
commit
ac03de773f
15 changed files with 62 additions and 29 deletions
|
@ -159,7 +159,7 @@ fn check_impl(ra_fixture: &str, allow_none: bool, only_types: bool, display_sour
|
|||
let range = node.as_ref().original_file_range(&db);
|
||||
if let Some(expected) = types.remove(&range) {
|
||||
let actual = if display_source {
|
||||
ty.display_source_code(&db, def.module(&db)).unwrap()
|
||||
ty.display_source_code(&db, def.module(&db), true).unwrap()
|
||||
} else {
|
||||
ty.display_test(&db).to_string()
|
||||
};
|
||||
|
@ -175,7 +175,7 @@ fn check_impl(ra_fixture: &str, allow_none: bool, only_types: bool, display_sour
|
|||
let range = node.as_ref().original_file_range(&db);
|
||||
if let Some(expected) = types.remove(&range) {
|
||||
let actual = if display_source {
|
||||
ty.display_source_code(&db, def.module(&db)).unwrap()
|
||||
ty.display_source_code(&db, def.module(&db), true).unwrap()
|
||||
} else {
|
||||
ty.display_test(&db).to_string()
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue