diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/suggestions/field-has-method.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/field-has-method.rs b/src/test/ui/suggestions/field-has-method.rs new file mode 100644 index 000000000..980000151 --- /dev/null +++ b/src/test/ui/suggestions/field-has-method.rs @@ -0,0 +1,23 @@ +struct Kind; + +struct Ty { + kind: Kind, +} + +impl Ty { + fn kind(&self) -> Kind { + todo!() + } +} + +struct InferOk<T> { + value: T, + predicates: Vec<()>, +} + +fn foo(i: InferOk<Ty>) { + let k = i.kind(); + //~^ no method named `kind` found for struct `InferOk` in the current scope +} + +fn main() {} |