]> git.proxmox.com Git - rustc.git/blob - src/test/ui/rfc-2632-const-trait-impl/staged-api-user-crate.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / rfc-2632-const-trait-impl / staged-api-user-crate.rs
1 // aux-build: staged-api.rs
2 extern crate staged_api;
3
4 use staged_api::*;
5
6 // Const stability has no impact on usage in non-const contexts.
7 fn non_const_context() {
8 Unstable::func();
9 }
10
11 const fn stable_const_context() {
12 Unstable::func();
13 //~^ ERROR cannot call non-const fn `<staged_api::Unstable as staged_api::MyTrait>::func` in constant functions
14 }
15
16 fn main() {}