Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions tests/ui/hygiene/unpretty-debug-lifetimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@
// Regression test for lifetime hygiene annotations in -Zunpretty=expanded,hygiene
// Previously, lifetimes were missing the #N syntax context suffix.

// Don't break whenever Symbol numbering changes
//@ normalize-stdout: "\d+#" -> "0#"
// This test deliberately has no `.stdout` snapshot. The hygiene annotations
// embed `Symbol` indices, whose width feeds into the pretty-printer's line
// breaking, so the layout shifts whenever a `Symbol` gains or loses a digit.
// `normalize-stdout` can't help, because the layout is decided before
// normalization runs. Assert the property this test is about instead: the two
// `'a` share their text but carry different syntax contexts.
//@ dont-check-compiler-stdout
//@ check-stdout
//@ regex-error-pattern: f\s*/\*\s*\d+#0\s*\*/<'a\s*/\*\s*\d+#0\s*\*/,\s*'a\s*/\*\s*\d+#1\s*\*/

#![feature(decl_macro)]
#![feature(no_core)]
Expand Down
33 changes: 0 additions & 33 deletions tests/ui/hygiene/unpretty-debug-lifetimes.stdout

This file was deleted.

Loading