The rename function should not change any path segments that refer to a
module by super.
This commit is contained in:
TheDoctor314 2022-02-08 21:19:14 +05:30
parent 9b1978a3ed
commit add80bccfc

View file

@ -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);