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?
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:
provides the error:
no method named 'as_bytes' found for type 'char' in the current scope.Is there any chance to solve this?