This website requires JavaScript.
Explore
Help
Sign In
nordic-dev.net
/
rust
Watch
2
Star
0
Fork
0
You've already forked rust
mirror of
https://github.com/rust-lang/rust.git
synced
2024-10-30 05:51:58 +00:00
Code
Issues
Packages
Projects
Releases
Wiki
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-16 20:21:41 +00:00
#![
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 17:53:31 +00:00
#[
rustc_error
]
fn
main
(
)
{
//~^ ERROR compilation successful
}
Reference in New Issue
Copy Permalink