Remove moduleContextImpl struct

The moduleContextImpl structure contains duplicate information on the
contexts. BaseModuleContext, ModuleContext and DepsContext can already
surface which Module is being processed via Module(). Because most of
the Rust-specific methods on the *Context structures simply forward to
the Module methods, expose a RustModule() method.

Test: cd external/rust/crates; mma
Change-Id: Ifee90825d54081fc5e9a8df0b7c4580412e9158c
This commit is contained in:
Thiébaud Weksteen
2020-06-24 11:32:48 +02:00
parent a5d1fab176
commit 1f7f70fe39
5 changed files with 40 additions and 54 deletions

View File

@@ -253,7 +253,7 @@ func (compiler *baseCompiler) getStem(ctx ModuleContext) string {
}
func (compiler *baseCompiler) getStemWithoutSuffix(ctx BaseModuleContext) string {
stem := ctx.baseModuleName()
stem := ctx.ModuleName()
if String(compiler.Properties.Stem) != "" {
stem = String(compiler.Properties.Stem)
}