mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +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
@ -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]
|
#[test]
|
||||||
fn test_enum_variant_from_module_1() {
|
fn test_enum_variant_from_module_1() {
|
||||||
cov_mark::check!(rename_non_local);
|
cov_mark::check!(rename_non_local);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user