@@ -692,12 +692,11 @@ impl NvvmProgram {
692692
693693#[ cfg( test) ]
694694mod tests {
695+ use super :: * ;
695696 use std:: str:: FromStr ;
696697
697698 #[ test]
698699 fn nvvm_arch_capability_value ( ) {
699- use crate :: NvvmArch ;
700-
701700 assert_eq ! ( NvvmArch :: Compute35 . capability_value( ) , 35 ) ;
702701 assert_eq ! ( NvvmArch :: Compute37 . capability_value( ) , 37 ) ;
703702 assert_eq ! ( NvvmArch :: Compute50 . capability_value( ) , 50 ) ;
@@ -718,8 +717,6 @@ mod tests {
718717
719718 #[ test]
720719 fn nvvm_arch_major_minor_version ( ) {
721- use crate :: NvvmArch ;
722-
723720 // Test major/minor version extraction
724721 assert_eq ! ( NvvmArch :: Compute35 . major_version( ) , 3 ) ;
725722 assert_eq ! ( NvvmArch :: Compute35 . minor_version( ) , 5 ) ;
@@ -740,8 +737,6 @@ mod tests {
740737
741738 #[ test]
742739 fn nvvm_arch_target_feature ( ) {
743- use crate :: NvvmArch ;
744-
745740 // Test baseline features
746741 assert_eq ! ( NvvmArch :: Compute35 . target_feature( ) , "compute_35" ) ;
747742 assert_eq ! ( NvvmArch :: Compute61 . target_feature( ) , "compute_61" ) ;
@@ -767,8 +762,6 @@ mod tests {
767762
768763 #[ test]
769764 fn nvvm_arch_all_target_features ( ) {
770- use crate :: NvvmArch ;
771-
772765 assert_eq ! (
773766 NvvmArch :: Compute35 . all_target_features( ) ,
774767 vec![ "compute_35" ]
@@ -1039,8 +1032,6 @@ mod tests {
10391032
10401033 #[ test]
10411034 fn nvvm_arch_iter_up_to_includes_only_lower_or_equal ( ) {
1042- use crate :: NvvmArch ;
1043-
10441035 // Compute35 only includes itself
10451036 let archs: Vec < _ > = NvvmArch :: Compute35 . iter_up_to ( ) . collect ( ) ;
10461037 assert_eq ! ( archs, vec![ NvvmArch :: Compute35 ] ) ;
@@ -1079,8 +1070,8 @@ mod tests {
10791070
10801071 #[ test]
10811072 fn options_parse_correctly ( ) {
1082- use crate :: NvvmArch :: * ;
1083- use crate :: NvvmOption :: { self , * } ;
1073+ use NvvmArch :: * ;
1074+ use NvvmOption :: { self , * } ;
10841075
10851076 let ok = |opt, val| assert_eq ! ( NvvmOption :: from_str( opt) , Ok ( val) ) ;
10861077 let err = |opt, s : & str | assert_eq ! ( NvvmOption :: from_str( opt) , Err ( s. to_string( ) ) ) ;
@@ -1133,8 +1124,6 @@ mod tests {
11331124
11341125 #[ test]
11351126 fn nvvm_arch_variant_checks ( ) {
1136- use crate :: NvvmArch ;
1137-
11381127 // Base variants
11391128 assert ! ( NvvmArch :: Compute90 . is_base_variant( ) ) ;
11401129 assert ! ( NvvmArch :: Compute120 . is_base_variant( ) ) ;
@@ -1155,8 +1144,6 @@ mod tests {
11551144
11561145 #[ test]
11571146 fn nvvm_arch_base_architecture ( ) {
1158- use crate :: NvvmArch ;
1159-
11601147 // Base variants return themselves
11611148 assert_eq ! ( NvvmArch :: Compute90 . base_architecture( ) , NvvmArch :: Compute90 ) ;
11621149 assert_eq ! (
@@ -1187,8 +1174,6 @@ mod tests {
11871174
11881175 #[ test]
11891176 fn nvvm_arch_get_variants ( ) {
1190- use crate :: NvvmArch ;
1191-
11921177 // Architecture with only base variant
11931178 let compute80_variants = NvvmArch :: Compute80 . get_variants ( ) ;
11941179 assert_eq ! ( compute80_variants, vec![ NvvmArch :: Compute80 ] ) ;
@@ -1212,8 +1197,6 @@ mod tests {
12121197
12131198 #[ test]
12141199 fn nvvm_arch_variants_for_capability ( ) {
1215- use crate :: NvvmArch ;
1216-
12171200 // Capability with single variant
12181201 assert_eq ! (
12191202 NvvmArch :: variants_for_capability( 75 ) ,
0 commit comments