Skip to content

Tracking Issue for Literal::byte_character #115268

Closed

Description

@Emilgardis

Feature gate: #![feature(proc_macro_byte_character)]

This is a tracking issue for Literal::byte_character, enabling the creation of a Literal with LitKind::Byte, representing b'a'.

Public API

impl Literal {
    pub fn byte_character(byte: u8) -> Literal;
}

Steps / History

Unresolved Questions

  • None yet.

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩

Activity

  1. added
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    T-libs-api[DEPRECATED; DO NOT USE]
    on Aug 27, 2023
  2. changed the title [-]Tracking Issue for XXX[/-] [+]Tracking Issue for `proc_macro_byte_character`[/+] on Aug 27, 2023
  3. changed the title [-]Tracking Issue for `proc_macro_byte_character`[/-] [+]Tracking Issue for `Literal::byte_character`[/+] on Aug 27, 2023
  4. added a commit that references this issue on Sep 23, 2023
  5. dtolnay commented on Mar 24, 2024

    @dtolnay
    Member

    @rust-lang/libs-api:
    @rfcbot fcp merge

    Previously available alternatives for forming a byte literal:

    • Literal::u8_suffixed(byte) constructs a literal like 97u8

    • format!("b'\\x{:02x}'", byte).parse::<Literal>().unwrap() constructs a literal like b'\x61'

    • format!("b'{}'", [byte].escape_ascii()).parse::<Literal>().unwrap() constructs a literal like b'a'

    This feature adds Literal::byte_character(byte) which is equivalent to the third alternative, as it is most often the one you want but is fairly challenging to come up with on your own.

  6. rfcbot commented on Mar 24, 2024

    @rfcbot

    Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members:

    No concerns currently listed.

    Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

    See this document for info about what commands tagged team members can give me.

  7. added
    proposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.
    disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.
    final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.
    on Mar 24, 2024
  8. rfcbot commented on Mar 24, 2024

    @rfcbot

    🔔 This is now entering its final comment period, as per the review above. 🔔

  9. removed
    proposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.
    on Mar 24, 2024
  10. added
    to-announceAnnounce this issue on triage meeting
    and removed
    final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.
    on Apr 3, 2024
  11. 4 remaining items

  12. added a commit that references this issue on Apr 6, 2024
  13. added a commit that references this issue on Jun 14, 2024
  14. added a commit that references this issue on Jun 14, 2024
  15. mdolberg commented on Jul 9, 2024

    @mdolberg

    just a reminder
    If you get these errors and you're running on nightly version
    channel = "nightly" in rust-toolchain.toml just type: rustup install nightly
    to make sure you have the latest corrected version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-api[DEPRECATED; DO NOT USE]disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions