diff options
| author | Michael Goulet <michael@errs.io> | 2024-10-04 11:56:45 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-10-10 06:07:51 -0400 |
| commit | 09da2ebd63107997e1319c2a076021660285ef40 (patch) | |
| tree | 2dc30ea748cdd7a540383679eaa94e45f5b5b6b2 /tests/ui/impl-trait/precise-capturing | |
| parent | df1b5d3cc2117f1ee96abca25678bc5f5604d450 (diff) | |
| download | rust-09da2ebd63107997e1319c2a076021660285ef40.tar.gz rust-09da2ebd63107997e1319c2a076021660285ef40.zip | |
Move ty::Error branch into super_combine_tys
Diffstat (limited to 'tests/ui/impl-trait/precise-capturing')
| -rw-r--r-- | tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.rs | 1 | ||||
| -rw-r--r-- | tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.stderr | 19 |
2 files changed, 1 insertions, 19 deletions
diff --git a/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.rs b/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.rs index 71a91fe319e..062351afecb 100644 --- a/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.rs +++ b/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.rs @@ -10,7 +10,6 @@ pub trait Foo { impl Foo for () { fn bar<'im: 'im>(&'im mut self) -> impl Sized + 'im {} //~^ ERROR return type captures more lifetimes than trait definition - //~| WARN impl trait in impl method signature does not match trait method signature } fn main() {} diff --git a/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.stderr b/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.stderr index 339e2e6335e..b390a23eef4 100644 --- a/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.stderr +++ b/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.stderr @@ -21,22 +21,5 @@ LL | fn bar<'tr: 'tr>(&'tr mut self) -> impl Sized + use<Self>; | ^^^^^^^^^^^^^^^^^^^^^^ = note: hidden type inferred to be `impl Sized + 'im` -warning: impl trait in impl method signature does not match trait method signature - --> $DIR/rpitit-captures-more-method-lifetimes.rs:11:40 - | -LL | fn bar<'tr: 'tr>(&'tr mut self) -> impl Sized + use<Self>; - | ---------------------- return type from trait method defined here -... -LL | fn bar<'im: 'im>(&'im mut self) -> impl Sized + 'im {} - | ^^^^^^^^^^^^^^^^ - | - = note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate - = note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information - = note: `#[warn(refining_impl_trait_reachable)]` on by default -help: replace the return type so that it matches the trait - | -LL | fn bar<'im: 'im>(&'im mut self) -> impl Sized {} - | ~~~~~~~~~~ - -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors |
