-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reject CVarArgs in parse_ty_for_where_clause
- Loading branch information
Showing
4 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tests/ui/parser/macro/mbe-dotdotdot-may-not-begin-a-type.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// A bare `...` represents `CVarArgs` (`VaListImpl<'_>`) in function argument type | ||
// position without being a proper type syntactically. | ||
// This test ensures that we do not regress certain MBE calls would we ever promote | ||
// `...` to a proper type syntactically. | ||
|
||
//@ check-pass | ||
|
||
macro_rules! ck { ($ty:ty) => { compile_error!(""); }; (...) => {}; } | ||
ck!(...); | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters