🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
A witness of non-exhaustiveness for error reporting, represented
as a list of patterns (in reverse order of construction) with
wildcards inside to represent elements that can take any inhabitant
of the type as a value.
A witness against a list of patterns should have the same types
and length as the pattern matched against. Because Rust match
is always against a single pattern, at the end the witness will
have length 1, but in the middle of the algorithm, it can contain
multiple patterns.
For example, if we are constructing a witness for the match against
struct Pair(Option<(u32, u32)>, bool);
match (p: Pair) {
Pair(None, _) => {}
Pair(_, false) => {}
}
We'll perform the following steps:
- Start with an empty witness
Witness(vec![])
- Push a witness
Some(_)
against the None
Witness(vec![Some(_)])
- Push a witness
true
against the false
Witness(vec![Some(_), true])
- Apply the
Pair
constructor to the witnesses
Witness(vec![Pair(Some(_), true)])
The final Pair(Some(_), true)
is then the resulting witness.
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Constructs a partial witness for a pattern given a list of
patterns expanded by the specialization step.
When a pattern P is discovered to be useful, this function is used bottom-up
to reconstruct a complete witness, e.g. a pattern P' that covers a subset
of values, V, where each value in that set is not covered by any previously
used patterns and is covered by the pattern P'. Examples:
left_ty: tuple of 3 elements
pats: [10, 20, _] => (10, 20, _)
left_ty: struct X { a: (bool, &'static str), b: usize}
pats: [(false, "foo"), 42] => X { a: (false, "foo"), b: 42 }
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S
is the encoder/decoder state type, T
is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?