mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
impl From<ImportedModuleName> for QualifiedModuleName
This commit is contained in:
parent
6fffaa6dda
commit
0f89d3558a
4 changed files with 20 additions and 12 deletions
|
@ -10,6 +10,7 @@ use bumpalo::Bump;
|
|||
use roc_collections::soa::{EitherIndex, Index, Slice};
|
||||
use roc_error_macros::internal_error;
|
||||
use roc_module::called_via::{BinOp, CalledVia, UnaryOp};
|
||||
use roc_module::ident::QualifiedModuleName;
|
||||
use roc_region::all::{Loc, Position, Region};
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||
|
@ -999,6 +1000,15 @@ pub struct ImportedModuleName<'a> {
|
|||
pub name: ModuleName<'a>,
|
||||
}
|
||||
|
||||
impl<'a> From<ImportedModuleName<'a>> for QualifiedModuleName<'a> {
|
||||
fn from(imported: ImportedModuleName<'a>) -> Self {
|
||||
Self {
|
||||
opt_package: imported.package,
|
||||
module: imported.name.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct ImportAlias<'a>(&'a str);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue