Point at unknown lang item attribute

This commit is contained in:
Esteban Küber 2018-01-23 15:34:16 -08:00
parent 3a39b2aa5a
commit e6af9ebea2
5 changed files with 41 additions and 10 deletions

View 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() {}

View 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