We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdad1f9 commit b3ac42bCopy full SHA for b3ac42b
src/test/ui/resolve/issue-82825.rs
@@ -0,0 +1,21 @@
1
+// check-pass
2
+
3
+trait Trait {
4
+ fn static_call(&self) where Self: Sized;
5
6
+ fn maybe_dynamic_call(&self) {
7
+ unimplemented!("unsupported maybe_dynamic_call");
8
+ }
9
+}
10
11
+impl<T: ?Sized + Trait> Trait for &T {
12
+ fn static_call(&self) where Self: Sized {
13
+ (**self).maybe_dynamic_call();
14
15
16
17
+fn foo(x: &dyn Trait) {
18
+ x.static_call();
19
20
21
+fn main() {}
0 commit comments