diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-12-10 15:08:30 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-10 15:08:30 +0000 |
commit | a6c8098113505009453b12c8b461dd905f299c05 (patch) | |
tree | 98c91e7db05ab66f85e6d66ae393fe813712fb25 /crates/hir_def/src/item_tree.rs | |
parent | bd785788512d1a90ad7b0363835c4ea7d9c1f4ba (diff) | |
parent | 05d4a5a1507673281cc2d9caad7cb9474379c3d9 (diff) |
Merge #6798
6798: Ignore extern items in incorrect-case check r=jonas-schievink a=jonas-schievink
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/6736
bors r+
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir_def/src/item_tree.rs')
-rw-r--r-- | crates/hir_def/src/item_tree.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/hir_def/src/item_tree.rs b/crates/hir_def/src/item_tree.rs index 7eb388bae..c017b352d 100644 --- a/crates/hir_def/src/item_tree.rs +++ b/crates/hir_def/src/item_tree.rs | |||
@@ -1,8 +1,6 @@ | |||
1 | //! A simplified AST that only contains items. | 1 | //! A simplified AST that only contains items. |
2 | 2 | ||
3 | mod lower; | 3 | mod lower; |
4 | #[cfg(test)] | ||
5 | mod tests; | ||
6 | 4 | ||
7 | use std::{ | 5 | use std::{ |
8 | any::type_name, | 6 | any::type_name, |
@@ -507,6 +505,9 @@ pub struct Function { | |||
507 | pub has_self_param: bool, | 505 | pub has_self_param: bool, |
508 | pub has_body: bool, | 506 | pub has_body: bool, |
509 | pub is_unsafe: bool, | 507 | pub is_unsafe: bool, |
508 | /// Whether the function is located in an `extern` block (*not* whether it is an | ||
509 | /// `extern "abi" fn`). | ||
510 | pub is_extern: bool, | ||
510 | pub params: Box<[TypeRef]>, | 511 | pub params: Box<[TypeRef]>, |
511 | pub is_varargs: bool, | 512 | pub is_varargs: bool, |
512 | pub ret_type: TypeRef, | 513 | pub ret_type: TypeRef, |
@@ -565,6 +566,8 @@ pub struct Static { | |||
565 | pub name: Name, | 566 | pub name: Name, |
566 | pub visibility: RawVisibilityId, | 567 | pub visibility: RawVisibilityId, |
567 | pub mutable: bool, | 568 | pub mutable: bool, |
569 | /// Whether the static is in an `extern` block. | ||
570 | pub is_extern: bool, | ||
568 | pub type_ref: TypeRef, | 571 | pub type_ref: TypeRef, |
569 | pub ast_id: FileAstId<ast::Static>, | 572 | pub ast_id: FileAstId<ast::Static>, |
570 | } | 573 | } |