summaryrefslogtreecommitdiffstats
path: root/src/test/ui/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr')
-rw-r--r--src/test/ui/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/test/ui/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr b/src/test/ui/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr
new file mode 100644
index 000000000..033ec21ba
--- /dev/null
+++ b/src/test/ui/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr
@@ -0,0 +1,56 @@
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:8:19
+ |
+LL | fn rpit() -> impl ~const T { S }
+ | ^^^^^^^^
+ |
+ = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:11:17
+ |
+LL | fn apit(_: impl ~const T) {}
+ | ^^^^^^^^
+ |
+ = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:14:50
+ |
+LL | fn rpit_assoc_bound() -> impl IntoIterator<Item: ~const T> { Some(S) }
+ | ^^^^^^^^
+ |
+ = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:17:48
+ |
+LL | fn apit_assoc_bound(_: impl IntoIterator<Item: ~const T>) {}
+ | ^^^^^^^^
+ |
+ = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:20:15
+ |
+LL | fn generic<P: ~const T>() {}
+ | ^^^^^^^^
+ |
+ = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:23:31
+ |
+LL | fn where_clause<P>() where P: ~const T {}
+ | ^^^^^^^^
+ |
+ = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
+
+error: `~const` and `?` are mutually exclusive
+ --> $DIR/tilde-const-invalid-places.rs:26:25
+ |
+LL | struct TildeQuestion<T: ~const ?Sized>(std::marker::PhantomData<T>);
+ | ^^^^^^^^^^^^^
+
+error: aborting due to 7 previous errors
+