diff --git a/compiler-cli/src/run.rs b/compiler-cli/src/run.rs index 6b80d4397a7..63821d947a4 100644 --- a/compiler-cli/src/run.rs +++ b/compiler-cli/src/run.rs @@ -129,7 +129,8 @@ fn setup( let warning_emitter = WarningEmitter::new(Rc::new(ConsoleWarningEmitter)); // Warn incase the module being run has been as internal - if built.is_internal(&module.clone().into()).is_ok() { + let internal_module=built.is_internal(&module.clone().into()).unwrap_or(false); + if internal_module { let warning = Warning::InternalMain { module: module.clone().into(), }; diff --git a/compiler-core/src/warning.rs b/compiler-core/src/warning.rs index 4b9d65cb4aa..f609138a17a 100644 --- a/compiler-core/src/warning.rs +++ b/compiler-core/src/warning.rs @@ -255,6 +255,7 @@ only lowercase alphanumeric characters or underscores." "Rename `{path}` to be valid, or remove this file from the project source." )), }, + Warning::DeprecatedSyntax { path, src, @@ -279,6 +280,7 @@ like this: `[item, ..list]`.", extra_labels: vec![], }), }, + Warning::DeprecatedSyntax { path, src, @@ -302,6 +304,7 @@ like this: `[item, ..list]`.", extra_labels: vec![], }), }, + Warning::DeprecatedSyntax { path, src, @@ -321,6 +324,7 @@ like this: `[item, ..list]`.", extra_labels: vec![], }), }, + Warning::DeprecatedSyntax { path, src, @@ -343,6 +347,7 @@ To match on all possible lists, use the `_` catch-all pattern instead.", extra_labels: vec![], }), }, + Warning::DeprecatedSyntax { path, src, @@ -371,6 +376,7 @@ To match on all possible lists, use the `_` catch-all pattern instead.", }), } } + Self::Type { path, warning, src } => match warning { type_::Warning::Todo { kind,