summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.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/const-generics/generic_const_exprs/object-safety-ok-infer-err.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/const-generics/generic_const_exprs/object-safety-ok-infer-err.stderr')
-rw-r--r--src/test/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.stderr19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.stderr b/src/test/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.stderr
new file mode 100644
index 000000000..59e9fee1e
--- /dev/null
+++ b/src/test/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.stderr
@@ -0,0 +1,19 @@
+error[E0284]: type annotations needed
+ --> $DIR/object-safety-ok-infer-err.rs:19:5
+ |
+LL | use_dyn(&());
+ | ^^^^^^^ cannot infer the value of the const parameter `N` declared on the function `use_dyn`
+ |
+note: required by a bound in `use_dyn`
+ --> $DIR/object-safety-ok-infer-err.rs:14:55
+ |
+LL | fn use_dyn<const N: usize>(v: &dyn Foo<N>) where [u8; N + 1]: Sized {
+ | ^^^^^ required by this bound in `use_dyn`
+help: consider specifying the generic argument
+ |
+LL | use_dyn::<N>(&());
+ | +++++
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0284`.