Skip to content

Const Char #5

@Pspritechologist

Description

@Pspritechologist

Although the concat! macro seems to work fine on char literals (concat!('h', 'e', 'l', 'l', 'o')), it won't seem to accept a const char.
Example:

use constcat::concat;

const MARK: char = '?';
const QUESTION: &'static str = concat!("Why doesn't this work", MARK);

provides the error: no method named 'as_bytes' found for type 'char' in the current scope.

Is there any chance to solve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions