void main() { ModuleInfo m; foreach (_; m) {} } Errors: /usr/include/dmd/druntime/import/object.d(1500): Error: module minfo is in file 'rt/minfo.d' which cannot be read import path[0] = /usr/include/dmd/phobos import path[1] = /usr/include/dmd/druntime/import The code above doesn't compile with -inline because ModuleInfo.opApply imports from rt. Pull request incoming.
Thank very much for finding this issue! I encountered it one of my projects (~6000 LOC), but I did not manage to reduce it. This actually a regression, because it used to work with DMD <= v2.067.1.
Pull request: https://github.com/D-Programming-Language/druntime/pull/1450
Seems like this used to work b/c we did not inline library code until recently.