Simplify lifetimes.

This commit is contained in:
Stephen Chung
2021-03-03 22:49:57 +08:00
parent ed568a9395
commit ade290da7e
9 changed files with 81 additions and 92 deletions

View File

@@ -203,7 +203,7 @@ impl Engine {
/// # Examples
///
/// The following will raise an error during parsing because the `if` keyword is disabled
/// and is recognized as a variable name!
/// and is recognized as a reserved symbol!
///
/// ```rust,should_panic
/// # fn main() -> Result<(), rhai::ParseError> {
@@ -214,7 +214,7 @@ impl Engine {
/// engine.disable_symbol("if"); // disable the 'if' keyword
///
/// engine.compile("let x = if true { 42 } else { 0 };")?;
/// // ^ 'if' is rejected as a reserved keyword
/// // ^ 'if' is rejected as a reserved symbol
/// # Ok(())
/// # }
/// ```