@@ -838,7 +838,7 @@ fn link_rlib(sess: Session,
838
838
out_filename : & Path ) -> Archive {
839
839
let mut a = Archive :: create ( sess, out_filename, obj_filename) ;
840
840
841
- for & ( ref l, kind) in cstore :: get_used_libraries ( sess. cstore ) . iter ( ) {
841
+ for & ( ref l, kind) in sess. cstore . get_used_libraries ( ) . iter ( ) {
842
842
match kind {
843
843
cstore:: NativeStatic => {
844
844
a. add_native_library ( l. as_slice ( ) ) ;
@@ -912,9 +912,9 @@ fn link_staticlib(sess: Session, obj_filename: &Path, out_filename: &Path) {
912
912
let mut a = link_rlib ( sess, None , obj_filename, out_filename) ;
913
913
a. add_native_library ( "morestack" ) ;
914
914
915
- let crates = cstore :: get_used_crates ( sess. cstore , cstore:: RequireStatic ) ;
915
+ let crates = sess. cstore . get_used_crates ( cstore:: RequireStatic ) ;
916
916
for & ( cnum, ref path) in crates. iter ( ) {
917
- let name = cstore :: get_crate_data ( sess. cstore , cnum) . name ;
917
+ let name = sess. cstore . get_crate_data ( cnum) . name ;
918
918
let p = match * path {
919
919
Some ( ref p) => p. clone ( ) , None => {
920
920
sess. err ( format ! ( "could not find rlib for: `{}`" , name) ) ;
@@ -1072,7 +1072,7 @@ fn link_args(sess: Session,
1072
1072
// Finally add all the linker arguments provided on the command line along
1073
1073
// with any #[link_args] attributes found inside the crate
1074
1074
args. push_all ( sess. opts . linker_args ) ;
1075
- for arg in cstore :: get_used_link_args ( sess. cstore ) . iter ( ) {
1075
+ for arg in sess. cstore . get_used_link_args ( ) . iter ( ) {
1076
1076
args. push ( arg. clone ( ) ) ;
1077
1077
}
1078
1078
return args;
@@ -1101,7 +1101,7 @@ fn add_local_native_libraries(args: &mut ~[~str], sess: Session) {
1101
1101
args. push ( "-L" + path. as_str ( ) . unwrap ( ) . to_owned ( ) ) ;
1102
1102
}
1103
1103
1104
- for & ( ref l, kind) in cstore :: get_used_libraries ( sess. cstore ) . iter ( ) {
1104
+ for & ( ref l, kind) in sess. cstore . get_used_libraries ( ) . iter ( ) {
1105
1105
match kind {
1106
1106
cstore:: NativeUnknown | cstore:: NativeStatic => {
1107
1107
args. push ( "-l" + * l) ;
@@ -1143,7 +1143,7 @@ fn add_upstream_rust_crates(args: &mut ~[~str], sess: Session,
1143
1143
// all dynamic libaries require dynamic dependencies (see above), so
1144
1144
// it's satisfactory to include either all static libraries or all
1145
1145
// dynamic libraries.
1146
- let crates = cstore:: get_used_crates ( cstore , cstore:: RequireStatic ) ;
1146
+ let crates = cstore. get_used_crates ( cstore:: RequireStatic ) ;
1147
1147
if crates. iter ( ) . all ( |& ( _, ref p) | p. is_some ( ) ) {
1148
1148
for ( cnum, path) in crates. move_iter ( ) {
1149
1149
let cratepath = path. unwrap ( ) ;
@@ -1163,7 +1163,7 @@ fn add_upstream_rust_crates(args: &mut ~[~str], sess: Session,
1163
1163
// If we're not doing LTO, then our job is simply to just link
1164
1164
// against the archive.
1165
1165
if sess. lto ( ) {
1166
- let name = cstore :: get_crate_data ( sess. cstore , cnum) . name ;
1166
+ let name = sess. cstore . get_crate_data ( cnum) . name ;
1167
1167
time ( sess. time_passes ( ) , format ! ( "altering {}.rlib" , name) ,
1168
1168
( ) , |( ) | {
1169
1169
let dst = tmpdir. join ( cratepath. filename ( ) . unwrap ( ) ) ;
@@ -1196,13 +1196,13 @@ fn add_upstream_rust_crates(args: &mut ~[~str], sess: Session,
1196
1196
// this case is the fallback
1197
1197
// * If an executable is being created, and one of the inputs is missing as
1198
1198
// a static library, then this is the fallback case.
1199
- let crates = cstore:: get_used_crates ( cstore , cstore:: RequireDynamic ) ;
1199
+ let crates = cstore. get_used_crates ( cstore:: RequireDynamic ) ;
1200
1200
for & ( cnum, ref path) in crates. iter ( ) {
1201
1201
let cratepath = match * path {
1202
1202
Some ( ref p) => p. clone ( ) ,
1203
1203
None => {
1204
1204
sess. err ( format ! ( "could not find dynamic library for: `{}`" ,
1205
- cstore :: get_crate_data ( sess. cstore, cnum) . name) ) ;
1205
+ sess. cstore. get_crate_data ( cnum) . name) ) ;
1206
1206
return
1207
1207
}
1208
1208
} ;
@@ -1235,7 +1235,7 @@ fn add_upstream_rust_crates(args: &mut ~[~str], sess: Session,
1235
1235
// also be resolved in the target crate.
1236
1236
fn add_upstream_native_libraries ( args : & mut ~[ ~str ] , sess : Session ) {
1237
1237
let cstore = sess. cstore ;
1238
- cstore:: iter_crate_data ( cstore , |cnum, _| {
1238
+ cstore. iter_crate_data ( |cnum, _| {
1239
1239
let libs = csearch:: get_native_libraries ( cstore, cnum) ;
1240
1240
for & ( kind, ref lib) in libs. iter ( ) {
1241
1241
match kind {
0 commit comments