diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:25:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:25:56 +0000 |
commit | 018c4950b9406055dec02ef0fb52f132e2bb1e2c (patch) | |
tree | a835ebdf2088ef88fa681f8fad45f09922c1ae9a /tests/ui/self | |
parent | Adding debian version 1.75.0+dfsg1-5. (diff) | |
download | rustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.tar.xz rustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.zip |
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/self')
12 files changed, 21 insertions, 12 deletions
diff --git a/tests/ui/self/arbitrary-self-from-method-substs.default.stderr b/tests/ui/self/arbitrary-self-from-method-substs.default.stderr index cbf5e6c54..a415aa3d7 100644 --- a/tests/ui/self/arbitrary-self-from-method-substs.default.stderr +++ b/tests/ui/self/arbitrary-self-from-method-substs.default.stderr @@ -8,6 +8,6 @@ LL | fn get<R: Deref<Target = Self>>(self: R) -> u32 { = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable = help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`) -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/self/arbitrary-self-from-method-substs.feature.stderr b/tests/ui/self/arbitrary-self-from-method-substs.feature.stderr index 7378d53c3..44e553f1a 100644 --- a/tests/ui/self/arbitrary-self-from-method-substs.feature.stderr +++ b/tests/ui/self/arbitrary-self-from-method-substs.feature.stderr @@ -4,6 +4,6 @@ error[E0308]: mismatched types LL | foo.get::<&Foo>(); | ^^^ expected `&Foo`, found `Foo` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr b/tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr index 0a567ddcc..363ba072c 100644 --- a/tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr +++ b/tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr @@ -17,6 +17,6 @@ LL | fn foo(self: &Rc<Self>) -> usize; = help: only type `usize` implements the trait, consider using it directly instead = note: required for the cast from `Rc<usize>` to `Rc<dyn Foo>` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0038`. diff --git a/tests/ui/self/arbitrary_self_types_needing_mut_pin.stderr b/tests/ui/self/arbitrary_self_types_needing_mut_pin.stderr index 5dcb58611..f33b9ec68 100644 --- a/tests/ui/self/arbitrary_self_types_needing_mut_pin.stderr +++ b/tests/ui/self/arbitrary_self_types_needing_mut_pin.stderr @@ -13,6 +13,6 @@ LL ~ let mut pinned = std::pin::pin!(S); LL ~ pinned.as_mut().x(); | -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0599`. diff --git a/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr b/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr index 944cdc5f5..e04ec8bb3 100644 --- a/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr +++ b/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr @@ -12,6 +12,6 @@ help: to declare that `impl Clone` captures `'_`, you can add an explicit `'_` l LL | async fn f(self: Pin<&Self>) -> impl Clone + '_ { self } | ++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0700`. diff --git a/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr b/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr index 8a9b397ca..a2964881d 100644 --- a/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr +++ b/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr @@ -12,6 +12,6 @@ help: to declare that `impl Clone` captures `'_`, you can add an explicit `'_` l LL | fn f(self: Pin<&Self>) -> impl Clone + '_ { self } | ++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0700`. diff --git a/tests/ui/self/elision/nested-item.stderr b/tests/ui/self/elision/nested-item.stderr index 752fd8233..7bad26fa1 100644 --- a/tests/ui/self/elision/nested-item.stderr +++ b/tests/ui/self/elision/nested-item.stderr @@ -21,10 +21,19 @@ LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() { | ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from -help: consider using the `'static` lifetime +help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` | LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &'static () { | +++++++ +help: instead, you are more likely to want to change the argument to be borrowed... + | +LL | fn wrap(self: &Wrap<{ fn bar(&self) {} }>) -> &() { + | + +help: ...or alternatively, you might want to return an owned value + | +LL - fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() { +LL + fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> () { + | error[E0412]: cannot find type `Wrap` in this scope --> $DIR/nested-item.rs:5:15 diff --git a/tests/ui/self/issue-61882-2.stderr b/tests/ui/self/issue-61882-2.stderr index 6faa4477d..7d5214421 100644 --- a/tests/ui/self/issue-61882-2.stderr +++ b/tests/ui/self/issue-61882-2.stderr @@ -12,6 +12,6 @@ LL | LL | } | - `x` dropped here while still borrowed -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0597`. diff --git a/tests/ui/self/point-at-arbitrary-self-type-method.stderr b/tests/ui/self/point-at-arbitrary-self-type-method.stderr index 3c7cccfc9..14bd6ca6b 100644 --- a/tests/ui/self/point-at-arbitrary-self-type-method.stderr +++ b/tests/ui/self/point-at-arbitrary-self-type-method.stderr @@ -15,6 +15,6 @@ help: consider wrapping the receiver expression with the appropriate type LL | Box::new(A).foo(); | +++++++++ + -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0599`. diff --git a/tests/ui/self/point-at-arbitrary-self-type-trait-method.stderr b/tests/ui/self/point-at-arbitrary-self-type-trait-method.stderr index 366c14f76..29510190c 100644 --- a/tests/ui/self/point-at-arbitrary-self-type-trait-method.stderr +++ b/tests/ui/self/point-at-arbitrary-self-type-trait-method.stderr @@ -16,6 +16,6 @@ help: consider wrapping the receiver expression with the appropriate type LL | Box::new(A).foo() | +++++++++ + -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0599`. diff --git a/tests/ui/self/self-vs-path-ambiguity.stderr b/tests/ui/self/self-vs-path-ambiguity.stderr index 2beef50cd..9e140e210 100644 --- a/tests/ui/self/self-vs-path-ambiguity.stderr +++ b/tests/ui/self/self-vs-path-ambiguity.stderr @@ -4,5 +4,5 @@ error: unexpected lifetime `'a` in pattern LL | fn i(&'a self::S: &S) {} | ^^ help: remove the lifetime -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/self/self_type_keyword.stderr b/tests/ui/self/self_type_keyword.stderr index 6e65fae80..fed853a7e 100644 --- a/tests/ui/self/self_type_keyword.stderr +++ b/tests/ui/self/self_type_keyword.stderr @@ -14,7 +14,7 @@ error: `mut` must be followed by a named binding --> $DIR/self_type_keyword.rs:16:9 | LL | mut Self => (), - | ^^^^^^^^ help: remove the `mut` prefix: `Self` + | ^^^^ help: remove the `mut` prefix | = note: `mut` may be followed by `variable` and `variable @ pattern` |