Skip to content

Conversation

josephlr
Copy link
Contributor

This removes Add/AddAssign/Sub/SubAssign with usize from
VirtAddr and PhysAddr (which are always 64-bit, even on 32-bit
platforms). This makes it possible to write code like:

let addr1 = PhysAddr::new(0x52);
let addr2 = addr1 + 3;

without getting a "multiple impls" compiler error.

This is essentially the breaking change mentioned in
#293 (comment)

Signed-off-by: Joe Richey [email protected]

@josephlr josephlr requested review from phil-opp and Freax13 March 28, 2022 07:56
@josephlr josephlr mentioned this pull request Mar 28, 2022
13 tasks
This removes `Add`/`AddAssign`/`Sub`/`SubAssign` with `usize` from
`VirtAddr` and `PhysAddr` (which are always 64-bit, even on 32-bit
platforms). This makes it possible to write code like:

```rust
let addr1 = PhysAddr::new(0x52);
let addr2 = addr1 + 3;
```

without getting a "multiple `impl`s" compiler error.

This is essentially the breaking change mentioned in
#293 (comment)

Signed-off-by: Joe Richey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants