You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use std::*;fnmain(){println(fmt!("%s","hello world"));}
This innocent-looking hello world program emits a zillion horrible errors. Using error!() or fail!() is not pretty either.
horrible.rs:4:23: 4:30 error: unresolved import: could not find `unstable` in `std::std`.
horrible.rs:4 println(fmt!("%s", "hello"));
^~~~~~~
note: in expansion of fmt!
horrible.rs:4:12: 4:32 note: expansion site
horrible.rs:4:23: 4:30 error: use of undeclared module `::std::unstable::extfmt::rt`
horrible.rs:4 println(fmt!("%s", "hello"));
^~~~~~~
note: in expansion of fmt!
horrible.rs:4:12: 4:32 note: expansion site
horrible.rs:4:23: 4:30 error: `std::unstable::extfmt::rt::Conv` does not name a structure
horrible.rs:4 println(fmt!("%s", "hello"));
^~~~~~~
note: in expansion of fmt!
horrible.rs:4:12: 4:32 note: expansion site
horrible.rs:4:23: 4:30 error: unresolved import: could not find `unstable` in `std::std`.
horrible.rs:4 println(fmt!("%s", "hello"));
^~~~~~~
note: in expansion of fmt!
horrible.rs:4:12: 4:32 note: expansion site
horrible.rs:4:23: 4:30 error: use of undeclared module `::std::unstable::extfmt::rt`
horrible.rs:4 println(fmt!("%s", "hello"));
^~~~~~~
note: in expansion of fmt!
horrible.rs:4:12: 4:32 note: expansion site
horrible.rs:4:23: 4:30 error: unresolved name `std::unstable::extfmt::rt::flag_none`.
horrible.rs:4 println(fmt!("%s", "hello"));
^~~~~~~
note: in expansion of fmt!
horrible.rs:4:12: 4:32 note: expansion site
horrible.rs:4:23: 4:30 error: unresolved import: could not find `unstable` in `std::std`.
horrible.rs:4 println(fmt!("%s", "hello"));
^~~~~~~
note: in expansion of fmt!
horrible.rs:4:12: 4:32 note: expansion site
horrible.rs:4:23: 4:30 error: use of undeclared module `::std::unstable::extfmt::rt`
horrible.rs:4 println(fmt!("%s", "hello"));
^~~~~~~
note: in expansion of fmt!
horrible.rs:4:12: 4:32 note: expansion site
horrible.rs:4:23: 4:30 error: unresolved name `std::unstable::extfmt::rt::CountImplied`.
horrible.rs:4 println(fmt!("%s", "hello"));
^~~~~~~
note: in expansion of fmt!
horrible.rs:4:12: 4:32 note: expansion site
horrible.rs:4:23: 4:30 error: unresolved import: could not find `unstable` in `std::std`.
horrible.rs:4 println(fmt!("%s", "hello"));
^~~~~~~
note: in expansion of fmt!
horrible.rs:4:12: 4:32 note: expansion site
horrible.rs:4:23: 4:30 error: use of undeclared module `::std::unstable::extfmt::rt`
horrible.rs:4 println(fmt!("%s", "hello"));
^~~~~~~
note: in expansion of fmt!
horrible.rs:4:12: 4:32 note: expansion site
horrible.rs:4:23: 4:30 error: unresolved name `std::unstable::extfmt::rt::CountImplied`.
horrible.rs:4 println(fmt!("%s", "hello"));
^~~~~~~
note: in expansion of fmt!
horrible.rs:4:12: 4:32 note: expansion site
horrible.rs:4:23: 4:30 error: unresolved import: could not find `unstable` in `std::std`.
horrible.rs:4 println(fmt!("%s", "hello"));
^~~~~~~
note: in expansion of fmt!
horrible.rs:4:12: 4:32 note: expansion site
horrible.rs:4:23: 4:30 error: use of undeclared module `::std::unstable::extfmt::rt`
horrible.rs:4 println(fmt!("%s", "hello"));
^~~~~~~
note: in expansion of fmt!
horrible.rs:4:12: 4:32 note: expansion site
horrible.rs:4:23: 4:30 error: unresolved name `std::unstable::extfmt::rt::TyDefault`.
horrible.rs:4 println(fmt!("%s", "hello"));
^~~~~~~
note: in expansion of fmt!
horrible.rs:4:12: 4:32 note: expansion site
horrible.rs:4:23: 4:30 error: unresolved import: could not find `unstable` in `std::std`.
horrible.rs:4 println(fmt!("%s", "hello"));
^~~~~~~
note: in expansion of fmt!
horrible.rs:4:12: 4:32 note: expansion site
horrible.rs:4:23: 4:30 error: use of undeclared module `::std::unstable::extfmt::rt`
horrible.rs:4 println(fmt!("%s", "hello"));
^~~~~~~
note: in expansion of fmt!
horrible.rs:4:12: 4:32 note: expansion site
horrible.rs:4:23: 4:30 error: unresolved name `std::unstable::extfmt::rt::conv_str`.
horrible.rs:4 println(fmt!("%s", "hello"));
^~~~~~~
note: in expansion of fmt!
horrible.rs:4:12: 4:32 note: expansion site
error: aborting due to 18 previous errors
The text was updated successfully, but these errors were encountered:
…anishearth
Warn on structs with a trailing zero-sized array but no `repr` attribute
Closesrust-lang#2868
changelog: Implement ``[`trailing_empty_array`]``, which warns if a struct is defined where the last field is a zero-sized array but there are no `repr` attributes. Zero-sized arrays aren't very useful in Rust itself, so such a struct is likely being created to pass to C code or in some other situation where control over memory layout matters. Either way, a `repr` attribute is needed.
This innocent-looking hello world program emits a zillion horrible errors. Using
error!()
orfail!()
is not pretty either.The text was updated successfully, but these errors were encountered: