[INFO] fetching crate pudding-kernel 0.1.2... [INFO] linting pudding-kernel-0.1.2 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate pudding-kernel 0.1.2 into /workspace/builds/worker-5-tc1/source [INFO] started tweaking crates.io crate pudding-kernel 0.1.2 [INFO] finished tweaking crates.io crate pudding-kernel 0.1.2 [INFO] tweaked toml for crates.io crate pudding-kernel 0.1.2 written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate pudding-kernel 0.1.2 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 12 packages to latest compatible versions [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded pudding-pac v0.1.3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 38fbe064b08343c16e9c11a0f22380ba34afe0b6873f0493dba96fc5f0c1ffda [INFO] running `Command { std: "docker" "start" "-a" "38fbe064b08343c16e9c11a0f22380ba34afe0b6873f0493dba96fc5f0c1ffda", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "38fbe064b08343c16e9c11a0f22380ba34afe0b6873f0493dba96fc5f0c1ffda", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "38fbe064b08343c16e9c11a0f22380ba34afe0b6873f0493dba96fc5f0c1ffda", kill_on_drop: false }` [INFO] [stdout] 38fbe064b08343c16e9c11a0f22380ba34afe0b6873f0493dba96fc5f0c1ffda [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 765ca35169f9f90b32ca2af17c8fd797bbe9a7c148d204ec997b970113720018 [INFO] running `Command { std: "docker" "start" "-a" "765ca35169f9f90b32ca2af17c8fd797bbe9a7c148d204ec997b970113720018", kill_on_drop: false }` [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking bitflags v2.11.0 [INFO] [stderr] Compiling pudding-kernel v0.1.2 (/opt/rustwide/workdir) [INFO] [stderr] Checking pudding-pac v0.1.3 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking num v0.4.3 [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/semaphore.rs:15:13 [INFO] [stdout] | [INFO] [stdout] 15 | order: order, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `order` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/time.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | interval: interval, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `interval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/priority_queue.rs:209:17 [INFO] [stdout] | [INFO] [stdout] 209 | id: id, [INFO] [stdout] | ^^^^^^ help: replace it with: `id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/timeout_queue.rs:231:17 [INFO] [stdout] | [INFO] [stdout] 231 | id: id, [INFO] [stdout] | ^^^^^^ help: replace it with: `id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/semaphore.rs:15:13 [INFO] [stdout] | [INFO] [stdout] 15 | order: order, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `order` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/time.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | interval: interval, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `interval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Context` [INFO] [stdout] --> src/context/x86_64.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | / pub const fn new() -> Self { [INFO] [stdout] 24 | | Context { sp: 0 } [INFO] [stdout] 25 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 22 + impl Default for Context { [INFO] [stdout] 23 + fn default() -> Self { [INFO] [stdout] 24 + Self::new() [INFO] [stdout] 25 + } [INFO] [stdout] 26 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/context/x86_64.rs:34:54 [INFO] [stdout] | [INFO] [stdout] 34 | _kernel_context_create(self as *mut Context, isp as usize, entry, exinf); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `isp` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/interrupt.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub unsafe fn initialize(stack: &mut [u8]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] = note: `#[warn(clippy::missing_safety_doc)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/interrupt.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | pub unsafe extern "C" fn _kernel_interrupt_start() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/interrupt.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | pub unsafe extern "C" fn _kernel_interrupt_handler(intno: isize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/interrupt.rs:22:1 [INFO] [stdout] | [INFO] [stdout] 22 | pub unsafe extern "C" fn _kernel_interrupt_end() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/irc/dummy.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | pub unsafe fn interrupt_set_handler(_intno: IntNo, _handler: Option) {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/priority_queue.rs:125:18 [INFO] [stdout] | [INFO] [stdout] 125 | pub fn front<'a, 'b>(&'a mut self) -> Option<&'b mut OBJ> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 125 - pub fn front<'a, 'b>(&'a mut self) -> Option<&'b mut OBJ> { [INFO] [stdout] 125 + pub fn front<'b>(&mut self) -> Option<&'b mut OBJ> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/priority_queue.rs:135:22 [INFO] [stdout] | [INFO] [stdout] 135 | pub fn pop_front<'a, 'b>(&'a mut self) -> Option<&'b mut OBJ> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 135 - pub fn pop_front<'a, 'b>(&'a mut self) -> Option<&'b mut OBJ> { [INFO] [stdout] 135 + pub fn pop_front<'b>(&mut self) -> Option<&'b mut OBJ> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/timeout_queue.rs:150:17 [INFO] [stdout] | [INFO] [stdout] 150 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 149 - None => { [INFO] [stdout] 150 - return; [INFO] [stdout] 149 + None => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/timeout_queue.rs:205:19 [INFO] [stdout] | [INFO] [stdout] 205 | while !self.head.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `self.head.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/task.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | !task.timeout.prev.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `task.timeout.prev.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Task` [INFO] [stdout] --> src/task.rs:125:5 [INFO] [stdout] | [INFO] [stdout] 125 | / pub const fn new() -> Self { [INFO] [stdout] 126 | | Task { [INFO] [stdout] 127 | | context: Context::new(), [INFO] [stdout] 128 | | queue: None, [INFO] [stdout] ... | [INFO] [stdout] 137 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 123 + impl Default for Task { [INFO] [stdout] 124 + fn default() -> Self { [INFO] [stdout] 125 + Self::new() [INFO] [stdout] 126 + } [INFO] [stdout] 127 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/task.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | self.queue != None [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `self.queue.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/task.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | / match self.queue { [INFO] [stdout] 210 | | Some(mut que) => unsafe { [INFO] [stdout] 211 | | que.as_mut().remove(self); [INFO] [stdout] 212 | | }, [INFO] [stdout] 213 | | _ => {} [INFO] [stdout] 214 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 209 ~ if let Some(mut que) = self.queue { unsafe { [INFO] [stdout] 210 + que.as_mut().remove(self); [INFO] [stdout] 211 + } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/task.rs:223:12 [INFO] [stdout] | [INFO] [stdout] 223 | if !self.timeout.prev.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.timeout.prev.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/task.rs:240:12 [INFO] [stdout] | [INFO] [stdout] 240 | if self.queue == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.queue.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/eventflag.rs:42:17 [INFO] [stdout] | [INFO] [stdout] 42 | / if self.is_match_pattern() { [INFO] [stdout] 43 | | task.detach_from_queue(); [INFO] [stdout] 44 | | task.detach_from_timeout(); [INFO] [stdout] 45 | | task.attach_to_ready_queue(); [INFO] [stdout] 46 | | set_dispatch_reserve_flag(); [INFO] [stdout] 47 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 41 ~ Some(task) [INFO] [stdout] 42 ~ if self.is_match_pattern() => { [INFO] [stdout] 43 | task.detach_from_queue(); [INFO] [stdout] ... [INFO] [stdout] 46 | set_dispatch_reserve_flag(); [INFO] [stdout] 47 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/lib.rs:49:1 [INFO] [stdout] | [INFO] [stdout] 49 | pub unsafe fn initialize() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | / match DEBUG_PRINT { [INFO] [stdout] 67 | | Some(print) => { [INFO] [stdout] 68 | | print(str); [INFO] [stdout] ... | [INFO] [stdout] 71 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 66 ~ if let Some(print) = DEBUG_PRINT { [INFO] [stdout] 67 + print(str); [INFO] [stdout] 68 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/context.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | SYSTEM_CONTEXT.switch(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/context.rs:32:27 [INFO] [stdout] | [INFO] [stdout] 32 | CURRENT_CONTEXT = &mut SYSTEM_CONTEXT as *mut Context; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 32 | CURRENT_CONTEXT = &raw mut SYSTEM_CONTEXT as *mut Context; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/task.rs:30:18 [INFO] [stdout] | [INFO] [stdout] 30 | unsafe { READY_QUEUE.front() } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/task.rs:34:18 [INFO] [stdout] | [INFO] [stdout] 34 | unsafe { READY_QUEUE.pop_front() } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/task.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | READY_QUEUE.insert_priority_order(task); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/task.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | READY_QUEUE.remove(task); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/task.rs:50:60 [INFO] [stdout] | [INFO] [stdout] 50 | task.queue == Some(unsafe { NonNull::new_unchecked(&mut READY_QUEUE as *mut TaskQueue) }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 50 | task.queue == Some(unsafe { NonNull::new_unchecked(&raw mut READY_QUEUE as *mut TaskQueue) }) [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/task.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | TIME_QUEUE.sig_tim(tick); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/task.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | TIME_QUEUE.add(task, time); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/task.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | TIME_QUEUE.remove(task); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Context` [INFO] [stdout] --> src/context/x86_64.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | / pub const fn new() -> Self { [INFO] [stdout] 24 | | Context { sp: 0 } [INFO] [stdout] 25 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 22 + impl Default for Context { [INFO] [stdout] 23 + fn default() -> Self { [INFO] [stdout] 24 + Self::new() [INFO] [stdout] 25 + } [INFO] [stdout] 26 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/context/x86_64.rs:34:54 [INFO] [stdout] | [INFO] [stdout] 34 | _kernel_context_create(self as *mut Context, isp as usize, entry, exinf); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `isp` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/interrupt.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub unsafe fn initialize(stack: &mut [u8]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] = note: `#[warn(clippy::missing_safety_doc)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/interrupt.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | pub unsafe extern "C" fn _kernel_interrupt_start() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/interrupt.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | pub unsafe extern "C" fn _kernel_interrupt_handler(intno: isize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/interrupt.rs:22:1 [INFO] [stdout] | [INFO] [stdout] 22 | pub unsafe extern "C" fn _kernel_interrupt_end() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/irc/dummy.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | pub unsafe fn interrupt_set_handler(_intno: IntNo, _handler: Option) {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/priority_queue.rs:125:18 [INFO] [stdout] | [INFO] [stdout] 125 | pub fn front<'a, 'b>(&'a mut self) -> Option<&'b mut OBJ> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 125 - pub fn front<'a, 'b>(&'a mut self) -> Option<&'b mut OBJ> { [INFO] [stdout] 125 + pub fn front<'b>(&mut self) -> Option<&'b mut OBJ> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/priority_queue.rs:135:22 [INFO] [stdout] | [INFO] [stdout] 135 | pub fn pop_front<'a, 'b>(&'a mut self) -> Option<&'b mut OBJ> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 135 - pub fn pop_front<'a, 'b>(&'a mut self) -> Option<&'b mut OBJ> { [INFO] [stdout] 135 + pub fn pop_front<'b>(&mut self) -> Option<&'b mut OBJ> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/priority_queue.rs:256:13 [INFO] [stdout] | [INFO] [stdout] 256 | assert_eq!(t3.is_some(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 256 - assert_eq!(t3.is_some(), false); [INFO] [stdout] 256 + assert!(!t3.is_some()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/priority_queue.rs:270:13 [INFO] [stdout] | [INFO] [stdout] 270 | assert_eq!(t0.is_some(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 270 - assert_eq!(t0.is_some(), false); [INFO] [stdout] 270 + assert!(!t0.is_some()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/priority_queue.rs:284:13 [INFO] [stdout] | [INFO] [stdout] 284 | assert_eq!(t0.is_some(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 284 - assert_eq!(t0.is_some(), false); [INFO] [stdout] 284 + assert!(!t0.is_some()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/priority_queue.rs:303:13 [INFO] [stdout] | [INFO] [stdout] 303 | assert_eq!(t3.is_some(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 303 - assert_eq!(t3.is_some(), false); [INFO] [stdout] 303 + assert!(!t3.is_some()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/priority_queue.rs:322:13 [INFO] [stdout] | [INFO] [stdout] 322 | assert_eq!(t3.is_some(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 322 - assert_eq!(t3.is_some(), false); [INFO] [stdout] 322 + assert!(!t3.is_some()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/priority_queue.rs:340:13 [INFO] [stdout] | [INFO] [stdout] 340 | assert_eq!(t3.is_some(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 340 - assert_eq!(t3.is_some(), false); [INFO] [stdout] 340 + assert!(!t3.is_some()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/priority_queue.rs:358:13 [INFO] [stdout] | [INFO] [stdout] 358 | assert_eq!(t3.is_some(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 358 - assert_eq!(t3.is_some(), false); [INFO] [stdout] 358 + assert!(!t3.is_some()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/priority_queue.rs:381:13 [INFO] [stdout] | [INFO] [stdout] 381 | assert_eq!(t3.is_some(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 381 - assert_eq!(t3.is_some(), false); [INFO] [stdout] 381 + assert!(!t3.is_some()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/timeout_queue.rs:150:17 [INFO] [stdout] | [INFO] [stdout] 150 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 149 - None => { [INFO] [stdout] 150 - return; [INFO] [stdout] 149 + None => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/timeout_queue.rs:205:19 [INFO] [stdout] | [INFO] [stdout] 205 | while !self.head.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `self.head.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/task.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | !task.timeout.prev.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `task.timeout.prev.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Task` [INFO] [stdout] --> src/task.rs:125:5 [INFO] [stdout] | [INFO] [stdout] 125 | / pub const fn new() -> Self { [INFO] [stdout] 126 | | Task { [INFO] [stdout] 127 | | context: Context::new(), [INFO] [stdout] 128 | | queue: None, [INFO] [stdout] ... | [INFO] [stdout] 137 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 123 + impl Default for Task { [INFO] [stdout] 124 + fn default() -> Self { [INFO] [stdout] 125 + Self::new() [INFO] [stdout] 126 + } [INFO] [stdout] 127 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/task.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | self.queue != None [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `self.queue.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/task.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | / match self.queue { [INFO] [stdout] 210 | | Some(mut que) => unsafe { [INFO] [stdout] 211 | | que.as_mut().remove(self); [INFO] [stdout] 212 | | }, [INFO] [stdout] 213 | | _ => {} [INFO] [stdout] 214 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 209 ~ if let Some(mut que) = self.queue { unsafe { [INFO] [stdout] 210 + que.as_mut().remove(self); [INFO] [stdout] 211 + } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/task.rs:223:12 [INFO] [stdout] | [INFO] [stdout] 223 | if !self.timeout.prev.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.timeout.prev.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/task.rs:240:12 [INFO] [stdout] | [INFO] [stdout] 240 | if self.queue == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.queue.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/eventflag.rs:42:17 [INFO] [stdout] | [INFO] [stdout] 42 | / if self.is_match_pattern() { [INFO] [stdout] 43 | | task.detach_from_queue(); [INFO] [stdout] 44 | | task.detach_from_timeout(); [INFO] [stdout] 45 | | task.attach_to_ready_queue(); [INFO] [stdout] 46 | | set_dispatch_reserve_flag(); [INFO] [stdout] 47 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 41 ~ Some(task) [INFO] [stdout] 42 ~ if self.is_match_pattern() => { [INFO] [stdout] 43 | task.detach_from_queue(); [INFO] [stdout] ... [INFO] [stdout] 46 | set_dispatch_reserve_flag(); [INFO] [stdout] 47 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/lib.rs:49:1 [INFO] [stdout] | [INFO] [stdout] 49 | pub unsafe fn initialize() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | / match DEBUG_PRINT { [INFO] [stdout] 67 | | Some(print) => { [INFO] [stdout] 68 | | print(str); [INFO] [stdout] ... | [INFO] [stdout] 71 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 66 ~ if let Some(print) = DEBUG_PRINT { [INFO] [stdout] 67 + print(str); [INFO] [stdout] 68 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/context.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | SYSTEM_CONTEXT.switch(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/context.rs:32:27 [INFO] [stdout] | [INFO] [stdout] 32 | CURRENT_CONTEXT = &mut SYSTEM_CONTEXT as *mut Context; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 32 | CURRENT_CONTEXT = &raw mut SYSTEM_CONTEXT as *mut Context; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/priority_queue.rs:371:13 [INFO] [stdout] | [INFO] [stdout] 371 | QUE.push_back(&mut OBJ0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/priority_queue.rs:371:27 [INFO] [stdout] | [INFO] [stdout] 371 | QUE.push_back(&mut OBJ0); [INFO] [stdout] | ^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 371 | QUE.push_back(&raw mut OBJ0); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/priority_queue.rs:372:13 [INFO] [stdout] | [INFO] [stdout] 372 | QUE.push_back(&mut OBJ1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/priority_queue.rs:372:27 [INFO] [stdout] | [INFO] [stdout] 372 | QUE.push_back(&mut OBJ1); [INFO] [stdout] | ^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 372 | QUE.push_back(&raw mut OBJ1); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/priority_queue.rs:373:13 [INFO] [stdout] | [INFO] [stdout] 373 | QUE.push_back(&mut OBJ2); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/priority_queue.rs:373:27 [INFO] [stdout] | [INFO] [stdout] 373 | QUE.push_back(&mut OBJ2); [INFO] [stdout] | ^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 373 | QUE.push_back(&raw mut OBJ2); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/priority_queue.rs:374:22 [INFO] [stdout] | [INFO] [stdout] 374 | let t0 = QUE.pop_front(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/priority_queue.rs:375:22 [INFO] [stdout] | [INFO] [stdout] 375 | let t1 = QUE.pop_front(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/priority_queue.rs:376:22 [INFO] [stdout] | [INFO] [stdout] 376 | let t2 = QUE.pop_front(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/priority_queue.rs:377:22 [INFO] [stdout] | [INFO] [stdout] 377 | let t3 = QUE.pop_front(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/task.rs:30:18 [INFO] [stdout] | [INFO] [stdout] 30 | unsafe { READY_QUEUE.front() } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/task.rs:34:18 [INFO] [stdout] | [INFO] [stdout] 34 | unsafe { READY_QUEUE.pop_front() } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/task.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | READY_QUEUE.insert_priority_order(task); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/task.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | READY_QUEUE.remove(task); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/task.rs:50:60 [INFO] [stdout] | [INFO] [stdout] 50 | task.queue == Some(unsafe { NonNull::new_unchecked(&mut READY_QUEUE as *mut TaskQueue) }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 50 | task.queue == Some(unsafe { NonNull::new_unchecked(&raw mut READY_QUEUE as *mut TaskQueue) }) [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/task.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | TIME_QUEUE.sig_tim(tick); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/task.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | TIME_QUEUE.add(task, time); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/task.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | TIME_QUEUE.remove(task); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = 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 [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.95s [INFO] running `Command { std: "docker" "inspect" "765ca35169f9f90b32ca2af17c8fd797bbe9a7c148d204ec997b970113720018", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "765ca35169f9f90b32ca2af17c8fd797bbe9a7c148d204ec997b970113720018", kill_on_drop: false }` [INFO] [stdout] 765ca35169f9f90b32ca2af17c8fd797bbe9a7c148d204ec997b970113720018