diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2021-09-15 14:56:58 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-15 14:56:58 -0700 |
| commit | fb2d7dff806af96a127cd5338dd8a3a95cc7cbe8 (patch) | |
| tree | c68ff33a0c18ba1b91b8a978b32791ab7cbffff7 /src/test/ui/parser | |
| parent | 4b568409ad86ac516ae7397ac31b1b47b0a2e1a7 (diff) | |
| parent | 35370a7ba3d52bfe2a6121a0eaccbc240ed9559d (diff) | |
| download | rust-fb2d7dff806af96a127cd5338dd8a3a95cc7cbe8.tar.gz rust-fb2d7dff806af96a127cd5338dd8a3a95cc7cbe8.zip | |
Rollup merge of #88775 - pnkfelix:revert-anon-union-parsing, r=davidtwco
Revert anon union parsing Revert PR #84571 and #85515, which implemented anonymous union parsing in a manner that broke the context-sensitivity for the `union` keyword and thus broke stable Rust code. Fix #88583.
Diffstat (limited to 'src/test/ui/parser')
| -rw-r--r-- | src/test/ui/parser/issue-88583-union-as-ident.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/parser/issue-88583-union-as-ident.rs b/src/test/ui/parser/issue-88583-union-as-ident.rs new file mode 100644 index 00000000000..b3d66d46b1d --- /dev/null +++ b/src/test/ui/parser/issue-88583-union-as-ident.rs @@ -0,0 +1,15 @@ +// check-pass + +#![allow(non_camel_case_types)] + +struct union; + +impl union { + pub fn new() -> Self { + union { } + } +} + +fn main() { + let _u = union::new(); +} |
