Description
From #54824 (comment):
[ ] impl-everywhere.rs:// @!has foo/fn.foo.html '//section[@id="main"]//pre' "x: &'x impl Foo"
This test looks strange. The generated documentation looks like this (wrapped in pre):
pub fn foo<'x>( x: &'x impl Foo ) -> &'x impl Foo
so it seems like the backslash in the test is taken literally which means that it doesn't match. Is that on purpose? @GuillaumeGomez it seems like you created the test, so perhaps you can enlighten me?
Edit: To be clear, removing the backslash from the test causes the test to fail.
My understanding is that test is trying to assert that fn.foo.html
doesn't contain the phrase x: &' impl Foo
, but because it is erroneously escaping a quote it fails to make that assertion. Furthermore, the generated fn.foo.html
file actually does contain the text being checked for, so there is a bug in rustdoc as well.