-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct definition node of modules and test goto def on
crate
keyword
commit-id:93c713c0
- Loading branch information
Showing
5 changed files
with
88 additions
and
36 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
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 @@ | ||
//! > Test goto definition on `crate` keyword in `use` statement. | ||
|
||
//! > test_runner_name | ||
test_goto_definition | ||
|
||
//! > cairo_code | ||
use cra<caret>te::foo::func; | ||
|
||
mod foo { | ||
pub fn func() {} | ||
} | ||
|
||
//! > Goto definition #0 | ||
use cra<caret>te::foo::func; | ||
--- | ||
<sel>use crate::foo::func; | ||
|
||
mod foo { | ||
pub fn func() {} | ||
}</sel> | ||
|
||
//! > ========================================================================== | ||
|
||
//! > Test goto definition on `crate` keyword used in expressions. | ||
|
||
//! > test_runner_name | ||
test_goto_definition | ||
|
||
//! > cairo_code | ||
fn main() { | ||
let _ = cr<caret>ate::foo::func(); | ||
} | ||
|
||
mod foo { | ||
pub fn func() {} | ||
} | ||
|
||
//! > Goto definition #0 | ||
let _ = cr<caret>ate::foo::func(); | ||
--- | ||
<sel>fn main() { | ||
let _ = crate::foo::func(); | ||
} | ||
|
||
mod foo { | ||
pub fn func() {} | ||
}</sel> |
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