Skip to content

Proposal: get rid of nightly features in gstd #3524

@StackOverflowExcept1on

Description

@StackOverflowExcept1on

Problem to Solve

Do we need nightly features in gstd at all?

  1. Once we merge new allocations and set memory limits to 4GB  #3472, out of memory errors will become very rare, so there is no point in feature(alloc_error_handler)

  2. Regarding the feature(panic_info_message): core::panic::PanicInfo implements Display and will format the panic message: panicked at {file}:{line}:{column}:\n{msg}

    Current implementation of gstd uses custom format: '{msg}', {file}:{line}:{column}. Should we use #[feature(panic_info_message)] just to implement a custom format of panic message? I think we can parse the String in a standard format and convert it to a custom format instead of requiring nightly toolchain.

Possible Solution

  1. Convert the output of <core::panic::PanicInfo as Display> to our custom format.
    It's probably easy, but it's worth considering Rust <1.73:
    Change default panic handler message format. rust-lang/rust#112849

    Discussed:

    • debug feature: Display as is
    • no debug feature: get message from Display, w/o location
  2. Make our custom format obsolete

Notes

No response

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions