]> git.lizzy.rs Git - rust.git/commitdiff
Make `min_const_fn` `impl Trait` test into a gate test
authorDylan MacKenzie <ecstaticmorse@gmail.com>
Fri, 2 Oct 2020 21:57:12 +0000 (14:57 -0700)
committerDylan MacKenzie <ecstaticmorse@gmail.com>
Tue, 6 Oct 2020 02:57:27 +0000 (19:57 -0700)
src/test/ui/consts/min_const_fn/min_const_fn_impl_trait.rs
src/test/ui/consts/min_const_fn/min_const_fn_impl_trait.stderr

index 7c64d5522c406dd50ff93e7624d9aeb88364a8fa..a8642d18b56c7c1fc9767923c6306136267f2992 100644 (file)
@@ -1,3 +1,5 @@
+// gate-test-const_fn_impl_trait
+
 struct AlanTuring<T>(T);
 const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> { //~ `impl Trait`
     AlanTuring(0)
index 7229e007f40da6f4aba5d4d9661b4c37596dc81e..1a49b59733d6fca4cd03866cbe7257faf5be04b9 100644 (file)
@@ -1,5 +1,5 @@
 error[E0658]: `impl Trait` is not allowed in constant functions
-  --> $DIR/min_const_fn_impl_trait.rs:2:24
+  --> $DIR/min_const_fn_impl_trait.rs:4:24
    |
 LL | const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> {
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> {
    = help: add `#![feature(const_fn_impl_trait)]` to the crate attributes to enable
 
 error[E0658]: `impl Trait` is not allowed in constant functions
-  --> $DIR/min_const_fn_impl_trait.rs:6:23
+  --> $DIR/min_const_fn_impl_trait.rs:8:23
    |
 LL | const fn no_rpit() -> impl std::fmt::Debug {}
    |                       ^^^^^^^^^^^^^^^^^^^^