-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1739 from fzyzcjy/feat/11840
Improve hints when using non-meaningful `&mut`
- Loading branch information
Showing
6 changed files
with
113 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
frb_codegen/test_fixtures/library/codegen/parser/mod/error_non_opaque_mut/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "example" | ||
version = "0.1.0" | ||
edition = "2018" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
|
||
[workspace] |
47 changes: 47 additions & 0 deletions
47
...en/test_fixtures/library/codegen/parser/mod/error_non_opaque_mut/expect_source_graph.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"manifest_path": "{the-working-directory}/Cargo.toml", | ||
"name": "example", | ||
"root_module": { | ||
"info": { | ||
"file_path": "{the-working-directory}/src/lib.rs", | ||
"module_path": [ | ||
"crate" | ||
], | ||
"visibility": "Public" | ||
}, | ||
"scope": { | ||
"enums": [], | ||
"modules": [ | ||
{ | ||
"info": { | ||
"file_path": "{the-working-directory}/src/api.rs", | ||
"module_path": [ | ||
"crate", | ||
"api" | ||
], | ||
"visibility": "Inherited" | ||
}, | ||
"scope": { | ||
"enums": [], | ||
"modules": [], | ||
"structs": [ | ||
{ | ||
"ident": "MyStruct", | ||
"mirror": false, | ||
"path": [ | ||
"crate", | ||
"api", | ||
"MyStruct" | ||
], | ||
"visibility": "Public" | ||
} | ||
], | ||
"type_alias": [] | ||
} | ||
} | ||
], | ||
"structs": [], | ||
"type_alias": [] | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
frb_codegen/test_fixtures/library/codegen/parser/mod/error_non_opaque_mut/src/api.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
pub struct MyStruct { | ||
my_field: String, | ||
} | ||
|
||
impl MyStruct { | ||
pub fn my_mut_method(&mut self) {} | ||
} |
1 change: 1 addition & 0 deletions
1
frb_codegen/test_fixtures/library/codegen/parser/mod/error_non_opaque_mut/src/lib.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mod api; |