diff options
| author | Kivooeo <Kivooeo123@gmail.com> | 2025-07-01 23:37:49 +0500 |
|---|---|---|
| committer | Kivooeo <Kivooeo123@gmail.com> | 2025-07-10 18:50:35 +0500 |
| commit | 259512e3b6a920b1e1eb6034fbc738e7b9815337 (patch) | |
| tree | c4c6b3982318b82036fd4d7d2b66885eb5ef814b /tests/ui/modules | |
| parent | 1fb5e0149fb85af0e49fa40329cbc352b4cba861 (diff) | |
| download | rust-259512e3b6a920b1e1eb6034fbc738e7b9815337.tar.gz rust-259512e3b6a920b1e1eb6034fbc738e7b9815337.zip | |
cleaned up some tests
Diffstat (limited to 'tests/ui/modules')
4 files changed, 24 insertions, 10 deletions
diff --git a/tests/ui/modules/module-qualified-paths-basic.rs b/tests/ui/modules/module-qualified-paths-basic.rs index d948ffc1520..c02f6060caa 100644 --- a/tests/ui/modules/module-qualified-paths-basic.rs +++ b/tests/ui/modules/module-qualified-paths-basic.rs @@ -1,11 +1,20 @@ +//! Checks that functions from different modules are accessible via their fully-qualified paths. + //@ run-pass mod foo { - pub fn x() -> isize { return 1; } + pub fn x() -> isize { + return 1; + } } mod bar { - pub fn y() -> isize { return 1; } + pub fn y() -> isize { + return 1; + } } -pub fn main() { foo::x(); bar::y(); } +pub fn main() { + foo::x(); + bar::y(); +} diff --git a/tests/ui/modules/module-use-nested-groups.rs b/tests/ui/modules/module-use-nested-groups.rs index c5d66a86935..84d1f9141a8 100644 --- a/tests/ui/modules/module-use-nested-groups.rs +++ b/tests/ui/modules/module-use-nested-groups.rs @@ -1,3 +1,5 @@ +//! Checks complex `use` syntax and availability of types across nested modules. + //@ run-pass mod a { diff --git a/tests/ui/modules/primitive-type-module-deprecated-paths.rs b/tests/ui/modules/primitive-type-module-deprecated-paths.rs index 6e8c7053c57..5c9d2a616b3 100644 --- a/tests/ui/modules/primitive-type-module-deprecated-paths.rs +++ b/tests/ui/modules/primitive-type-module-deprecated-paths.rs @@ -1,9 +1,10 @@ +//! Make sure the module level constants are still there and accessible even after +//! the corresponding associated constants have been added, and later stabilized. + //@ run-pass -// Make sure the module level constants are still there and accessible even after -// the corresponding associated constants have been added, and later stabilized. #![allow(deprecated, deprecated_in_future)] -use std::{u16, f32}; +use std::{f32, u16}; fn main() { let _ = u16::MAX; diff --git a/tests/ui/modules/use-keyword-reexport-type-alias.rs b/tests/ui/modules/use-keyword-reexport-type-alias.rs index 4f3d1ee500d..c62bd9687ae 100644 --- a/tests/ui/modules/use-keyword-reexport-type-alias.rs +++ b/tests/ui/modules/use-keyword-reexport-type-alias.rs @@ -1,18 +1,20 @@ +//! Checks module re-exports, aliasing with `pub use`, +//! and calling private methods via `Self` in an impl block. + //@ run-pass #![allow(unused_variables)] pub struct A; mod test { - pub use super :: A; - - pub use self :: A as B; + pub use self::A as B; + pub use super::A; } impl A { fn f() {} fn g() { - Self :: f() + Self::f() } } |
