diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
commit | a4b7ed7a42c716ab9f05e351f003d589124fd55d (patch) | |
tree | b620cd3f223850b28716e474e80c58059dca5dd4 /src/test/rustdoc-ui/suggestions | |
parent | Adding upstream version 1.67.1+dfsg1. (diff) | |
download | rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip |
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/rustdoc-ui/suggestions')
5 files changed, 0 insertions, 495 deletions
diff --git a/src/test/rustdoc-ui/suggestions/html-as-generics-no-suggestions.rs b/src/test/rustdoc-ui/suggestions/html-as-generics-no-suggestions.rs deleted file mode 100644 index 476e3b2d4..000000000 --- a/src/test/rustdoc-ui/suggestions/html-as-generics-no-suggestions.rs +++ /dev/null @@ -1,80 +0,0 @@ -#![deny(rustdoc::invalid_html_tags)] - -/// This Vec<32> thing! -// Numbers aren't valid HTML tags, so no error. -pub struct ConstGeneric; - -/// This Vec<i32, i32> thing! -// HTML tags cannot contain commas, so no error. -pub struct MultipleGenerics; - -/// This <[u32] as Iterator<Item>> thing! -//~^ERROR unclosed HTML tag `Item` -// Some forms of fully-qualified path are simultaneously valid HTML tags -// with attributes. They produce an error, but no suggestion, because figuring -// out if this is valid would require parsing the entire path grammar. -// -// The important part is that we don't produce any *wrong* suggestions. -// While several other examples below are added to make sure we don't -// produce suggestions when given complex paths, this example is the actual -// reason behind not just using the real path parser. It's ambiguous: there's -// no way to locally reason out whether that `[u32]` is intended to be a slice -// or an intra-doc link. -pub struct FullyQualifiedPathsDoNotCount; - -/// This <Vec as IntoIter>::Iter thing! -//~^ERROR unclosed HTML tag `Vec` -// Some forms of fully-qualified path are simultaneously valid HTML tags -// with attributes. They produce an error, but no suggestion, because figuring -// out if this is valid would require parsing the entire path grammar. -pub struct FullyQualifiedPathsDoNotCount1; - -/// This Vec<Vec as IntoIter>::Iter thing! -//~^ERROR unclosed HTML tag `Vec` -// Some forms of fully-qualified path are simultaneously valid HTML tags -// with attributes. They produce an error, but no suggestion, because figuring -// out if this is valid would require parsing the entire path grammar. -pub struct FullyQualifiedPathsDoNotCount2; - -/// This Vec<Vec as IntoIter> thing! -//~^ERROR unclosed HTML tag `Vec` -// Some forms of fully-qualified path are simultaneously valid HTML tags -// with attributes. They produce an error, but no suggestion, because figuring -// out if this is valid would require parsing the entire path grammar. -pub struct FullyQualifiedPathsDoNotCount3; - -/// This Vec<Vec<i32> as IntoIter> thing! -//~^ERROR unclosed HTML tag `i32` -// Some forms of fully-qualified path are simultaneously valid HTML tags -// with attributes. They produce an error, but no suggestion, because figuring -// out if this is valid would require parsing the entire path grammar. -pub struct FullyQualifiedPathsDoNotCount4; - -/// This Vec<i32 class="test"> thing! -//~^ERROR unclosed HTML tag `i32` -// HTML attributes shouldn't be treated as Rust syntax, so no suggestions. -pub struct TagWithAttributes; - -/// This Vec<i32></i32> thing! -// There should be no error, and no suggestion, since the tags are balanced. -pub struct DoNotWarnOnMatchingTags; - -/// This Vec</i32> thing! -//~^ERROR unopened HTML tag `i32` -// This should produce an error, but no suggestion. -pub struct EndTagsAreNotValidRustSyntax; - -/// This 123<i32> thing! -//~^ERROR unclosed HTML tag `i32` -// This should produce an error, but no suggestion. -pub struct NumbersAreNotPaths; - -/// This Vec:<i32> thing! -//~^ERROR unclosed HTML tag `i32` -// This should produce an error, but no suggestion. -pub struct InvalidTurbofish; - -/// This [link](https://rust-lang.org)<i32> thing! -//~^ERROR unclosed HTML tag `i32` -// This should produce an error, but no suggestion. -pub struct BareTurbofish; diff --git a/src/test/rustdoc-ui/suggestions/html-as-generics-no-suggestions.stderr b/src/test/rustdoc-ui/suggestions/html-as-generics-no-suggestions.stderr deleted file mode 100644 index 3856a2513..000000000 --- a/src/test/rustdoc-ui/suggestions/html-as-generics-no-suggestions.stderr +++ /dev/null @@ -1,68 +0,0 @@ -error: unclosed HTML tag `Item` - --> $DIR/html-as-generics-no-suggestions.rs:11:28 - | -LL | /// This <[u32] as Iterator<Item>> thing! - | ^^^^^^ - | -note: the lint level is defined here - --> $DIR/html-as-generics-no-suggestions.rs:1:9 - | -LL | #![deny(rustdoc::invalid_html_tags)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: unclosed HTML tag `Vec` - --> $DIR/html-as-generics-no-suggestions.rs:25:10 - | -LL | /// This <Vec as IntoIter>::Iter thing! - | ^^^^ - -error: unclosed HTML tag `Vec` - --> $DIR/html-as-generics-no-suggestions.rs:32:13 - | -LL | /// This Vec<Vec as IntoIter>::Iter thing! - | ^^^^ - -error: unclosed HTML tag `Vec` - --> $DIR/html-as-generics-no-suggestions.rs:39:13 - | -LL | /// This Vec<Vec as IntoIter> thing! - | ^^^^ - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics-no-suggestions.rs:46:17 - | -LL | /// This Vec<Vec<i32> as IntoIter> thing! - | ^^^^^ - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics-no-suggestions.rs:53:13 - | -LL | /// This Vec<i32 class="test"> thing! - | ^^^^ - -error: unopened HTML tag `i32` - --> $DIR/html-as-generics-no-suggestions.rs:62:13 - | -LL | /// This Vec</i32> thing! - | ^^^^^^ - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics-no-suggestions.rs:67:13 - | -LL | /// This 123<i32> thing! - | ^^^^^ - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics-no-suggestions.rs:72:14 - | -LL | /// This Vec:<i32> thing! - | ^^^^^ - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics-no-suggestions.rs:77:39 - | -LL | /// This [link](https://rust-lang.org)<i32> thing! - | ^^^^^ - -error: aborting due to 10 previous errors - diff --git a/src/test/rustdoc-ui/suggestions/html-as-generics.fixed b/src/test/rustdoc-ui/suggestions/html-as-generics.fixed deleted file mode 100644 index 003542d38..000000000 --- a/src/test/rustdoc-ui/suggestions/html-as-generics.fixed +++ /dev/null @@ -1,82 +0,0 @@ -// run-rustfix -#![deny(rustdoc::invalid_html_tags)] - -/// This `Vec<i32>` thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct Generic; - -/// This `vec::Vec<i32>` thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct GenericPath; - -/// This `i32<i32>` thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct PathsCanContainTrailingNumbers; - -/// This `Vec::<i32>` thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct Turbofish; - -/// This [link](https://rust-lang.org)`::<i32>` thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct BareTurbofish; - -/// This <span>`Vec::<i32>`</span> thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct Nested; - -/// Nested generics `Vec<Vec<u32>>` -//~^ ERROR unclosed HTML tag `u32` -//~|HELP try marking as source -pub struct NestedGenerics; - -/// Generics with path `Vec<i32>::Iter` -//~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct GenericsWithPath; - -/// Generics with path `<Vec<i32>>::Iter` -//~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct NestedGenericsWithPath; - -/// Generics with path `Vec<Vec<i32>>::Iter` -//~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct NestedGenericsWithPath2; - -/// Generics with bump `<Vec<i32>>`s -//~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct NestedGenericsWithBump; - -/// Generics with bump `Vec<Vec<i32>>`s -//~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct NestedGenericsWithBump2; - -/// Generics with punct `<Vec<i32>>`! -//~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct NestedGenericsWithPunct; - -/// Generics with punct `Vec<Vec<i32>>`! -//~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct NestedGenericsWithPunct2; - -/// This [`Vec<i32>`] thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct IntraDocLink; - -/// This [`Vec::<i32>`] thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct IntraDocLinkTurbofish; diff --git a/src/test/rustdoc-ui/suggestions/html-as-generics.rs b/src/test/rustdoc-ui/suggestions/html-as-generics.rs deleted file mode 100644 index 4254a660b..000000000 --- a/src/test/rustdoc-ui/suggestions/html-as-generics.rs +++ /dev/null @@ -1,82 +0,0 @@ -// run-rustfix -#![deny(rustdoc::invalid_html_tags)] - -/// This Vec<i32> thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct Generic; - -/// This vec::Vec<i32> thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct GenericPath; - -/// This i32<i32> thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct PathsCanContainTrailingNumbers; - -/// This Vec::<i32> thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct Turbofish; - -/// This [link](https://rust-lang.org)::<i32> thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct BareTurbofish; - -/// This <span>Vec::<i32></span> thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct Nested; - -/// Nested generics Vec<Vec<u32>> -//~^ ERROR unclosed HTML tag `u32` -//~|HELP try marking as source -pub struct NestedGenerics; - -/// Generics with path Vec<i32>::Iter -//~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct GenericsWithPath; - -/// Generics with path <Vec<i32>>::Iter -//~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct NestedGenericsWithPath; - -/// Generics with path Vec<Vec<i32>>::Iter -//~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct NestedGenericsWithPath2; - -/// Generics with bump <Vec<i32>>s -//~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct NestedGenericsWithBump; - -/// Generics with bump Vec<Vec<i32>>s -//~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct NestedGenericsWithBump2; - -/// Generics with punct <Vec<i32>>! -//~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct NestedGenericsWithPunct; - -/// Generics with punct Vec<Vec<i32>>! -//~^ ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct NestedGenericsWithPunct2; - -/// This [Vec<i32>] thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct IntraDocLink; - -/// This [Vec::<i32>] thing! -//~^ERROR unclosed HTML tag `i32` -//~|HELP try marking as source -pub struct IntraDocLinkTurbofish; diff --git a/src/test/rustdoc-ui/suggestions/html-as-generics.stderr b/src/test/rustdoc-ui/suggestions/html-as-generics.stderr deleted file mode 100644 index 481278bda..000000000 --- a/src/test/rustdoc-ui/suggestions/html-as-generics.stderr +++ /dev/null @@ -1,183 +0,0 @@ -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics.rs:4:13 - | -LL | /// This Vec<i32> thing! - | ^^^^^ - | -note: the lint level is defined here - --> $DIR/html-as-generics.rs:2:9 - | -LL | #![deny(rustdoc::invalid_html_tags)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: try marking as source code - | -LL | /// This `Vec<i32>` thing! - | + + - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics.rs:9:18 - | -LL | /// This vec::Vec<i32> thing! - | ^^^^^ - | -help: try marking as source code - | -LL | /// This `vec::Vec<i32>` thing! - | + + - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics.rs:14:13 - | -LL | /// This i32<i32> thing! - | ^^^^^ - | -help: try marking as source code - | -LL | /// This `i32<i32>` thing! - | + + - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics.rs:19:15 - | -LL | /// This Vec::<i32> thing! - | ^^^^^ - | -help: try marking as source code - | -LL | /// This `Vec::<i32>` thing! - | + + - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics.rs:24:41 - | -LL | /// This [link](https://rust-lang.org)::<i32> thing! - | ^^^^^ - | -help: try marking as source code - | -LL | /// This [link](https://rust-lang.org)`::<i32>` thing! - | + + - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics.rs:29:21 - | -LL | /// This <span>Vec::<i32></span> thing! - | ^^^^^ - | -help: try marking as source code - | -LL | /// This <span>`Vec::<i32>`</span> thing! - | + + - -error: unclosed HTML tag `u32` - --> $DIR/html-as-generics.rs:34:28 - | -LL | /// Nested generics Vec<Vec<u32>> - | ^^^^^ - | -help: try marking as source code - | -LL | /// Nested generics `Vec<Vec<u32>>` - | + + - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics.rs:39:27 - | -LL | /// Generics with path Vec<i32>::Iter - | ^^^^^ - | -help: try marking as source code - | -LL | /// Generics with path `Vec<i32>::Iter` - | + + - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics.rs:44:28 - | -LL | /// Generics with path <Vec<i32>>::Iter - | ^^^^^ - | -help: try marking as source code - | -LL | /// Generics with path `<Vec<i32>>::Iter` - | + + - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics.rs:49:31 - | -LL | /// Generics with path Vec<Vec<i32>>::Iter - | ^^^^^ - | -help: try marking as source code - | -LL | /// Generics with path `Vec<Vec<i32>>::Iter` - | + + - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics.rs:54:28 - | -LL | /// Generics with bump <Vec<i32>>s - | ^^^^^ - | -help: try marking as source code - | -LL | /// Generics with bump `<Vec<i32>>`s - | + + - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics.rs:59:31 - | -LL | /// Generics with bump Vec<Vec<i32>>s - | ^^^^^ - | -help: try marking as source code - | -LL | /// Generics with bump `Vec<Vec<i32>>`s - | + + - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics.rs:64:29 - | -LL | /// Generics with punct <Vec<i32>>! - | ^^^^^ - | -help: try marking as source code - | -LL | /// Generics with punct `<Vec<i32>>`! - | + + - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics.rs:69:32 - | -LL | /// Generics with punct Vec<Vec<i32>>! - | ^^^^^ - | -help: try marking as source code - | -LL | /// Generics with punct `Vec<Vec<i32>>`! - | + + - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics.rs:74:14 - | -LL | /// This [Vec<i32>] thing! - | ^^^^^ - | -help: try marking as source code - | -LL | /// This [`Vec<i32>`] thing! - | + + - -error: unclosed HTML tag `i32` - --> $DIR/html-as-generics.rs:79:16 - | -LL | /// This [Vec::<i32>] thing! - | ^^^^^ - | -help: try marking as source code - | -LL | /// This [`Vec::<i32>`] thing! - | + + - -error: aborting due to 16 previous errors - |