Add ui regression test for #134221
This commit is contained in:
parent
de16ed35a3
commit
9c4a61ff52
2 changed files with 59 additions and 0 deletions
23
tests/rustdoc-ui/doctest/comment-in-attr-134221.rs
Normal file
23
tests/rustdoc-ui/doctest/comment-in-attr-134221.rs
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Regression test for <https://github.com/rust-lang/rust/issues/134221>.
|
||||
// It checks that even if there are comments in the attributes, the attributes
|
||||
// will still be generated correctly (and therefore fail in this test).
|
||||
|
||||
//@ compile-flags:--test --test-args --test-threads=1
|
||||
//@ failure-status: 101
|
||||
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
|
||||
|
||||
/*!
|
||||
```rust
|
||||
#![feature(
|
||||
foo, //
|
||||
)]
|
||||
```
|
||||
|
||||
```rust
|
||||
#![feature(
|
||||
foo,
|
||||
)]
|
||||
```
|
||||
*/
|
36
tests/rustdoc-ui/doctest/comment-in-attr-134221.stdout
Normal file
36
tests/rustdoc-ui/doctest/comment-in-attr-134221.stdout
Normal file
|
@ -0,0 +1,36 @@
|
|||
|
||||
running 2 tests
|
||||
test $DIR/comment-in-attr-134221.rs - (line 11) ... FAILED
|
||||
test $DIR/comment-in-attr-134221.rs - (line 17) ... FAILED
|
||||
|
||||
failures:
|
||||
|
||||
---- $DIR/comment-in-attr-134221.rs - (line 11) stdout ----
|
||||
error[E0635]: unknown feature `foo`
|
||||
--> $DIR/comment-in-attr-134221.rs:$LINE:$COL
|
||||
|
|
||||
LL | foo, //
|
||||
| ^^^
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0635`.
|
||||
Couldn't compile the test.
|
||||
---- $DIR/comment-in-attr-134221.rs - (line 17) stdout ----
|
||||
error[E0635]: unknown feature `foo`
|
||||
--> $DIR/comment-in-attr-134221.rs:$LINE:$COL
|
||||
|
|
||||
LL | foo,
|
||||
| ^^^
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0635`.
|
||||
Couldn't compile the test.
|
||||
|
||||
failures:
|
||||
$DIR/comment-in-attr-134221.rs - (line 11)
|
||||
$DIR/comment-in-attr-134221.rs - (line 17)
|
||||
|
||||
test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
|
||||
|
Loading…
Add table
Reference in a new issue