Skip to content

Commit ece66c4

Browse files
committed
Remove unstable feature flag
1 parent 66b4a86 commit ece66c4

6 files changed

Lines changed: 20 additions & 21 deletions

File tree

.github/workflows/main.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ jobs:
2727
- name: Build ${{ matrix.lua }} vendored
2828
run: |
2929
cargo build --features "${{ matrix.lua }},vendored"
30-
cargo build --features "${{ matrix.lua }},vendored,async,send,serialize,macros,unstable"
30+
cargo build --features "${{ matrix.lua }},vendored,async,serialize,macros"
31+
cargo build --features "${{ matrix.lua }},vendored,async,serialize,macros,send"
3132
shell: bash
3233
- name: Build ${{ matrix.lua }} pkg-config
3334
if: ${{ matrix.os == 'ubuntu-22.04' }}
@@ -50,7 +51,7 @@ jobs:
5051
toolchain: stable
5152
target: aarch64-apple-darwin
5253
- name: Cross-compile
53-
run: cargo build --target aarch64-apple-darwin --features "${{ matrix.lua }},vendored,async,send,serialize,macros,unstable"
54+
run: cargo build --target aarch64-apple-darwin --features "${{ matrix.lua }},vendored,async,send,serialize,macros"
5455

5556
build_aarch64_cross_ubuntu:
5657
name: Cross-compile to aarch64-unknown-linux-gnu
@@ -71,7 +72,7 @@ jobs:
7172
sudo apt-get install -y --no-install-recommends gcc-aarch64-linux-gnu libc6-dev-arm64-cross
7273
shell: bash
7374
- name: Cross-compile
74-
run: cargo build --target aarch64-unknown-linux-gnu --features "${{ matrix.lua }},vendored,async,send,serialize,macros,unstable"
75+
run: cargo build --target aarch64-unknown-linux-gnu --features "${{ matrix.lua }},vendored,async,send,serialize,macros"
7576
shell: bash
7677

7778
build_armv7_cross_ubuntu:
@@ -93,7 +94,7 @@ jobs:
9394
sudo apt-get install -y --no-install-recommends gcc-arm-linux-gnueabihf libc-dev-armhf-cross
9495
shell: bash
9596
- name: Cross-compile
96-
run: cargo build --target armv7-unknown-linux-gnueabihf --features "${{ matrix.lua }},vendored,async,send,serialize,macros,unstable"
97+
run: cargo build --target armv7-unknown-linux-gnueabihf --features "${{ matrix.lua }},vendored,async,send,serialize,macros"
9798
shell: bash
9899

99100
test:
@@ -122,14 +123,14 @@ jobs:
122123
- name: Run ${{ matrix.lua }} tests
123124
run: |
124125
cargo test --features "${{ matrix.lua }},vendored"
125-
cargo test --features "${{ matrix.lua }},vendored,async,send,serialize,macros"
126-
cargo test --features "${{ matrix.lua }},vendored,async,serialize,macros,unstable"
126+
cargo test --features "${{ matrix.lua }},vendored,async,serialize,macros"
127+
cargo test --features "${{ matrix.lua }},vendored,async,serialize,macros,send"
127128
shell: bash
128129
- name: Run compile tests (macos lua54)
129130
if: ${{ matrix.os == 'macos-latest' && matrix.lua == 'lua54' }}
130131
run: |
131132
TRYBUILD=overwrite cargo test --features "${{ matrix.lua }},vendored" -- --ignored
132-
TRYBUILD=overwrite cargo test --features "${{ matrix.lua }},vendored,async,send,serialize,macros,unstable" -- --ignored
133+
TRYBUILD=overwrite cargo test --features "${{ matrix.lua }},vendored,async,send,serialize,macros" -- --ignored
133134
shell: bash
134135

135136
test_with_sanitizer:
@@ -153,7 +154,8 @@ jobs:
153154
- uses: Swatinem/rust-cache@v2
154155
- name: Run ${{ matrix.lua }} tests with address sanitizer
155156
run: |
156-
cargo test --tests --features "${{ matrix.lua }},vendored,async,send,serialize,macros,unstable" --target x86_64-unknown-linux-gnu -- --skip test_too_many_recursions
157+
cargo test --tests --features "${{ matrix.lua }},vendored,async,serialize,macros" --target x86_64-unknown-linux-gnu -- --skip test_too_many_recursions
158+
cargo test --tests --features "${{ matrix.lua }},vendored,async,serialize,macros,send" --target x86_64-unknown-linux-gnu -- --skip test_too_many_recursions
157159
shell: bash
158160
env:
159161
RUSTFLAGS: -Z sanitizer=address
@@ -226,8 +228,7 @@ jobs:
226228
- name: Run ${{ matrix.lua }} tests
227229
run: |
228230
cargo test --tests --features "${{ matrix.lua }},vendored"
229-
cargo test --tests --features "${{ matrix.lua }},vendored,async,send,serialize,macros"
230-
cargo test --tests --features "${{ matrix.lua }},vendored,async,serialize,macros,unstable"
231+
cargo test --tests --features "${{ matrix.lua }},vendored,async,serialize,macros"
231232
232233
rustfmt:
233234
name: Rustfmt
@@ -254,4 +255,4 @@ jobs:
254255
- uses: giraffate/clippy-action@v1
255256
with:
256257
reporter: 'github-pr-review'
257-
clippy_flags: --features "${{ matrix.lua }},vendored,async,send,serialize,macros,unstable"
258+
clippy_flags: --features "${{ matrix.lua }},vendored,async,send,serialize,macros"

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ with async/await features and support of writing native Lua modules in Rust.
1616
"""
1717

1818
[package.metadata.docs.rs]
19-
features = ["lua54", "vendored", "async", "send", "serialize", "macros", "unstable"]
19+
features = ["lua54", "vendored", "async", "send", "serialize", "macros"]
2020
rustdoc-args = ["--cfg", "docsrs"]
2121

2222
[workspace]
@@ -41,7 +41,6 @@ async = ["dep:futures-util"]
4141
send = ["parking_lot/send_guard"]
4242
serialize = ["dep:serde", "dep:erased-serde", "dep:serde-value"]
4343
macros = ["mlua_derive/macros"]
44-
unstable = []
4544

4645
[dependencies]
4746
mlua_derive = { version = "=0.9.3", optional = true, path = "mlua_derive" }

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ Below is a list of the available feature flags. By default `mlua` does not enabl
5454
* `serialize`: add serialization and deserialization support to `mlua` types using [serde] framework
5555
* `macros`: enable procedural macros (such as `chunk!`)
5656
* `parking_lot`: support UserData types wrapped in [parking_lot]'s primitives (`Arc<Mutex>` and `Arc<RwLock>`)
57-
* `unstable`: enable **unstable** features. The public API of these features may break between releases.
5857

5958
[5.4]: https://www.lua.org/manual/5.4/manual.html
6059
[5.3]: https://www.lua.org/manual/5.3/manual.html

src/state.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,12 +1292,12 @@ impl Lua {
12921292
}
12931293

12941294
/// Sets the metatable for a Luau builtin vector type.
1295-
#[cfg(any(all(feature = "luau", feature = "unstable"), doc))]
1296-
#[cfg_attr(docsrs, doc(cfg(all(feature = "luau", feature = "unstable"))))]
1295+
#[cfg(any(feature = "luau", doc))]
1296+
#[cfg_attr(docsrs, doc(cfg(feature = "luau")))]
12971297
pub fn set_vector_metatable(&self, metatable: Option<Table>) {
12981298
let lua = self.lock();
1299+
let state = lua.state();
12991300
unsafe {
1300-
let state = lua.state();
13011301
let _sg = StackGuard::new(state);
13021302
assert_stack(state, 2);
13031303

tarpaulin.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[lua54_coverage]
2-
features = "lua54,vendored,async,serialize,macros,unstable"
2+
features = "lua54,vendored,async,serialize,macros"
33

44
[lua51_coverage]
5-
features = "lua51,vendored,async,serialize,macros,unstable"
5+
features = "lua51,vendored,async,serialize,macros"
66

77
[luau_coverage]
8-
features = "luau,async,serialize,macros,unstable"
8+
features = "luau,async,serialize,macros"

tests/luau.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ fn test_vectors() -> Result<()> {
173173
Ok(())
174174
}
175175

176-
#[cfg(all(not(feature = "luau-vector4"), feature = "unstable"))]
176+
#[cfg(not(feature = "luau-vector4"))]
177177
#[test]
178178
fn test_vector_metatable() -> Result<()> {
179179
let lua = Lua::new();

0 commit comments

Comments
 (0)