]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/issue-79450.rs
Rollup merge of #99244 - gthb:doc-improve-iterator-scan, r=m-ou-se
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / issue-79450.rs
1 #![feature(const_fmt_arguments_new)]
2 #![feature(const_trait_impl)]
3
4 #[const_trait]
5 trait Tr {
6     fn req(&self);
7
8     fn prov(&self) {
9         println!("lul"); //~ ERROR: cannot call non-const fn `_print` in constant functions
10         self.req();
11     }
12 }
13
14 struct S;
15
16 impl const Tr for S {
17     fn req(&self) {}
18 }
19
20 fn main() {}