]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/cross-crate.rs
Move `{core,std}::stream::Stream` to `{core,std}::async_iter::AsyncIterator`.
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / cross-crate.rs
1 // revisions: stock gated
2 #![cfg_attr(gated, feature(const_trait_impl))]
3
4 // aux-build: cross-crate.rs
5 extern crate cross_crate;
6
7 use cross_crate::*;
8
9 fn non_const_context() {
10     NonConst.func();
11     Const.func();
12 }
13
14 const fn const_context() {
15     NonConst.func();
16     //~^ ERROR: calls in constant functions are limited to constant functions, tuple structs and tuple variants
17     Const.func();
18     //[stock]~^ ERROR: calls in constant functions are limited to constant functions, tuple structs and tuple variants
19 }
20
21 fn main() {}