Skip to content

Commit

Permalink
Merge #3391
Browse files Browse the repository at this point in the history
3391: kernel: sched: mlfq r=hudson-ayers a=bradjc



### Pull Request Overview

I updated the Rust compiler to a February 2023 nightly, and encountered build errors. Specifically:

```
error: impl method assumes more implied bounds than the corresponding trait method
  --> kernel/src/scheduler/mlfq.rs:54:26
   |
54 |     fn next(&'a self) -> &'static ListLink<'a, MLFQProcessNode<'a>> {
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this type to make the impl signature compatible: `&'a ListLink<'a, MLFQProcessNode<'a>>`
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #105572 <rust-lang/rust#105572>
   = note: `#[deny(implied_bounds_entailment)]` on by default
```
This implements the proposed change.

We need to fix this before we will be able to update to a new nightly. However, this seemed perhaps more substantial that the typical fixes needed to update nightlies, so I thought it was worth making a dedicated PR.

### Testing Strategy

compiling


### TODO or Help Wanted

n/a


### Documentation Updated

- [x] Updated the relevant files in `/docs`, or no updates are required.

### Formatting

- [x] Ran `make prepush`.


Co-authored-by: Brad Campbell <bradjc5@gmail.com>
  • Loading branch information
bors[bot] and bradjc authored Feb 7, 2023
2 parents 8538bd6 + 7b0a7a9 commit fbc5ebe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/src/scheduler/mlfq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl<'a> MLFQProcessNode<'a> {
}

impl<'a> ListNode<'a, MLFQProcessNode<'a>> for MLFQProcessNode<'a> {
fn next(&'a self) -> &'static ListLink<'a, MLFQProcessNode<'a>> {
fn next(&'a self) -> &'a ListLink<'a, MLFQProcessNode<'a>> {
&self.next
}
}
Expand Down

0 comments on commit fbc5ebe

Please sign in to comment.