Skip to content

Make DRW an option instead of raw pointer #130

Make DRW an option instead of raw pointer

Make DRW an option instead of raw pointer #130

Triggered via pull request December 5, 2024 20:42
@ntBrentBre
opened #38
safer
Status Failure
Total duration 44s
Artifacts

check.yml

on: pull_request
nightly / fmt
11s
nightly / fmt
nightly / doc
34s
nightly / doc
Matrix: clippy
Fit to window
Zoom out
Zoom in

Annotations

55 errors and 3 warnings
creating a mutable reference to mutable static is discouraged: src/handlers.rs#L363
error: creating a mutable reference to mutable static is discouraged --> src/handlers.rs:363:29 | 363 | drw::resize(DRW.as_mut(), SW as c_uint, BH as c_uint); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L2065
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:2065:27 | 2065 | drw::cur_free(DRW.as_mut().unwrap(), cur); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1557
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1557:13 | 1557 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1553
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1553:27 | 1553 | drw::rect(DRW.as_mut(), x, 0, w as u32, BH as u32, 1, 1); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1550
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1550:21 | 1550 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1539
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1539:25 | 1539 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1528
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1528:21 | 1528 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1520
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1520:21 | 1520 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1506
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1506:13 | 1506 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1504
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1504:24 | 1504 | drw::setscheme(DRW.as_mut(), *SCHEME.add(Scheme::Norm as usize)); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1488
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1488:21 | 1488 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1476
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1476:17 | 1476 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1466
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1466:17 | 1466 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1439
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1439:17 | 1439 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1436
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1436:28 | 1436 | drw::setscheme(DRW.as_mut(), *SCHEME.add(Scheme::Norm as usize)); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a shared reference to mutable static is discouraged: src/main.rs#L1422
error: creating a shared reference to mutable static is discouraged --> src/main.rs:1422:22 | 1422 | let boxw = (*DRW.as_ref().unwrap().fonts).h / 6 + 2; | ^^^^^^^^^^^^ shared reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
creating a shared reference to mutable static is discouraged: src/main.rs#L1421
error: creating a shared reference to mutable static is discouraged --> src/main.rs:1421:22 | 1421 | let boxs = (*DRW.as_ref().unwrap().fonts).h / 9; | ^^^^^^^^^^^^ shared reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1413
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1413:36 | 1413 | unsafe { drw::fontset_getwidth(DRW.as_mut(), x) as c_int + LRPAD } | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1359
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1359:13 | 1359 | DRW.as_mut().unwrap().gc, | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1352
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1352:13 | 1352 | DRW.as_mut().unwrap().gc, | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L355
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:355:33 | 355 | drw::scm_create(DRW.as_mut(), &CONFIG.colors[i], 3); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L348
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:348:29 | 348 | drw::cur_create(DRW.as_mut(), XC_FLEUR as i32); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L346
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:346:29 | 346 | drw::cur_create(DRW.as_mut(), XC_SIZING as i32); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L344
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:344:29 | 344 | drw::cur_create(DRW.as_mut(), XC_LEFT_PTR as i32); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L289
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:289:16 | 289 | BH = (*DRW.as_mut().unwrap().fonts).h as i32 + 2; | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L288
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:288:19 | 288 | LRPAD = (*DRW.as_mut().unwrap().fonts).h as i32; | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L280
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:280:12 | 280 | if DRW | ____________^ 281 | | .as_mut() | |_____________________^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives = note: `-D static-mut-refs` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(static_mut_refs)]`
creating a mutable reference to mutable static is discouraged: src/handlers.rs#L363
error: creating a mutable reference to mutable static is discouraged --> src/handlers.rs:363:29 | 363 | drw::resize(DRW.as_mut(), SW as c_uint, BH as c_uint); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L2065
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:2065:27 | 2065 | drw::cur_free(DRW.as_mut().unwrap(), cur); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1557
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1557:13 | 1557 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1553
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1553:27 | 1553 | drw::rect(DRW.as_mut(), x, 0, w as u32, BH as u32, 1, 1); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1550
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1550:21 | 1550 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1539
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1539:25 | 1539 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1528
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1528:21 | 1528 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1520
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1520:21 | 1520 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1506
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1506:13 | 1506 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1504
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1504:24 | 1504 | drw::setscheme(DRW.as_mut(), *SCHEME.add(Scheme::Norm as usize)); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1488
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1488:21 | 1488 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1476
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1476:17 | 1476 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1466
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1466:17 | 1466 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1439
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1439:17 | 1439 | DRW.as_mut(), | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1436
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1436:28 | 1436 | drw::setscheme(DRW.as_mut(), *SCHEME.add(Scheme::Norm as usize)); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a shared reference to mutable static is discouraged: src/main.rs#L1422
error: creating a shared reference to mutable static is discouraged --> src/main.rs:1422:22 | 1422 | let boxw = (*DRW.as_ref().unwrap().fonts).h / 6 + 2; | ^^^^^^^^^^^^ shared reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
creating a shared reference to mutable static is discouraged: src/main.rs#L1421
error: creating a shared reference to mutable static is discouraged --> src/main.rs:1421:22 | 1421 | let boxs = (*DRW.as_ref().unwrap().fonts).h / 9; | ^^^^^^^^^^^^ shared reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1413
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1413:36 | 1413 | unsafe { drw::fontset_getwidth(DRW.as_mut(), x) as c_int + LRPAD } | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1359
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1359:13 | 1359 | DRW.as_mut().unwrap().gc, | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L1352
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:1352:13 | 1352 | DRW.as_mut().unwrap().gc, | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L355
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:355:33 | 355 | drw::scm_create(DRW.as_mut(), &CONFIG.colors[i], 3); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L348
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:348:29 | 348 | drw::cur_create(DRW.as_mut(), XC_FLEUR as i32); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L346
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:346:29 | 346 | drw::cur_create(DRW.as_mut(), XC_SIZING as i32); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L344
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:344:29 | 344 | drw::cur_create(DRW.as_mut(), XC_LEFT_PTR as i32); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L289
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:289:16 | 289 | BH = (*DRW.as_mut().unwrap().fonts).h as i32 + 2; | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L288
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:288:19 | 288 | LRPAD = (*DRW.as_mut().unwrap().fonts).h as i32; | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: src/main.rs#L280
error: creating a mutable reference to mutable static is discouraged --> src/main.rs:280:12 | 280 | if DRW | ____________^ 281 | | .as_mut() | |_____________________^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives = note: `-D static-mut-refs` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(static_mut_refs)]`
nightly / clippy
Clippy had exited with the 101 exit code
nightly / fmt
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
nightly / clippy
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
nightly / doc
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636