]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/const-fn-mismatch.rs
Auto merge of #35856 - phimuemue:master, r=brson
[rust.git] / src / test / compile-fail / const-fn-mismatch.rs
index d813cf32954e3349edcbfe5c1e21a7d3bb6af584..7ea72e23779ec5f40871851c233fc0a401aff4c8 100644 (file)
@@ -20,7 +20,9 @@ trait Foo {
 }
 
 impl Foo for u32 {
-    const fn f() -> u32 { 22 } //~ ERROR E0379
+    const fn f() -> u32 { 22 }
+    //~^ ERROR trait fns cannot be declared const
+    //~| NOTE trait fns cannot be const
 }
 
 fn main() { }