Skip to content

Commit

Permalink
Unwrap expression in vec! expansion test
Browse files Browse the repository at this point in the history
See [this commit](rust-lang/rust@9828e96).
  • Loading branch information
l2dy committed Aug 2, 2024
1 parent b2017ac commit 21915e9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -866,16 +866,17 @@ class RsMacroExpansionTest : RsMacroExpansionTestBase() {
fn foo() -> i32 {}
""")

@MinRustcVersion("1.82.0-nightly")
@ProjectDescriptor(WithStdlibRustProjectDescriptor::class)
fun `test standard 'vec!'`() {
val rustcVersion = project.cargoProjects.singleProject().rustcInfo?.version?.semver!!
// language=Rust
val expansion = when {
rustcVersion < RUST_1_63 -> "(<[_]>::into_vec(box [1, 2, 3]))"
else -> """(<[_]>::into_vec(
else -> """<[_]>::into_vec(
#[rustc_box]
IntellijRustDollarCrate::boxed::Box::new([1, 2, 3])
))"""
)"""
}
checkSingleMacro("""
fn main() {
Expand Down

0 comments on commit 21915e9

Please sign in to comment.