diff options
| author | bors <bors@rust-lang.org> | 2025-01-29 05:00:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-01-29 05:00:20 +0000 |
| commit | ccc9ba5c30c675824e9ca62b960830ff4a1858ea (patch) | |
| tree | a782fc9a60b8c3274b698f40bfc879bbee957c4d /compiler/rustc_parse_format/src/tests.rs | |
| parent | 122fb29eb639aae852b9dcba0fd7aefc691be118 (diff) | |
| parent | 28393070ab48923d1616ea5afd4f67cd1f2e346f (diff) | |
| download | rust-ccc9ba5c30c675824e9ca62b960830ff4a1858ea.tar.gz rust-ccc9ba5c30c675824e9ca62b960830ff4a1858ea.zip | |
Auto merge of #136225 - fmease:rollup-fm7m744, r=fmease
Rollup of 7 pull requests Successful merges: - #135625 ([cfg_match] Document the use of expressions.) - #135902 (Do not consider child bound assumptions for rigid alias) - #135943 (Rename `Piece::String` to `Piece::Lit`) - #136104 (Add mermaid graphs of NLL regions and SCCs to polonius MIR dump) - #136143 (Update books) - #136147 (ABI-required target features: warn when they are missing in base CPU) - #136164 (Refactor FnKind variant to hold &Fn) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse_format/src/tests.rs')
| -rw-r--r-- | compiler/rustc_parse_format/src/tests.rs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/compiler/rustc_parse_format/src/tests.rs b/compiler/rustc_parse_format/src/tests.rs index 81e5bca0ba9..fbb217b16fc 100644 --- a/compiler/rustc_parse_format/src/tests.rs +++ b/compiler/rustc_parse_format/src/tests.rs @@ -1,3 +1,5 @@ +use Piece::*; + use super::*; #[track_caller] @@ -32,12 +34,12 @@ fn musterr(s: &str) { #[test] fn simple() { - same("asdf", &[String("asdf")]); - same("a{{b", &[String("a"), String("{b")]); - same("a}}b", &[String("a"), String("}b")]); - same("a}}", &[String("a"), String("}")]); - same("}}", &[String("}")]); - same("\\}}", &[String("\\"), String("}")]); + same("asdf", &[Lit("asdf")]); + same("a{{b", &[Lit("a"), Lit("{b")]); + same("a}}b", &[Lit("a"), Lit("}b")]); + same("a}}", &[Lit("a"), Lit("}")]); + same("}}", &[Lit("}")]); + same("\\}}", &[Lit("\\"), Lit("}")]); } #[test] @@ -370,7 +372,7 @@ fn format_flags() { #[test] fn format_mixture() { same("abcd {3:x} efg", &[ - String("abcd "), + Lit("abcd "), NextArgument(Box::new(Argument { position: ArgumentIs(3), position_span: InnerSpan { start: 7, end: 8 }, @@ -390,7 +392,7 @@ fn format_mixture() { ty_span: None, }, })), - String(" efg"), + Lit(" efg"), ]); } #[test] |
