summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/in-trait/nested-rpitit.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/impl-trait/in-trait/nested-rpitit.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/ui/impl-trait/in-trait/nested-rpitit.rs b/tests/ui/impl-trait/in-trait/nested-rpitit.rs
index 65285e3a3..58ba1acaf 100644
--- a/tests/ui/impl-trait/in-trait/nested-rpitit.rs
+++ b/tests/ui/impl-trait/in-trait/nested-rpitit.rs
@@ -1,26 +1,28 @@
// check-pass
-#![feature(return_position_impl_trait_in_trait)]
+#![feature(return_position_impl_trait_in_trait, lint_reasons)]
#![allow(incomplete_features)]
use std::fmt::Display;
use std::ops::Deref;
-trait Foo {
+pub trait Foo {
fn bar(self) -> impl Deref<Target = impl Display + ?Sized>;
}
-struct A;
+pub struct A;
impl Foo for A {
+ #[expect(refining_impl_trait)]
fn bar(self) -> &'static str {
"Hello, world"
}
}
-struct B;
+pub struct B;
impl Foo for B {
+ #[expect(refining_impl_trait)]
fn bar(self) -> Box<i32> {
Box::new(42)
}