Point at unknown lang item attribute
This commit is contained in:
parent
3a39b2aa5a
commit
e6af9ebea2
5 changed files with 41 additions and 10 deletions
20
src/test/ui/unknown-language-item.rs
Normal file
20
src/test/ui/unknown-language-item.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unused)]
|
||||
#![feature(lang_items)]
|
||||
|
||||
#[lang = "foo"]
|
||||
fn bar() -> ! {
|
||||
//~^^ ERROR definition of an unknown language item: `foo`
|
||||
loop {}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
8
src/test/ui/unknown-language-item.stderr
Normal file
8
src/test/ui/unknown-language-item.stderr
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
error[E0522]: definition of an unknown language item: `foo`
|
||||
--> $DIR/unknown-language-item.rs:14:1
|
||||
|
|
||||
14 | #[lang = "foo"]
|
||||
| ^^^^^^^^^^^^^^^ definition of unknown language item `foo`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue