summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.nll.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:42 +0000
commitcec1877e180393eba0f6ddb0cf97bf3a791631c7 (patch)
tree47b4dac2a9dd9a40c30c251b4d4a72d7ccf77e9f /tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.nll.stderr
parentAdding debian version 1.74.1+dfsg1-1. (diff)
downloadrustc-cec1877e180393eba0f6ddb0cf97bf3a791631c7.tar.xz
rustc-cec1877e180393eba0f6ddb0cf97bf3a791631c7.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.nll.stderr')
-rw-r--r--tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.nll.stderr36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.nll.stderr b/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.nll.stderr
new file mode 100644
index 000000000..6f9b33031
--- /dev/null
+++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.nll.stderr
@@ -0,0 +1,36 @@
+error[E0046]: not all trait items implemented, missing: `call`
+ --> $DIR/location-insensitive-scopes-issue-116657.rs:18:1
+ |
+LL | fn call(x: Self) -> Self::Output;
+ | --------------------------------- `call` from trait
+...
+LL | impl<T: PlusOne> Callable for T {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `call` in implementation
+
+error: unconstrained opaque type
+ --> $DIR/location-insensitive-scopes-issue-116657.rs:22:19
+ |
+LL | type Output = impl PlusOne;
+ | ^^^^^^^^^^^^
+ |
+ = note: `Output` must be used in combination with a concrete type within the same impl
+
+error[E0700]: hidden type for `impl PlusOne` captures lifetime that does not appear in bounds
+ --> $DIR/location-insensitive-scopes-issue-116657.rs:28:5
+ |
+LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne {
+ | -- ------------ opaque type defined here
+ | |
+ | hidden type `<&'a mut i32 as Callable>::Output` captures the lifetime `'a` as defined here
+LL | <&mut i32 as Callable>::call(y)
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+help: to declare that `impl PlusOne` captures `'a`, you can add an explicit `'a` lifetime bound
+ |
+LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne + 'a {
+ | ++++
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0046, E0700.
+For more information about an error, try `rustc --explain E0046`.