Skip to content
Myr

Add test of literal in const generic path argument

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Tolnay · committed by David Tolnay · parent 23a7fd5 · Browse files · 1 file+8 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−0 removed

  • tests:+8 added−0 removed

1 file+8 added−0 removed

modified:tests/test_ensure.rs+8 added
322 unmodified lines
323 test,324 "Condition failed: `Chain::<'static>::new.t(1) == 2` (1 vs 2)",325 );326327 fn f<const I: isize>() {}328 let test = || Ok(ensure!(f::<1>() != ()));329 assert_err(test, "Condition failed: `f::<1>() != ()` (() vs ())");330331 fn g<T, const I: isize>() {}332 let test = || Ok(ensure!(g::<u8, 1>() != ()));333 assert_err(test, "Condition failed: `g::<u8, 1>() != ()` (() vs ())");334335 #[derive(PartialOrd, PartialEq, Debug)]336 enum E<'a, T> {337 #[allow(dead_code)]338 T(&'a T),
356 unmodified lines