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
58e901b6fd1163172149fd422565523b17eed5f0
rust/tests/ui/rustc-error.rs

7 lines
110 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() {
rewrote error messages for #[rustc_error]
2019-11-05 22:42:23 +01:00
//~^ ERROR fatal error triggered by #[rustc_error]
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
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3997ms 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