about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-07-30 21:01:42 +0000
committerbors <bors@rust-lang.org>2022-07-30 21:01:42 +0000
commit0f4bcadb46006bc484dad85616b484f93879ca4e (patch)
tree24c9bc84721b216023f64394714d5ec09f24c3da /src/test
parent038f9e6bef9c8fcf122d93a8a33ac546f5606eb3 (diff)
parentf21a06f8fa6c5e0bc58c7b48817f532af62a0bc3 (diff)
downloadrust-0f4bcadb46006bc484dad85616b484f93879ca4e.tar.gz
rust-0f4bcadb46006bc484dad85616b484f93879ca4e.zip
Auto merge of #99964 - matthiaskrgr:rollup-jr836e2, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #99650 (Support `x --keep-stage 0 check`)
 - #99873 (rustdoc: align invalid-html-tags lint with commonmark spec)
 - #99889 (Remove `parent_pat` from `TopInfo`)
 - #99890 (Do not allow bad projection term to leak into the type checker)
 - #99937 (Reset directory iteration in remove_dir_all)
 - #99950 (Remove more Clean trait implementations)
 - #99956 (Also gate AllocatedPointer and AllocAlign definitions by LLVM_VERSION_GE)
 - #99962 (Discover channel for LLVM download)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/test')
-rw-r--r--src/test/rustdoc-ui/invalid-html-tags.rs6
-rw-r--r--src/test/rustdoc-ui/invalid-html-tags.stderr14
-rw-r--r--src/test/ui/associated-consts/assoc-const-ty-mismatch.rs4
-rw-r--r--src/test/ui/associated-consts/assoc-const-ty-mismatch.stderr8
-rw-r--r--src/test/ui/associated-type-bounds/issue-99828.rs11
-rw-r--r--src/test/ui/associated-type-bounds/issue-99828.stderr24
6 files changed, 60 insertions, 7 deletions
diff --git a/src/test/rustdoc-ui/invalid-html-tags.rs b/src/test/rustdoc-ui/invalid-html-tags.rs
index cec44b6d2ca..0f9d2e4b35d 100644
--- a/src/test/rustdoc-ui/invalid-html-tags.rs
+++ b/src/test/rustdoc-ui/invalid-html-tags.rs
@@ -108,3 +108,9 @@ pub fn j() {}
 /// <Vec<_> shouldn't warn!
 /// ``````
 pub fn k() {}
+
+/// Web Components style <dashed-tags>
+//~^ ERROR unclosed HTML tag `dashed-tags`
+/// Web Components style </unopened-tag>
+//~^ ERROR unopened HTML tag `unopened-tag`
+pub fn m() {}
diff --git a/src/test/rustdoc-ui/invalid-html-tags.stderr b/src/test/rustdoc-ui/invalid-html-tags.stderr
index 335e100c89d..24a455576e8 100644
--- a/src/test/rustdoc-ui/invalid-html-tags.stderr
+++ b/src/test/rustdoc-ui/invalid-html-tags.stderr
@@ -82,5 +82,17 @@ error: Unclosed HTML comment
 LL | /// <!--
    |     ^^^
 
-error: aborting due to 13 previous errors
+error: unopened HTML tag `unopened-tag`
+  --> $DIR/invalid-html-tags.rs:114:26
+   |
+LL | /// Web Components style </unopened-tag>
+   |                          ^^^^^^^^^^^^^^^
+
+error: unclosed HTML tag `dashed-tags`
+  --> $DIR/invalid-html-tags.rs:112:26
+   |
+LL | /// Web Components style <dashed-tags>
+   |                          ^^^^^^^^^^^^^
+
+error: aborting due to 15 previous errors
 
diff --git a/src/test/ui/associated-consts/assoc-const-ty-mismatch.rs b/src/test/ui/associated-consts/assoc-const-ty-mismatch.rs
index c3293156345..c5d78469e95 100644
--- a/src/test/ui/associated-consts/assoc-const-ty-mismatch.rs
+++ b/src/test/ui/associated-consts/assoc-const-ty-mismatch.rs
@@ -21,9 +21,9 @@ impl FooTy for Bar {
 
 
 fn foo<F: Foo<N=usize>>() {}
-//~^ ERROR mismatch in
+//~^ ERROR expected associated constant bound, found type
 fn foo2<F: FooTy<T=3usize>>() {}
-//~^ ERROR mismatch in
+//~^ ERROR expected associated type bound, found constant
 
 fn main() {
   foo::<Bar>();
diff --git a/src/test/ui/associated-consts/assoc-const-ty-mismatch.stderr b/src/test/ui/associated-consts/assoc-const-ty-mismatch.stderr
index 58a8aceca2f..11198729e38 100644
--- a/src/test/ui/associated-consts/assoc-const-ty-mismatch.stderr
+++ b/src/test/ui/associated-consts/assoc-const-ty-mismatch.stderr
@@ -1,22 +1,22 @@
-error: mismatch in bind of associated constant, got type
+error: expected associated constant bound, found type
   --> $DIR/assoc-const-ty-mismatch.rs:23:15
    |
 LL | fn foo<F: Foo<N=usize>>() {}
    |               ^^^^^^^
    |
-note: associated constant defined here does not match type
+note: associated constant defined here
   --> $DIR/assoc-const-ty-mismatch.rs:5:3
    |
 LL |   const N: usize;
    |   ^^^^^^^^^^^^^^
 
-error: mismatch in bind of associated type, got const
+error: expected associated type bound, found constant
   --> $DIR/assoc-const-ty-mismatch.rs:25:18
    |
 LL | fn foo2<F: FooTy<T=3usize>>() {}
    |                  ^^^^^^^^
    |
-note: associated type defined here does not match const
+note: associated type defined here
   --> $DIR/assoc-const-ty-mismatch.rs:9:3
    |
 LL |   type T;
diff --git a/src/test/ui/associated-type-bounds/issue-99828.rs b/src/test/ui/associated-type-bounds/issue-99828.rs
new file mode 100644
index 00000000000..7b711283f5b
--- /dev/null
+++ b/src/test/ui/associated-type-bounds/issue-99828.rs
@@ -0,0 +1,11 @@
+fn get_iter(vec: &[i32]) -> impl Iterator<Item = {}> + '_ {
+    //~^ ERROR expected associated type bound, found constant
+    //~| ERROR associated const equality is incomplete
+    vec.iter()
+}
+
+fn main() {
+    let vec = Vec::new();
+    let mut iter = get_iter(&vec);
+    iter.next();
+}
diff --git a/src/test/ui/associated-type-bounds/issue-99828.stderr b/src/test/ui/associated-type-bounds/issue-99828.stderr
new file mode 100644
index 00000000000..1c20ead0556
--- /dev/null
+++ b/src/test/ui/associated-type-bounds/issue-99828.stderr
@@ -0,0 +1,24 @@
+error[E0658]: associated const equality is incomplete
+  --> $DIR/issue-99828.rs:1:43
+   |
+LL | fn get_iter(vec: &[i32]) -> impl Iterator<Item = {}> + '_ {
+   |                                           ^^^^^^^^^
+   |
+   = note: see issue #92827 <https://github.com/rust-lang/rust/issues/92827> for more information
+   = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable
+
+error: expected associated type bound, found constant
+  --> $DIR/issue-99828.rs:1:43
+   |
+LL | fn get_iter(vec: &[i32]) -> impl Iterator<Item = {}> + '_ {
+   |                                           ^^^^^^^^^
+   |
+note: associated type defined here
+  --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+   |
+LL |     type Item;
+   |     ^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0658`.