]> git.lizzy.rs Git - rust.git/blob - tests/ui/lang-items/issue-83471.rs
Rollup merge of #106106 - jyn514:remote-tracking-branch, r=Mark-Simulacrum
[rust.git] / tests / ui / lang-items / issue-83471.rs
1 // Regression test for the ICE reported in issue #83471.
2
3 #![crate_type="lib"]
4 #![feature(no_core)]
5 #![no_core]
6
7 #[lang = "sized"]
8 //~^ ERROR: language items are subject to change [E0658]
9 trait Sized {}
10
11 #[lang = "fn"]
12 //~^ ERROR: language items are subject to change [E0658]
13 //~| ERROR: `fn` language item must be applied to a trait with 1 generic argument
14 trait Fn {
15     fn call(export_name);
16     //~^ ERROR: expected type
17     //~| WARNING: anonymous parameters are deprecated
18     //~| WARNING: this is accepted in the current edition
19 }
20 fn call_through_fn_trait() {
21     a()
22     //~^ ERROR: cannot find function
23 }