diff options
Diffstat (limited to 'tests/ui/associated-types/associated-types-unsized.fixed')
-rw-r--r-- | tests/ui/associated-types/associated-types-unsized.fixed | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/associated-types/associated-types-unsized.fixed b/tests/ui/associated-types/associated-types-unsized.fixed new file mode 100644 index 000000000..328c8f944 --- /dev/null +++ b/tests/ui/associated-types/associated-types-unsized.fixed @@ -0,0 +1,14 @@ +// run-rustfix +#![allow(dead_code, unused_variables)] + +trait Get { + type Value: ?Sized; + fn get(&self) -> <Self as Get>::Value; +} + +fn foo<T:Get>(t: T) where <T as Get>::Value: Sized { + let x = t.get(); //~ ERROR the size for values of type +} + +fn main() { +} |