Skip to content

Commit bcb2a51

Browse files
committed
add lints.rust unexpected_cfgs to basic examples
1 parent 552eb63 commit bcb2a51

File tree

32 files changed

+530
-144
lines changed

32 files changed

+530
-144
lines changed

basics/account-data/native/program/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ borsh-derive.workspace = true
99
solana-program.workspace = true
1010
solana-system-interface.workspace = true
1111

12+
[lib]
13+
crate-type = ["cdylib", "lib"]
14+
1215
[features]
1316
anchor-debug = []
1417
custom-heap = []
1518
custom-panic = []
1619

17-
18-
[lib]
19-
crate-type = ["cdylib", "lib"]
20-
2120
[lints.rust]
2221
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }

basics/checking-accounts/anchor/programs/anchor-program-example/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ no-entrypoint = []
1515
no-idl = []
1616
no-log-ix-name = []
1717
idl-build = ["anchor-lang/idl-build"]
18+
anchor-debug = []
19+
custom-heap = []
20+
custom-panic = []
1821

1922
[dependencies]
2023
anchor-lang = "0.32.1"
24+
25+
[lints.rust]
26+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }

basics/checking-accounts/native/program/Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,12 @@ solana-system-interface.workspace = true
99

1010
[lib]
1111
crate-type = ["cdylib", "lib"]
12+
13+
[features]
14+
anchor-debug = []
15+
custom-heap = []
16+
custom-panic = []
17+
18+
19+
[lints.rust]
20+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }

basics/close-account/anchor/programs/close-account/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ no-entrypoint = []
1515
no-idl = []
1616
no-log-ix-name = []
1717
idl-build = ["anchor-lang/idl-build"]
18+
anchor-debug = []
19+
custom-heap = []
20+
custom-panic = []
1821

1922
[dependencies]
2023
anchor-lang = "0.32.1"
24+
25+
[lints.rust]
26+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }

basics/close-account/native/program/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@ solana-system-interface.workspace = true
1111

1212
[lib]
1313
crate-type = ["cdylib", "lib"]
14+
15+
[features]
16+
anchor-debug = []
17+
custom-heap = []
18+
custom-panic = []
19+
20+
[lints.rust]
21+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }

basics/counter/anchor/programs/counter_anchor/Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ no-entrypoint = []
1515
no-idl = []
1616
no-log-ix-name = []
1717
idl-build = ["anchor-lang/idl-build"]
18+
anchor-debug = []
19+
custom-heap = []
20+
custom-panic = []
1821

1922
[dependencies]
20-
anchor-lang = "0.32.1"
23+
anchor-lang = "0.32.1"
24+
25+
[lints.rust]
26+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }

basics/counter/mpl-stack/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@ crate-type = ["cdylib", "lib"]
1010
no-entrypoint = []
1111
cpi = ["no-entrypoint"]
1212
default = []
13+
anchor-debug = []
14+
custom-heap = []
15+
custom-panic = []
1316

1417
[dependencies]
1518
borsh = "0.9"
1619
shank = "0.0.8"
1720
solana-program = "2.1"
21+
22+
[lints.rust]
23+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }

basics/counter/native/program/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@ crate-type = ["cdylib", "lib"]
1010
no-entrypoint = []
1111
cpi = ["no-entrypoint"]
1212
default = []
13+
anchor-debug = []
14+
custom-heap = []
15+
custom-panic = []
1316

1417
[dependencies]
1518
borsh.workspace = true
1619
borsh-derive.workspace = true
1720
solana-program.workspace = true
21+
22+
[lints.rust]
23+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }

basics/create-account/anchor/programs/create-system-account/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ no-entrypoint = []
1515
no-idl = []
1616
no-log-ix-name = []
1717
idl-build = ["anchor-lang/idl-build"]
18+
anchor-debug = []
19+
custom-heap = []
20+
custom-panic = []
1821

1922
[dependencies]
2023
anchor-lang = "0.32.1"
24+
25+
[lints.rust]
26+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }

basics/create-account/native/program/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,11 @@ solana-system-interface.workspace = true
99

1010
[lib]
1111
crate-type = ["cdylib", "lib"]
12+
13+
[features]
14+
anchor-debug = []
15+
custom-heap = []
16+
custom-panic = []
17+
18+
[lints.rust]
19+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }

0 commit comments

Comments
 (0)