Update rustdoc tests

This commit is contained in:
Guillaume Gomez 2022-09-13 12:01:07 +02:00 committed by Guillaume Gomez
parent 6add6a1e1e
commit c23ed655eb
3 changed files with 79 additions and 14 deletions

View File

@ -3,17 +3,26 @@
//! [Vec<] //~ ERROR
//! [Vec<Box<T] //~ ERROR
//! [Vec<Box<T>] //~ ERROR
//~^ WARN
//! [Vec<Box<T>>>] //~ ERROR
//~^ WARN
//! [Vec<T>>>] //~ ERROR
//~^ WARN
//! [<Vec] //~ ERROR
//! [Vec::<] //~ ERROR
//! [<T>] //~ ERROR
//~^ WARN
//! [<invalid syntax>] //~ ERROR
//~^ WARN
//! [Vec:<T>:new()] //~ ERROR
//~^ WARN
//! [Vec<<T>>] //~ ERROR
//~^ WARN
//! [Vec<>] //~ ERROR
//! [Vec<<>>] //~ ERROR
// FIXME(#74563) support UFCS
//! [<Vec as IntoIterator>::into_iter] //~ ERROR
//~^ WARN
//! [<Vec<T> as IntoIterator>::iter] //~ ERROR
//~^ WARN

View File

@ -23,67 +23,67 @@ LL | //! [Vec<Box<T>]
| ^^^^^^^^^^ unbalanced angle brackets
error: unresolved link to `Vec<Box<T>>>`
--> $DIR/malformed-generics.rs:6:6
--> $DIR/malformed-generics.rs:7:6
|
LL | //! [Vec<Box<T>>>]
| ^^^^^^^^^^^^ unbalanced angle brackets
error: unresolved link to `Vec<T>>>`
--> $DIR/malformed-generics.rs:7:6
--> $DIR/malformed-generics.rs:9:6
|
LL | //! [Vec<T>>>]
| ^^^^^^^^ unbalanced angle brackets
error: unresolved link to `<Vec`
--> $DIR/malformed-generics.rs:8:6
--> $DIR/malformed-generics.rs:11:6
|
LL | //! [<Vec]
| ^^^^ unbalanced angle brackets
error: unresolved link to `Vec::<`
--> $DIR/malformed-generics.rs:9:6
--> $DIR/malformed-generics.rs:12:6
|
LL | //! [Vec::<]
| ^^^^^^ unbalanced angle brackets
error: unresolved link to `<T>`
--> $DIR/malformed-generics.rs:10:6
--> $DIR/malformed-generics.rs:13:6
|
LL | //! [<T>]
| ^^^ missing type for generic parameters
error: unresolved link to `<invalid syntax>`
--> $DIR/malformed-generics.rs:11:6
--> $DIR/malformed-generics.rs:15:6
|
LL | //! [<invalid syntax>]
| ^^^^^^^^^^^^^^^^ missing type for generic parameters
error: unresolved link to `Vec:<T>:new`
--> $DIR/malformed-generics.rs:12:6
--> $DIR/malformed-generics.rs:17:6
|
LL | //! [Vec:<T>:new()]
| ^^^^^^^^^^^^^ has invalid path separator
error: unresolved link to `Vec<<T>>`
--> $DIR/malformed-generics.rs:13:6
--> $DIR/malformed-generics.rs:19:6
|
LL | //! [Vec<<T>>]
| ^^^^^^^^ too many angle brackets
error: unresolved link to `Vec<>`
--> $DIR/malformed-generics.rs:14:6
--> $DIR/malformed-generics.rs:21:6
|
LL | //! [Vec<>]
| ^^^^^ empty angle brackets
error: unresolved link to `Vec<<>>`
--> $DIR/malformed-generics.rs:15:6
--> $DIR/malformed-generics.rs:22:6
|
LL | //! [Vec<<>>]
| ^^^^^^^ too many angle brackets
error: unresolved link to `<Vec as IntoIterator>::into_iter`
--> $DIR/malformed-generics.rs:18:6
--> $DIR/malformed-generics.rs:25:6
|
LL | //! [<Vec as IntoIterator>::into_iter]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ fully-qualified syntax is unsupported
@ -91,12 +91,68 @@ LL | //! [<Vec as IntoIterator>::into_iter]
= note: see https://github.com/rust-lang/rust/issues/74563 for more information
error: unresolved link to `<Vec<T> as IntoIterator>::iter`
--> $DIR/malformed-generics.rs:19:6
--> $DIR/malformed-generics.rs:27:6
|
LL | //! [<Vec<T> as IntoIterator>::iter]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ fully-qualified syntax is unsupported
|
= note: see https://github.com/rust-lang/rust/issues/74563 for more information
error: aborting due to 15 previous errors
warning: unclosed HTML tag `T`
--> $DIR/malformed-generics.rs:5:13
|
LL | //! [Vec<Box<T>]
| ^^^
|
= note: `#[warn(rustdoc::invalid_html_tags)]` on by default
warning: unclosed HTML tag `T`
--> $DIR/malformed-generics.rs:7:13
|
LL | //! [Vec<Box<T>>>]
| ^^^
warning: unclosed HTML tag `T`
--> $DIR/malformed-generics.rs:9:9
|
LL | //! [Vec<T>>>]
| ^^^
warning: unclosed HTML tag `T`
--> $DIR/malformed-generics.rs:13:6
|
LL | //! [<T>]
| ^^^
warning: unclosed HTML tag `invalid`
--> $DIR/malformed-generics.rs:15:6
|
LL | //! [<invalid syntax>]
| ^^^^^^^^
warning: unclosed HTML tag `T`
--> $DIR/malformed-generics.rs:17:10
|
LL | //! [Vec:<T>:new()]
| ^^^
warning: unclosed HTML tag `T`
--> $DIR/malformed-generics.rs:19:10
|
LL | //! [Vec<<T>>]
| ^^^
warning: unclosed HTML tag `Vec`
--> $DIR/malformed-generics.rs:25:6
|
LL | //! [<Vec as IntoIterator>::into_iter]
| ^^^^
warning: unclosed HTML tag `T`
--> $DIR/malformed-generics.rs:27:10
|
LL | //! [<Vec<T> as IntoIterator>::iter]
| ^^^
error: aborting due to 15 previous errors; 9 warnings emitted

View File

@ -16,4 +16,4 @@
//! [`empty`]
// @has - '//a[@href="../empty2/index.html"]' 'empty2'
//! [empty2<x>]
//! [`empty2<x>`]