This website requires JavaScript.
Explore
Help
Sign in
bjoernager
/
rust
Watch
1
Fork
You've already forked rust
0
Code
Issues
Pull requests
Activity
fff3c25b85
rust
/
src
/
test
/
ui
/
rustc-error.rs
7 lines
93 B
Rust
Raw
Normal View
History
Unescape
Escape
Fix tests for rustc_*
2015-02-17 01:51:41 +05:30
#![
feature(rustc_attrs)
]
Add `#[rustc_error]` annotation, which causes trans to signal an error if found on the `main()` function. This lets you write tests that live in `compile-fail` but are expected to compile successfully. This is handy when you have many small variations on a theme that you want to keep together, and you are just testing the type checker, not the runtime semantics.
2015-02-12 12:53:31 -05:00
#[
rustc_error
]
fn
main
(
)
{
//~^ ERROR compilation successful
}
Reference in a new issue
Copy permalink