We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bc70ca commit c3870f1Copy full SHA for c3870f1
1 file changed
tests/test.rs
@@ -719,13 +719,19 @@ fn test_display_ident() {
719
#[test]
720
fn test_debug_ident() {
721
let ident = Ident::new("proc_macro", Span::call_site());
722
+ let expected = if cfg!(span_locations) {
723
+ "Ident { sym: proc_macro }"
724
+ } else {
725
+ "Ident(proc_macro)"
726
+ };
727
+ assert_eq!(expected, format!("{:?}", ident));
728
- #[cfg(not(span_locations))]
- let expected = "Ident(proc_macro)";
-
- #[cfg(span_locations)]
- let expected = "Ident { sym: proc_macro }";
729
+ let ident = Ident::new_raw("proc_macro", Span::call_site());
730
731
+ "Ident { sym: r#proc_macro }"
732
733
+ "Ident(r#proc_macro)"
734
735
assert_eq!(expected, format!("{:?}", ident));
736
}
737
0 commit comments