diff options
Diffstat (limited to 'src/tools/rustfmt/tests')
| -rw-r--r-- | src/tools/rustfmt/tests/source/unsafe-binders.rs | 11 | ||||
| -rw-r--r-- | src/tools/rustfmt/tests/target/unsafe-binders.rs | 9 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/source/unsafe-binders.rs b/src/tools/rustfmt/tests/source/unsafe-binders.rs new file mode 100644 index 00000000000..ccf7c8bb9af --- /dev/null +++ b/src/tools/rustfmt/tests/source/unsafe-binders.rs @@ -0,0 +1,11 @@ +fn foo() -> unsafe<'a> +&'a () {} + +struct Foo { + x: unsafe<'a> +&'a (), +} + +struct Bar(unsafe<'a> &'a ()); + +impl Trait for unsafe<'a> &'a () {} diff --git a/src/tools/rustfmt/tests/target/unsafe-binders.rs b/src/tools/rustfmt/tests/target/unsafe-binders.rs new file mode 100644 index 00000000000..9d308f4a894 --- /dev/null +++ b/src/tools/rustfmt/tests/target/unsafe-binders.rs @@ -0,0 +1,9 @@ +fn foo() -> unsafe<'a> &'a () {} + +struct Foo { + x: unsafe<'a> &'a (), +} + +struct Bar(unsafe<'a> &'a ()); + +impl Trait for unsafe<'a> &'a () {} |
