Skip to content

Commit

Permalink
Merge branch 'main' into kk-fix-scatterplot-crash
Browse files Browse the repository at this point in the history
  • Loading branch information
karkhaz authored May 29, 2024
2 parents a411f81 + 7eb6ce7 commit a104253
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ macro_rules! eprint {
#[cfg(not(feature = "concrete_playback"))]
#[macro_export]
macro_rules! println {
() => { };
() => { $crate::print!("\n") };
($($x:tt)*) => {{ let _ = format_args!($($x)*); }};
}

#[cfg(not(feature = "concrete_playback"))]
#[macro_export]
macro_rules! eprintln {
() => { };
() => { $crate::eprint!("\n") };
($($x:tt)*) => {{ let _ = format_args!($($x)*); }};
}

Expand Down
17 changes: 17 additions & 0 deletions tests/kani/Print/no_semicolon.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT

// This test checks that the (e)println with no arguments do not require a trailing semicolon

fn println() {
println!()
}
fn eprintln() {
eprintln!()
}

#[kani::proof]
fn main() {
println();
eprintln();
}

0 comments on commit a104253

Please sign in to comment.