Skip to content

Commit

Permalink
Avoid having most of the new_raw test be unreachable code
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jun 20, 2022
1 parent c1d32ce commit 9a4f130
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/test.rs
Expand Up @@ -25,12 +25,14 @@ fn raw_idents() {

#[test]
#[should_panic(expected = "`_` cannot be a raw identifier")]
fn ident_raw_blocked() {
fn ident_raw_underscore() {
Ident::new_raw("_", Span::call_site());
}

#[test]
#[should_panic(expected = "`super` cannot be a raw identifier")]
fn ident_raw_reserved() {
Ident::new_raw("super", Span::call_site());
Ident::new_raw("self", Span::call_site());
Ident::new_raw("Self", Span::call_site());
Ident::new_raw("crate", Span::call_site());
}

#[test]
Expand Down

0 comments on commit 9a4f130

Please sign in to comment.