summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/issue-4908-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rustfmt/tests/target/issue-4908-2.rs')
-rw-r--r--src/tools/rustfmt/tests/target/issue-4908-2.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/target/issue-4908-2.rs b/src/tools/rustfmt/tests/target/issue-4908-2.rs
new file mode 100644
index 000000000..023b323cb
--- /dev/null
+++ b/src/tools/rustfmt/tests/target/issue-4908-2.rs
@@ -0,0 +1,20 @@
+#![feature(more_qualified_paths)]
+
+fn main() {
+ // destructure through a qualified path
+ let <Foo as A>::Assoc { br } = StructStruct { br: 2 };
+}
+
+struct StructStruct {
+ br: i8,
+}
+
+struct Foo;
+
+trait A {
+ type Assoc;
+}
+
+impl A for Foo {
+ type Assoc = StructStruct;
+}