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
fff3c25b85f7ea02f6512edbc441ab2742ea4268
rust/src/test/ui/rustc-error.rs

7 lines
93 B
Rust
Raw Normal View History

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 New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3976ms Template: 3ms
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