Skip to content

Commit

Permalink
Merge pull request #213 from dtolnay/fixme
Browse files Browse the repository at this point in the history
Annotate expressions that are rendered poorly by core::stringify
  • Loading branch information
dtolnay committed Dec 23, 2021
2 parents 6e17bdb + 5498d85 commit 42badfd
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 42badfd

Please sign in to comment.