mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 01:17:27 +00:00
Add test
The rename function should not change any path segments that refer to a module by super.
This commit is contained in:
parent
9b1978a3ed
commit
add80bccfc
1 changed files with 25 additions and 0 deletions
|
@ -1108,6 +1108,31 @@ pub mod foo$0;
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_rename_mod_ref_by_super() {
|
||||
check(
|
||||
"baz",
|
||||
r#"
|
||||
mod $0foo {
|
||||
struct X;
|
||||
|
||||
mod bar {
|
||||
use super::X;
|
||||
}
|
||||
}
|
||||
"#,
|
||||
r#"
|
||||
mod baz {
|
||||
struct X;
|
||||
|
||||
mod bar {
|
||||
use super::X;
|
||||
}
|
||||
}
|
||||
"#,
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_enum_variant_from_module_1() {
|
||||
cov_mark::check!(rename_non_local);
|
||||
|
|
Loading…
Reference in a new issue