File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -3549,9 +3549,12 @@ pub fn getAllErrorsAlloc(comp: *Compilation) !ErrorBundle {
3549
3549
const end = start + tree .tokenSlice (failed .import_token ).len ;
3550
3550
const loc = std .zig .findLineColumn (source .bytes , start );
3551
3551
try bundle .addRootErrorMessage (.{
3552
- .msg = switch (failed .kind ) {
3553
- .file_outside_module_root = > try bundle .addString ("import of file outside module path" ),
3554
- },
3552
+ // There is currently only one field in `kind`, so uncommenting it exposes a compiler bug: #23902
3553
+ //.msg = switch (failed.kind) {
3554
+ // .file_outside_module_root => try bundle.addString("import of file outside module path"),
3555
+ //},
3556
+ .msg = try bundle .addString ("import of file outside module path" ),
3557
+
3555
3558
.src_loc = try bundle .addSourceLocation (.{
3556
3559
.src_path = try bundle .printString ("{}" , .{file .path .fmt (comp )}),
3557
3560
.span_start = start ,
Original file line number Diff line number Diff line change @@ -222,7 +222,8 @@ failed_imports: std.ArrayListUnmanaged(struct {
222
222
file_index : File.Index ,
223
223
import_string : Zir.NullTerminatedString ,
224
224
import_token : Ast.TokenIndex ,
225
- kind : enum { file_outside_module_root },
225
+ // There is currently only one field in `kind`, so uncommenting it exposes a compiler bug: #23902
226
+ //kind: enum { file_outside_module_root },
226
227
}) = .empty ,
227
228
failed_exports : std .AutoArrayHashMapUnmanaged (Export.Index , * ErrorMsg ) = .empty ,
228
229
/// If analysis failed due to a cimport error, the corresponding Clang errors
Original file line number Diff line number Diff line change @@ -2233,7 +2233,8 @@ pub fn computeAliveFiles(pt: Zcu.PerThread) Allocator.Error!bool {
2233
2233
.file_index = file_idx ,
2234
2234
.import_string = item .data .name ,
2235
2235
.import_token = item .data .token ,
2236
- .kind = .file_outside_module_root ,
2236
+ // There is currently only one field in `kind`, so uncommenting it exposes a compiler bug: #23902
2237
+ //.kind = .file_outside_module_root,
2237
2238
});
2238
2239
_ = zcu .alive_files .pop (); // we failed to populate `mod`/`sub_file_path`
2239
2240
},
You can’t perform that action at this time.
0 commit comments