Fix tests that depended on loose visibility restriction

This commit is contained in:
Ryo Yoshida 2022-11-11 19:59:52 +09:00
parent e75afebeb2
commit 19306c070d
No known key found for this signature in database
GPG key ID: E25698A930586171
12 changed files with 90 additions and 89 deletions

View file

@ -268,12 +268,12 @@ fn main() {
foo::Foo { bar: 3, $0baz: false};
}
//- /foo.rs
struct Foo {
pub struct Foo {
bar: i32
}
"#,
r#"
struct Foo {
pub struct Foo {
bar: i32,
pub(crate) baz: bool
}

View file

@ -71,9 +71,9 @@ use a;
use a::{c, d::e};
mod a {
mod c {}
mod d {
mod e {}
pub mod c {}
pub mod d {
pub mod e {}
}
}
"#,
@ -87,9 +87,9 @@ use a::{
};
mod a {
mod c {}
mod d {
mod e {}
pub mod c {}
pub mod d {
pub mod e {}
}
}
"#,
@ -116,11 +116,11 @@ use b;
);
check_fix(
r#"
mod a { mod c {} }
mod a { pub mod c {} }
use a::{c$0};
"#,
r#"
mod a { mod c {} }
mod a { pub mod c {} }
use a::c;
"#,
);
@ -136,11 +136,11 @@ use a;
);
check_fix(
r#"
mod a { mod c {} mod d { mod e {} } }
mod a { pub mod c {} pub mod d { pub mod e {} } }
use a::{c, d::{e$0}};
"#,
r#"
mod a { mod c {} mod d { mod e {} } }
mod a { pub mod c {} pub mod d { pub mod e {} } }
use a::{c, d::e};
"#,
);