Created
December 3, 2014 17:42
-
-
Save mnemnion/aa678124058a8ee4ab5d to your computer and use it in GitHub Desktop.
Constants aren't literal?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::fmt; | |
const FORMATTER: &'static str = "{}" ; | |
fn main() { | |
let x = 5i; | |
println! (FORMATTER, x); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Macro expansion happens before name resolution, so I think this would be pretty hard to fix :/