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.
This commit is contained in:
commit
fb2d7dff80
21 changed files with 50 additions and 595 deletions
15
src/test/ui/parser/issue-88583-union-as-ident.rs
Normal file
15
src/test/ui/parser/issue-88583-union-as-ident.rs
Normal file
|
|
@ -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();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue