We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
impl Trait
1 parent 17eeeee commit 8a40aa3Copy full SHA for 8a40aa3
tests/run-pass/return_type.rs
@@ -1,5 +1,7 @@
1
use std::fmt::Debug;
2
3
+// `--features trace` code names the return type, so doesn't work with `impl Trait`
4
+#[cfg(not(feature = "trace"))]
5
peg::parser!{
6
grammar g() for str {
7
pub rule returns_impl_trait() -> impl Debug
@@ -8,5 +10,6 @@ peg::parser!{
8
10
}
9
11
12
fn main() {
13
+ #[cfg(not(feature = "trace"))]
14
assert_eq!(format!("{:?}", g::returns_impl_trait("")), "Ok(5)");
15
0 commit comments