Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotate expressions that are rendered poorly by core::stringify #213

Merged
merged 1 commit into from Dec 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/test_ensure.rs
Expand Up @@ -528,7 +528,7 @@ fn test_as() {
let test = || Ok(ensure!(f as for<'a> fn() as usize * 0 != 0));
assert_err(
test,
"Condition failed: `f as for<'a>fn() as usize * 0 != 0` (0 vs 0)",
"Condition failed: `f as for<'a>fn() as usize * 0 != 0` (0 vs 0)", // FIXME
);

let test = || Ok(ensure!(f as unsafe fn() as usize * 0 != 0));
Expand Down Expand Up @@ -613,7 +613,7 @@ fn test_pat() {
let test = || Ok(ensure!(if let -1..=1 = 0 { 0 } else { 1 } == 1));
assert_err(
test,
"Condition failed: `if let -1 ..=1 = 0 { 0 } else { 1 } == 1` (0 vs 1)",
"Condition failed: `if let -1 ..=1 = 0 { 0 } else { 1 } == 1` (0 vs 1)", // FIXME
);

let test = || Ok(ensure!(if let &0 = &0 { 0 } else { 1 } == 1));
Expand Down Expand Up @@ -656,7 +656,7 @@ fn test_pat() {
let test = || Ok(ensure!(if let P::<u8> {} = p { 0 } else { 1 } == 1));
assert_err(
test,
"Condition failed: `if let P::<u8> { } = p { 0 } else { 1 } == 1` (0 vs 1)",
"Condition failed: `if let P::<u8> { } = p { 0 } else { 1 } == 1` (0 vs 1)", // FIXME
);

let test = || Ok(ensure!(if let ::std::marker::PhantomData = p {} != ()));
Expand Down