Skip to content

Commit 801c2ad

Browse files
authored
Merge pull request #921 from schungx/master
Minor fixes
2 parents f2bfa7d + e4e87a6 commit 801c2ad

File tree

7 files changed

+13
-20
lines changed

7 files changed

+13
-20
lines changed

CHANGELOG.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@ Bug fixes
99

1010
* (Fuzzing) An integer-overflow bug from an inclusive range in the bits iterator is fixed.
1111
* (Fuzzing) An integer-underflow bug from an inclusive range is fixed.
12-
* Copy strings if the strings interner is busy instead of panicing.
12+
* Copy strings if the strings interner is busy instead of panicing (thanks [`@irevoire`](https://github.com/irevoire) [917](https://github.com/rhaiscript/rhai/pull/917)).
13+
* Deserialization of `Scope` now works correctly (thanks [`@AngelicosPhosphoros`](https://github.com/AngelicosPhosphoros) [918](https://github.com/rhaiscript/rhai/pull/918)).
14+
* Support for `thumbv6m` target is fixed (thanks [`chxry`](https://github.com/chxry) [919](https://github.com/rhaiscript/rhai/pull/919))
1315

1416
New features
1517
------------
1618

17-
* Added support for _raw strings_ with the syntax `##..#" ... "#..##`.
19+
* Added support for _raw strings_ with the syntax `##..#" ... "#..##` (thanks [`@cellomath`](https://github.com/cellomath) [908](https://github.com/rhaiscript/rhai/pull/908) [910](https://github.com/rhaiscript/rhai/pull/910)).
1820

1921
Enhancements
2022
------------
2123

22-
* New `as_immutable_string_ref`, `as_array_ref`, `as_blob_ref`, `as_map_ref` plus their `_mut` variants for `Dynamic`.
24+
* New `as_immutable_string_ref`, `as_array_ref`, `as_blob_ref`, `as_map_ref` plus their `_mut` variants for `Dynamic` (thanks [`@madonuko`](https://github.com/madonuko) [904](https://github.com/rhaiscript/rhai/pull/904)).
2325
* The `break`, `return` and `throw` statements can now be simply used as `switch` case statement expressions. Previously it is required that the statement be wrapped in a block.
2426

2527

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ rhai_codegen = { version = "2.1.0", path = "codegen" }
2929

3030
no-std-compat = { git = "https://gitlab.com/jD91mZM2/no-std-compat", version = "0.4.1", default-features = false, features = ["alloc"], optional = true }
3131
libm = { version = "0.2.0", default-features = false, optional = true }
32-
hashbrown = { version = "0.14.0", optional = true }
32+
hashbrown = { version = "0.15.0", optional = true }
3333
core-error = { version = "0.0.0", default-features = false, features = ["alloc"], optional = true }
3434
serde = { version = "1.0.96", default-features = false, features = ["derive", "alloc"], optional = true }
3535
serde_json = { version = "1.0.45", default-features = false, features = ["alloc"], optional = true }

codegen/src/test/custom_type.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ mod custom_type_tests {
1010
#[derive(Clone, CustomType)]
1111
pub struct Bar(
1212
#[rhai_type(skip)]
13-
#[cfg(not(feature = "no_float"))]
1413
rhai::FLOAT,
1514
INT,
1615
#[rhai_type(name = "boo", readonly)]
@@ -49,7 +48,6 @@ mod custom_type_tests {
4948
#[derive(CustomType)]
5049
#[rhai_type(skip, name = "MyFoo", extra = Self::build_extra)]
5150
pub struct Foo {
52-
#[cfg(not(feature = "no_float"))]
5351
#[rhai_type(skip)]
5452
_dummy: rhai::FLOAT,
5553
#[rhai_type(get = get_bar)]
@@ -100,7 +98,6 @@ mod custom_type_tests {
10098
#[derive(Clone, CustomType)]
10199
pub struct Bar(
102100
#[rhai_type(skip)]
103-
#[cfg(not(feature = "no_float"))]
104101
rhai::FLOAT,
105102
INT,
106103
/// boo comments.
@@ -143,7 +140,6 @@ mod custom_type_tests {
143140
#[derive(CustomType)]
144141
#[rhai_type(skip, name = "MyFoo", extra = Self::build_extra)]
145142
pub struct Foo {
146-
#[cfg(not(feature = "no_float"))]
147143
#[rhai_type(skip)]
148144
_dummy: rhai::FLOAT,
149145
#[rhai_type(get = get_bar)]

codegen/src/test/module.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,6 @@ mod generate_tests {
14701470
fn one_fn_with_cfg_module() {
14711471
let input_tokens: TokenStream = quote! {
14721472
pub mod one_fn {
1473-
#[cfg(not(feature = "no_float"))]
14741473
pub mod it_is {
14751474
pub fn increment(x: &mut FLOAT) {
14761475
*x += 1.0 as FLOAT;
@@ -1482,7 +1481,6 @@ mod generate_tests {
14821481
let expected_tokens = quote! {
14831482
#[allow(clippy::needless_pass_by_value, clippy::needless_pass_by_ref_mut)]
14841483
pub mod one_fn {
1485-
#[cfg(not(feature = "no_float"))]
14861484
#[allow(clippy::needless_pass_by_value, clippy::needless_pass_by_ref_mut)]
14871485
pub mod it_is {
14881486
pub fn increment(x: &mut FLOAT) {
@@ -1541,10 +1539,8 @@ mod generate_tests {
15411539
#[inline(always)]
15421540
pub fn rhai_generate_into_module(_m: &mut Module, _flatten: bool) {
15431541
if _flatten {
1544-
#[cfg(not(feature = "no_float"))]
15451542
self::it_is::rhai_generate_into_module(_m, _flatten);
15461543
} else {
1547-
#[cfg(not(feature = "no_float"))]
15481544
_m.set_sub_module("it_is", self::it_is::rhai_module_generate());
15491545
}
15501546
}

codegen/tests/test_custom_type.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ use rhai::{CustomType, Engine, TypeBuilder, INT};
44

55
#[derive(Clone, CustomType)]
66
pub struct Bar(
7-
#[rhai_type(skip)]
8-
#[cfg(not(feature = "no_float"))] // check other attributes
9-
rhai::FLOAT,
7+
#[rhai_type(skip)] rhai::FLOAT,
108
INT,
119
#[rhai_type(name = "boo", readonly)] String,
1210
Vec<INT>,
@@ -15,7 +13,6 @@ pub struct Bar(
1513
#[derive(Clone, Default, CustomType)]
1614
#[rhai_type(name = "MyFoo", extra = Self::build_extra)]
1715
pub struct Foo {
18-
#[cfg(not(feature = "no_float"))] // check other attributes
1916
#[rhai_type(skip)]
2017
_dummy: rhai::FLOAT,
2118
#[rhai_type(get = get_bar)]

codegen/ui_tests/rhai_mod_inner_cfg_false.stderr

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ note: found an item that was configured out
99
|
1010
12 | pub mod test_mod {
1111
| ^^^^^^^^
12-
= note: the item is gated behind the `unset_feature` feature
12+
note: the item is gated behind the `unset_feature` feature
13+
--> ui_tests/rhai_mod_inner_cfg_false.rs:11:11
14+
|
15+
11 | #[cfg(feature = "unset_feature")]
16+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
1317

1418
warning: unexpected `cfg` condition value: `unset_feature`
1519
--> ui_tests/rhai_mod_inner_cfg_false.rs:11:11

codegen/ui_tests/rhai_mod_unknown_type.stderr

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ help: a struct with a similar name exists
1111
|
1212
12 | pub fn test_fn(input: Point) -> bool {
1313
| ~~~~~
14-
help: consider importing one of these items
15-
|
16-
11 + use core::fmt::Pointer;
14+
help: consider importing this trait
1715
|
1816
11 + use std::fmt::Pointer;
1917
|

0 commit comments

Comments
 (0)