Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove const_fn_trait_bound feature and update nightly (Mar 2022) #2988

Merged
merged 4 commits into from
May 6, 2022

Conversation

bradjc
Copy link
Contributor

@bradjc bradjc commented Mar 8, 2022

Pull Request Overview

rust-lang/rust#93827 was merged, so there should soon be a nightly that allows us to remove const_fn_trait_bound feature. It seems like some of the tools we use aren't working right now, but this PR is a placeholder for when we can update to a new enough nightly.

After this, our list of features looks like:

arch/cortex-m/src/lib.rs:#![feature(asm_sym)]
arch/cortex-m/src/lib.rs:#![feature(naked_functions)]
arch/cortex-m0/src/lib.rs:#![feature(asm_sym, naked_functions)]
arch/cortex-m0p/src/lib.rs:#![feature(naked_functions)]
arch/rv32i/src/lib.rs:#![feature(asm_sym, naked_functions)]
boards/esp32-c3-devkitM-1/src/main.rs:#![feature(custom_test_frameworks)]
boards/nano_rp2040_connect/src/main.rs:#![feature(naked_functions)]
boards/opentitan/src/main.rs:#![feature(custom_test_frameworks)]
boards/pico_explorer_base/src/main.rs:#![feature(naked_functions)]
boards/raspberry_pi_pico/src/main.rs:#![feature(naked_functions)]
chips/earlgrey/src/lib.rs:#![feature(naked_functions)]
chips/esp32-c3/src/lib.rs:#![feature(naked_functions)]
chips/litex_vexriscv/src/lib.rs:#![feature(asm_const)]
chips/lowrisc/src/lib.rs:#![feature(const_mut_refs)]
chips/swervolf-eh1/src/lib.rs:#![feature(naked_functions)]
doc/courses/rustconf/application.md:#![feature(alloc)]
kernel/src/lib.rs:#![feature(core_intrinsics)]
libraries/riscv-csr/src/lib.rs:#![feature(asm_const)]
libraries/tock-cells/src/lib.rs:#![feature(const_mut_refs)]

Testing Strategy

travis

TODO or Help Wanted

Need a version of nightly with all valid tools.

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

@github-actions github-actions bot added kernel nrf Change pertains to the nRF5x family of MCUs. risc-v RISC-V architecture sam4l Change pertains to the SAM4L MCU. stm32 Change pertains to the stm32 family of MCUSs tock-libraries This affects libraries supported by the Tock project WG-OpenTitan In the purview of the OpenTitan working group. labels Mar 8, 2022
@bradjc bradjc mentioned this pull request Mar 8, 2022
29 tasks
@lschuermann
Copy link
Member

lschuermann commented Mar 8, 2022

Pretty cool.

Regarding the tock-registers changes: IIRC this removes all unstable features from the tock_registers crate, which has (a) been requested in #2982 and (b) should allow us to pretty painlessly extract this crate into it's own repository. I've been working on a strategy with @ppannuto on the latter, and would like to -- if possible -- include things such as a solution to #2941 before splitting it out and releasing a tock-registers 1.0. Thus I propose to, after this makes it in, release a tock-registers 0.9.1 with the feature removed as the sole change. It gives us a few more weeks to get in the final changes for 1.0, potentially in its own repository.

alistair23
alistair23 previously approved these changes Mar 8, 2022
Copy link
Contributor

@alistair23 alistair23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exciting!

@bradjc
Copy link
Contributor Author

bradjc commented Mar 16, 2022

I ran the script again, seems we are still waiting on rls to work again on nightly.

@bradjc
Copy link
Contributor Author

bradjc commented Mar 21, 2022

Hm, it's not clear to me if anyone is going to fix RLS on nightly. There has been an issue open for a month with no attention: rust-lang/rust#94284

The tracking issue for making rust-analyzer default hasn't been closed, but it seems to indicate the delay in the switchover is procedural and not technical rust-lang/rust-analyzer#4224.

Maybe we just drop RLS and see if anyone notices?

@hudson-ayers
Copy link
Contributor

I am not using RLS and am generally of the opinion that anyone who is would be better off switching to rust-analyzer at this point, so in support of letting it go.

@alistair23
Copy link
Contributor

Agreed!

@bradjc bradjc force-pushed the update-nightly-mar-2022 branch from 21a9ef1 to cadc8e5 Compare March 22, 2022 22:15
@bradjc bradjc marked this pull request as ready for review March 23, 2022 16:28
@bradjc bradjc force-pushed the update-nightly-mar-2022 branch from cc0e107 to 85c2e23 Compare March 23, 2022 16:30
alistair23
alistair23 previously approved these changes Mar 23, 2022
ppannuto
ppannuto previously approved these changes Mar 23, 2022
hudson-ayers
hudson-ayers previously approved these changes Mar 26, 2022
@hudson-ayers
Copy link
Contributor

bors r+

bors bot added a commit that referenced this pull request Apr 22, 2022
2988: Remove const_fn_trait_bound feature and update nightly (Mar 2022) r=hudson-ayers a=bradjc

### Pull Request Overview

rust-lang/rust#93827 was merged, so there should soon be a nightly that allows us to remove `const_fn_trait_bound` feature. It seems like some of the tools we use aren't working right now, but this PR is a placeholder for when we can update to a new enough nightly.


After this, our list of features looks like:

```
arch/cortex-m/src/lib.rs:#![feature(asm_sym)]
arch/cortex-m/src/lib.rs:#![feature(naked_functions)]
arch/cortex-m0/src/lib.rs:#![feature(asm_sym, naked_functions)]
arch/cortex-m0p/src/lib.rs:#![feature(naked_functions)]
arch/rv32i/src/lib.rs:#![feature(asm_sym, naked_functions)]
boards/esp32-c3-devkitM-1/src/main.rs:#![feature(custom_test_frameworks)]
boards/nano_rp2040_connect/src/main.rs:#![feature(naked_functions)]
boards/opentitan/src/main.rs:#![feature(custom_test_frameworks)]
boards/pico_explorer_base/src/main.rs:#![feature(naked_functions)]
boards/raspberry_pi_pico/src/main.rs:#![feature(naked_functions)]
chips/earlgrey/src/lib.rs:#![feature(naked_functions)]
chips/esp32-c3/src/lib.rs:#![feature(naked_functions)]
chips/litex_vexriscv/src/lib.rs:#![feature(asm_const)]
chips/lowrisc/src/lib.rs:#![feature(const_mut_refs)]
chips/swervolf-eh1/src/lib.rs:#![feature(naked_functions)]
doc/courses/rustconf/application.md:#![feature(alloc)]
kernel/src/lib.rs:#![feature(core_intrinsics)]
libraries/riscv-csr/src/lib.rs:#![feature(asm_const)]
libraries/tock-cells/src/lib.rs:#![feature(const_mut_refs)]
```

### Testing Strategy

travis


### TODO or Help Wanted

Need a version of nightly with all valid tools.


### Documentation Updated

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

### Formatting

- [x] Ran `make prepush`.


Co-authored-by: Brad Campbell <[email protected]>
@bors
Copy link
Contributor

bors bot commented Apr 22, 2022

Build failed:

bradjc and others added 4 commits May 6, 2022 16:48
Rust is switching to rust-analyzer and deprecating rls
(rust-lang/rust-analyzer#4224). On Feb 23,
2022, rls broke on nightly, and a month later it was still not fixed
(rust-lang/rust#94284). It seems there is no
longer interest in RLS, so we drop support for it so we can continue to
update nightlies.
rustdoc now warns about /// comments on extern blocks which apparently
don't do anything. easy fix: just make them // comments.

Co-authored-by: Leon Schuermann <[email protected]>
@lschuermann lschuermann dismissed stale reviews from hudson-ayers and ppannuto via 9b7678c May 6, 2022 14:56
@lschuermann
Copy link
Member

I've rebased this and fixed the additional doc comments. We probably shouldn't wait too long before merging to avoid collisions with other PRs.

@lschuermann lschuermann added the last-call Final review period for a pull request. label May 6, 2022
@lschuermann
Copy link
Member

Given we've already approved and tried to merge this previously, I'd say we just give it another go:

bors r+

@bors
Copy link
Contributor

bors bot commented May 6, 2022

@bors bors bot merged commit 6e9eed3 into master May 6, 2022
@bors bors bot deleted the update-nightly-mar-2022 branch May 6, 2022 20:09
ppannuto added a commit that referenced this pull request Aug 19, 2022
`tock-registers` now supports stable Rust!

There is a small breaking change, documented below, required to support
Rust 2021 edition. Most of the remaining changes are improvements to the
internal self-testing infrastructure and documentation. There are also
some additions to `FieldValue` to improve ergonomics.

**Breaking Changes**

 - #2842: tock-registers: rename TryFromValue::try_from to try_from_value
 - #2833: Update to Rust 2021 edition

Other Changes

 - #3126: [trivial] tock-registers: mark two methods as `const`
 - #3088: tock_registers/test_fields: respect struct size padding w/ alignment
 - #3072: Update Rust nightly version + Expose virtual-function-elimination
     - libraries/tock-register-interface: Fixup register_structs documentation
 - #2988: Remove const_fn_trait_bound feature and update nightly (Mar 2022)
 - #3014: tock-registers: Implement From field enum value type for FieldValue
 - #3013: tock-register-interface: Provide none method for FieldValue type
 - #2916: tock-register-interface: improve read_as_enum documentation
 - #2922: tock-register-interface: replace register tests by const assertions
ppannuto added a commit that referenced this pull request Aug 19, 2022
`tock-registers` now supports stable Rust!

There is a small breaking change, documented below, required to support
Rust 2021 edition. Most of the remaining changes are improvements to the
internal self-testing infrastructure and documentation. There are also
some additions to `FieldValue` to improve ergonomics.

**Breaking Changes**

 - #2842: tock-registers: rename TryFromValue::try_from to try_from_value
 - #2833: Update to Rust 2021 edition

Other Changes

 - #3126: [trivial] tock-registers: mark two methods as `const`
 - #3088: tock_registers/test_fields: respect struct size padding w/ alignment
 - #3072: Update Rust nightly version + Expose virtual-function-elimination
     - libraries/tock-register-interface: Fixup register_structs documentation
 - #2988: Remove const_fn_trait_bound feature and update nightly (Mar 2022)
 - #3014: tock-registers: Implement From field enum value type for FieldValue
 - #3013: tock-register-interface: Provide none method for FieldValue type
 - #2916: tock-register-interface: improve read_as_enum documentation
 - #2922: tock-register-interface: replace register tests by const assertions
@ppannuto ppannuto mentioned this pull request Aug 19, 2022
2 tasks
ppannuto added a commit that referenced this pull request Aug 19, 2022
`tock-registers` now supports stable Rust!

There is a small breaking change, documented below, required to support
Rust 2021 edition. Most of the remaining changes are improvements to the
internal self-testing infrastructure and documentation. There are also
some additions to `FieldValue` to improve ergonomics.

**Breaking Changes**

 - #2842: tock-registers: rename TryFromValue::try_from to try_from_value
 - #2838: Update to Rust 2021 edition

Other Changes

 - #3126: [trivial] tock-registers: mark two methods as `const`
 - #3088: tock_registers/test_fields: respect struct size padding w/ alignment
 - #3072: Update Rust nightly version + Expose virtual-function-elimination
     - libraries/tock-register-interface: Fixup register_structs documentation
 - #2988: Remove const_fn_trait_bound feature and update nightly (Mar 2022)
 - #3014: tock-registers: Implement From field enum value type for FieldValue
 - #3013: tock-register-interface: Provide none method for FieldValue type
 - #2916: tock-register-interface: improve read_as_enum documentation
 - #2922: tock-register-interface: replace register tests by const assertions
bors bot added a commit that referenced this pull request Aug 24, 2022
3151: tock-registers: release v0.8 r=lschuermann a=ppannuto

### Pull Request Overview

Prepare a v0.8 release of tock-registers.

Fixes #2982.

---

`tock-registers` now supports stable Rust!

There is a small breaking change, documented below, required to support
Rust 2021 edition. Most of the remaining changes are improvements to the
internal self-testing infrastructure and documentation. There are also
some additions to `FieldValue` to improve ergonomics.

**Breaking Changes**

 - #2842: tock-registers: rename TryFromValue::try_from to try_from_value
 - #2838: Update to Rust 2021 edition

Other Changes

 - #3126: [trivial] tock-registers: mark two methods as `const`
 - #3088: tock_registers/test_fields: respect struct size padding w/ alignment
 - #3072: Update Rust nightly version + Expose virtual-function-elimination
     - libraries/tock-register-interface: Fixup register_structs documentation
 - #2988: Remove const_fn_trait_bound feature and update nightly (Mar 2022)
 - #3014: tock-registers: Implement From field enum value type for FieldValue
 - #3013: tock-register-interface: Provide none method for FieldValue type
 - #2916: tock-register-interface: improve read_as_enum documentation
 - #2922: tock-register-interface: replace register tests by const assertions

### Testing Strategy

N/A

### TODO or Help Wanted

N/A

### Documentation Updated

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

### Formatting

- [ ] Ran `make prepush`.


Co-authored-by: Pat Pannuto <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel last-call Final review period for a pull request. nrf Change pertains to the nRF5x family of MCUs. risc-v RISC-V architecture sam4l Change pertains to the SAM4L MCU. stm32 Change pertains to the stm32 family of MCUSs tock-libraries This affects libraries supported by the Tock project WG-OpenTitan In the purview of the OpenTitan working group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants