1
Fork 0

Auto merge of #99324 - reez12g:issue-99144, r=jyn514

Enable doctests in compiler/ crates

Helps with https://github.com/rust-lang/rust/issues/99144
This commit is contained in:
bors 2022-10-06 03:01:57 +00:00
commit 0152393048
36 changed files with 16 additions and 40 deletions

View file

@ -4,7 +4,6 @@ version = "0.0.0"
edition = "2021"
[lib]
doctest = false
[dependencies]
tracing = "0.1"

View file

@ -56,7 +56,7 @@ macro_rules! throw_validation_failure {
/// This lets you use the patterns as a kind of validation list, asserting which errors
/// can possibly happen:
///
/// ```
/// ```ignore(illustrative)
/// let v = try_validation!(some_fn(), some_path, {
/// Foo | Bar | Baz => { "some failure" },
/// });
@ -65,7 +65,7 @@ macro_rules! throw_validation_failure {
/// The patterns must be of type `UndefinedBehaviorInfo`.
/// An additional expected parameter can also be added to the failure message:
///
/// ```
/// ```ignore(illustrative)
/// let v = try_validation!(some_fn(), some_path, {
/// Foo | Bar | Baz => { "some failure" } expected { "something that wasn't a failure" },
/// });
@ -74,7 +74,7 @@ macro_rules! throw_validation_failure {
/// An additional nicety is that both parameters actually take format args, so you can just write
/// the format string in directly:
///
/// ```
/// ```ignore(illustrative)
/// let v = try_validation!(some_fn(), some_path, {
/// Foo | Bar | Baz => { "{:?}", some_failure } expected { "{}", expected_value },
/// });