Fix diagnostic messages.
This commit is contained in:
parent
6400b33b1b
commit
08f428def2
@ -3,8 +3,8 @@ use crate::packages::iter_basic::{BitRange, CharsStream, StepRange};
|
|||||||
use crate::parser::{ParseResult, ParseState};
|
use crate::parser::{ParseResult, ParseState};
|
||||||
use crate::types::StringsInterner;
|
use crate::types::StringsInterner;
|
||||||
use crate::{
|
use crate::{
|
||||||
Engine, ExclusiveRange, FnPtr, ImmutableString, InclusiveRange, OptimizationLevel, Position,
|
Engine, ExclusiveRange, FnPtr, ImmutableString, InclusiveRange, Position, RhaiError,
|
||||||
RhaiError, SmartString, ERR,
|
SmartString, ERR,
|
||||||
};
|
};
|
||||||
use std::any::type_name;
|
use std::any::type_name;
|
||||||
#[cfg(feature = "no_std")]
|
#[cfg(feature = "no_std")]
|
||||||
@ -288,7 +288,7 @@ impl Engine {
|
|||||||
stream.peekable(),
|
stream.peekable(),
|
||||||
&mut state,
|
&mut state,
|
||||||
#[cfg(not(feature = "no_optimize"))]
|
#[cfg(not(feature = "no_optimize"))]
|
||||||
OptimizationLevel::None,
|
crate::OptimizationLevel::None,
|
||||||
#[cfg(feature = "no_optimize")]
|
#[cfg(feature = "no_optimize")]
|
||||||
(),
|
(),
|
||||||
)?;
|
)?;
|
||||||
|
@ -51,6 +51,7 @@ fn main() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Initialize scripting engine
|
// Initialize scripting engine
|
||||||
|
#[allow(unused_mut)]
|
||||||
let mut engine = Engine::new();
|
let mut engine = Engine::new();
|
||||||
|
|
||||||
#[cfg(not(feature = "no_optimize"))]
|
#[cfg(not(feature = "no_optimize"))]
|
||||||
|
@ -543,6 +543,7 @@ impl Engine {
|
|||||||
let op_pos = parent.position();
|
let op_pos = parent.position();
|
||||||
|
|
||||||
#[cfg(feature = "debugging")]
|
#[cfg(feature = "debugging")]
|
||||||
|
#[allow(unused_mut)]
|
||||||
let mut this_ptr = this_ptr;
|
let mut this_ptr = this_ptr;
|
||||||
|
|
||||||
match ChainType::from(parent) {
|
match ChainType::from(parent) {
|
||||||
|
@ -71,6 +71,7 @@ impl FnPtr {
|
|||||||
/// Create a new function pointer without checking its parameters.
|
/// Create a new function pointer without checking its parameters.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub(crate) fn new_unchecked(
|
pub(crate) fn new_unchecked(
|
||||||
name: impl Into<ImmutableString>,
|
name: impl Into<ImmutableString>,
|
||||||
curry: StaticVec<Dynamic>,
|
curry: StaticVec<Dynamic>,
|
||||||
|
Loading…
Reference in New Issue
Block a user