]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/cross-crate-feature-disabled.rs
Auto merge of #86757 - JohnTitor:rollup-acevhz7, r=JohnTitor
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / cross-crate-feature-disabled.rs
1 // aux-build: cross-crate.rs
2 extern crate cross_crate;
3
4 use cross_crate::*;
5
6 fn non_const_context() {
7     NonConst.func();
8     Const.func();
9 }
10
11 const fn const_context() {
12     NonConst.func();
13     //~^ ERROR: calls in constant functions are limited to constant functions, tuple structs and tuple variants
14     Const.func();
15     //~^ ERROR: calls in constant functions are limited to constant functions, tuple structs and tuple variants
16 }
17
18 fn main() {}