Skip to content

Commit 7945535

Browse files
committed
Update Rust lints
1 parent 0718cb5 commit 7945535

File tree

30 files changed

+90
-2
lines changed

30 files changed

+90
-2
lines changed

frb_codegen/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,6 @@ x86_64-pc-windows-msvc = { pkg-fmt = "zip" }
6969

7070
[features]
7171
default = ["anyhow/backtrace"]
72+
73+
[lints.rust]
74+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_codegen/assets/integration_template/shared/REPLACE_ME_RUST_CRATE_DIR/Cargo.toml.template

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ crate-type = ["cdylib", "staticlib"]
88

99
[dependencies]
1010
flutter_rust_bridge = REPLACE_ME_RUST_FRB_DEPENDENCY
11+
12+
[lints.rust]
13+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
# fake file
2+
3+
[lints.rust]
4+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
# fake file
2+
3+
[lints.rust]
4+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_codegen/test_fixtures/library/codegen/generator/api_dart/mod/functions/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ edition = "2018"
99
flutter_rust_bridge_macros.path = "../../../../../../../../frb_macros"
1010

1111
[workspace]
12+
13+
[lints.rust]
14+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_codegen/test_fixtures/library/codegen/generator/api_dart/mod/simple/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ edition = "2018"
88
[dependencies]
99

1010
[workspace]
11+
12+
[lints.rust]
13+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_codegen/test_fixtures/library/codegen/parser/mod/generics/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ edition = "2018"
88
[dependencies]
99

1010
[workspace]
11+
12+
[lints.rust]
13+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_codegen/test_fixtures/library/codegen/parser/mod/methods/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ edition = "2018"
88
[dependencies]
99

1010
[workspace]
11+
12+
[lints.rust]
13+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_codegen/test_fixtures/library/codegen/parser/mod/multi_input_file/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ edition = "2018"
88
[dependencies]
99

1010
[workspace]
11+
12+
[lints.rust]
13+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_codegen/test_fixtures/library/codegen/parser/mod/non_qualified_names/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ edition = "2018"
88
[dependencies]
99

1010
[workspace]
11+
12+
[lints.rust]
13+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_codegen/test_fixtures/library/codegen/parser/mod/qualified_names/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ edition = "2018"
88
[dependencies]
99

1010
[workspace]
11+
12+
[lints.rust]
13+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_codegen/test_fixtures/library/codegen/parser/mod/simple/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ edition = "2018"
88
[dependencies]
99

1010
[workspace]
11+
12+
[lints.rust]
13+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_codegen/test_fixtures/library/codegen/parser/mod/unused_struct_enum/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ edition = "2018"
88
[dependencies]
99

1010
[workspace]
11+
12+
[lints.rust]
13+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_codegen/test_fixtures/library/codegen/parser/mod/use_type_in_another_file/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ edition = "2018"
88
[dependencies]
99

1010
[workspace]
11+
12+
[lints.rust]
13+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_example/dart_build_rs/rust/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ log = "0.4.19"
1515
# Please use `flutter_rust_bridge_codegen = "2.x.x"` for your app (here we use `path` to depend on non-released version)
1616
flutter_rust_bridge_codegen = { path = "../../../frb_codegen" }
1717
anyhow = { version = "1.0.64", features = ["backtrace"] }
18+
19+
[lints.rust]
20+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_example/dart_minimal/rust/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ crate-type = ["cdylib"]
88

99
[dependencies]
1010
flutter_rust_bridge = { path = "../../../frb_rust" }
11+
12+
[lints.rust]
13+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_example/deliberate_bad/rust/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ crate-type = ["cdylib"]
1010
anyhow = { version = "1.0.64", features = ["backtrace"] }
1111
flutter_rust_bridge = { path = "../../../frb_rust" }
1212
log = "0.4.19"
13+
14+
[lints.rust]
15+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_example/flutter_package/rust/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ crate-type = ["cdylib", "staticlib"]
88

99
[dependencies]
1010
flutter_rust_bridge = { path = "../../../frb_rust" }
11+
12+
[lints.rust]
13+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_example/flutter_via_create/rust/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ crate-type = ["cdylib", "staticlib"]
88

99
[dependencies]
1010
flutter_rust_bridge = { path = "../../../frb_rust" }
11+
12+
[lints.rust]
13+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_example/flutter_via_integrate/rust/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ crate-type = ["cdylib", "staticlib"]
88

99
[dependencies]
1010
flutter_rust_bridge = { path = "../../../frb_rust" }
11+
12+
[lints.rust]
13+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_example/gallery/rust/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ anyhow = { version = "1.0.75", features = ["backtrace"] }
1212
num = "0.4"
1313
image = "0.24.3"
1414
crossbeam = "0.8"
15+
16+
[lints.rust]
17+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_example/integrate_third_party/rust/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ extend = "1.2.0"
1313
anyhow = "1.0.86"
1414
paste = "1.0.15"
1515
delegate-attr = "0.3.0"
16+
17+
[lints.rust]
18+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_example/pure_dart/rust/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,6 @@ protobuf = "=2.28.0" # Only used for comparison test
2525
tokio = { version = "1.34.0", features = ["rt"] }
2626

2727
[features]
28-
internal_feature_for_testing = []
28+
internal_feature_for_testing = []
29+
[lints.rust]
30+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_example/pure_dart/rust/example_external_lib/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ name = "frb_example_pure_dart_example_external_lib"
33
version = "0.1.0"
44

55
[dependencies]
6+
7+
[lints.rust]
8+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_example/pure_dart_pde/rust/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,6 @@ protobuf = "=2.28.0" # Only used for comparison test
2525
tokio = { version = "1.34.0", features = ["rt"] }
2626

2727
[features]
28-
internal_feature_for_testing = []
28+
internal_feature_for_testing = []
29+
[lints.rust]
30+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_example/pure_dart_pde/rust/example_external_lib/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ name = "frb_example_pure_dart_example_external_lib"
33
version = "0.1.0"
44

55
[dependencies]
6+
7+
[lints.rust]
8+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_example/rust_ui_counter/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ crate-type = ["cdylib", "staticlib"]
88

99
[dependencies]
1010
flutter_rust_bridge = { path = "../../frb_rust" }
11+
12+
[lints.rust]
13+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_example/rust_ui_todo_list/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ crate-type = ["cdylib", "staticlib"]
88

99
[dependencies]
1010
flutter_rust_bridge = { path = "../../frb_rust" }
11+
12+
[lints.rust]
13+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_macros/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ md-5 = "0.10.6"
1717

1818
[lib]
1919
proc-macro = true
20+
21+
[lints.rust]
22+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

frb_rust/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,6 @@ thread-pool = ["dep:threadpool"]
8383
user-utils = ["dep:android_logger", "dep:oslog"]
8484
uuid = ["dep:uuid", "allo-isolate/uuid"]
8585
wasm-start = ["console_error_panic_hook"]
86+
87+
[lints.rust]
88+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

0 commit comments

Comments
 (0)