summaryrefslogtreecommitdiffstats
path: root/tests/ui/object-safety
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
commitd1b2d29528b7794b41e66fc2136e395a02f8529b (patch)
treea4a17504b260206dec3cf55b2dca82929a348ac2 /tests/ui/object-safety
parentReleasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz
rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/object-safety')
-rw-r--r--tests/ui/object-safety/assoc_const_bounds.rs9
-rw-r--r--tests/ui/object-safety/assoc_const_bounds.stderr15
-rw-r--r--tests/ui/object-safety/assoc_const_bounds_sized.rs9
-rw-r--r--tests/ui/object-safety/assoc_const_bounds_sized.stderr15
-rw-r--r--tests/ui/object-safety/object-safety-by-value-self-use.stderr2
5 files changed, 15 insertions, 35 deletions
diff --git a/tests/ui/object-safety/assoc_const_bounds.rs b/tests/ui/object-safety/assoc_const_bounds.rs
index 94b1f6316..bfa21fd9a 100644
--- a/tests/ui/object-safety/assoc_const_bounds.rs
+++ b/tests/ui/object-safety/assoc_const_bounds.rs
@@ -1,7 +1,12 @@
+#![feature(generic_const_items)]
+#![allow(incomplete_features, dead_code)]
+
+// check-pass
+
trait Foo<T> {
const BAR: bool
- where //~ ERROR: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `=`, found keyword `where`
- Self: Sized;
+ where
+ Self: Sized;
}
trait Cake {}
diff --git a/tests/ui/object-safety/assoc_const_bounds.stderr b/tests/ui/object-safety/assoc_const_bounds.stderr
deleted file mode 100644
index 09bc11e17..000000000
--- a/tests/ui/object-safety/assoc_const_bounds.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `=`, found keyword `where`
- --> $DIR/assoc_const_bounds.rs:3:9
- |
-LL | trait Foo<T> {
- | - while parsing this item list starting here
-LL | const BAR: bool
- | - expected one of 7 possible tokens
-LL | where
- | ^^^^^ unexpected token
-LL | Self: Sized;
-LL | }
- | - the item list ends here
-
-error: aborting due to previous error
-
diff --git a/tests/ui/object-safety/assoc_const_bounds_sized.rs b/tests/ui/object-safety/assoc_const_bounds_sized.rs
index 2a76e5dce..87d1f06f0 100644
--- a/tests/ui/object-safety/assoc_const_bounds_sized.rs
+++ b/tests/ui/object-safety/assoc_const_bounds_sized.rs
@@ -1,7 +1,12 @@
+#![feature(generic_const_items)]
+#![allow(incomplete_features, dead_code)]
+
+// check-pass
+
trait Foo {
const BAR: bool
- where //~ ERROR: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `=`, found keyword `where`
- Self: Sized;
+ where
+ Self: Sized;
}
fn foo(_: &dyn Foo) {}
diff --git a/tests/ui/object-safety/assoc_const_bounds_sized.stderr b/tests/ui/object-safety/assoc_const_bounds_sized.stderr
deleted file mode 100644
index e1f57f677..000000000
--- a/tests/ui/object-safety/assoc_const_bounds_sized.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `=`, found keyword `where`
- --> $DIR/assoc_const_bounds_sized.rs:3:9
- |
-LL | trait Foo {
- | - while parsing this item list starting here
-LL | const BAR: bool
- | - expected one of 7 possible tokens
-LL | where
- | ^^^^^ unexpected token
-LL | Self: Sized;
-LL | }
- | - the item list ends here
-
-error: aborting due to previous error
-
diff --git a/tests/ui/object-safety/object-safety-by-value-self-use.stderr b/tests/ui/object-safety/object-safety-by-value-self-use.stderr
index 94fdcdf26..17f4cb4d4 100644
--- a/tests/ui/object-safety/object-safety-by-value-self-use.stderr
+++ b/tests/ui/object-safety/object-safety-by-value-self-use.stderr
@@ -2,7 +2,7 @@ error[E0161]: cannot move a value of type `dyn Bar`
--> $DIR/object-safety-by-value-self-use.rs:15:5
|
LL | t.bar()
- | ^^^^^^^ the size of `dyn Bar` cannot be statically determined
+ | ^ the size of `dyn Bar` cannot be statically determined
error: aborting due to previous error