Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
453b51a65ab00939d2dce3de24ce38489b5c7eb6
rust/tests/ui/macros/bad-concat.rs

9 lines
176 B
Rust
Raw Normal View History

review comments: modify note wording and change `println` - Don't print the newline on its own to avoid the possibility of printing it out of order due to `stdout` locking. - Modify wording of `concat!()` with non-literals to not mislead into believing that only `&str` literals are accepted. - Add test for `concat!()` with non-literals.
2018-07-15 11:52:11 -07:00
fn main() {
let x: u32 = 42;
let y: f64 = 3.14;
let z = "foo";
let _ = concat!(x, y, z, "bar");
//~^ ERROR expected a literal
//~| NOTE only literals
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3319ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API