@@ -22,29 +22,12 @@ type env = @rec(
22
22
23
23
// TODO: return something
24
24
fn load_crate ( ast . ident ident, vec[ str] library_search_paths ) -> @( ) {
25
- auto filename = os. dylib_filename ( ident) ;
26
25
for ( str library_search_path in library_search_paths) {
27
- auto path = fs. connect( library_search_path, filename) ;
28
- auto pb = _str. buf( path) ;
29
- auto llmb = llvmext. LLVMRustCreateMemoryBufferWithContentsOfFile ( pb) ;
30
- if ( ( llmb as int) != 0 ) {
31
- auto llof = mk_object_file( llmb) ;
32
- if ( ( llof. llof as int) != 0 ) {
33
- auto llsi = mk_section_iter( llof. llof) ;
34
- while ( ( llvmext. LLVMIsSectionIteratorAtEnd ( llof. llof,
35
- llsi. llsi) as int) == 0 ) {
36
- // TODO: check name, pass contents off.
37
-
38
- llvmext. LLVMMoveToNextSection ( llsi. llsi) ;
39
- }
40
- }
41
- }
26
+ auto path = fs. connect( library_search_path, ident) ;
27
+ // TODO
42
28
}
43
29
44
- // TODO: write line number of "use" statement
45
- log #fmt( "can't find a crate named '%s' (looked for '%s' in %s)" ,
46
- ident, filename, _str. connect( library_search_paths, ", " ) ) ;
47
- fail;
30
+ ret @( ) ;
48
31
}
49
32
50
33
fn fold_view_item_use ( & env e, & span sp, ast . ident ident,
0 commit comments