Rollup merge of #78963 - richkadel:llvm-coverage-counters-2.0.4, r=tmandry
Added some unit tests as requested As discussed in PR #78267, for example: * https://github.com/rust-lang/rust/pull/78267#discussion_r515404722 * https://github.com/rust-lang/rust/pull/78267#discussion_r515405958 r? ```````@tmandry``````` FYI: ```````@wesleywiser``````` This is pretty much self contained, but depending on feedback and timing, I may have a chance to add a few more unit tests requested against `counters.rs`. I'm looking at those now.
This commit is contained in:
commit
335a2554f9
11 changed files with 788 additions and 25 deletions
|
@ -611,6 +611,18 @@ pub struct TyS<'tcx> {
|
|||
outer_exclusive_binder: ty::DebruijnIndex,
|
||||
}
|
||||
|
||||
impl<'tcx> TyS<'tcx> {
|
||||
/// A constructor used only for internal testing.
|
||||
#[allow(rustc::usage_of_ty_tykind)]
|
||||
pub fn make_for_test(
|
||||
kind: TyKind<'tcx>,
|
||||
flags: TypeFlags,
|
||||
outer_exclusive_binder: ty::DebruijnIndex,
|
||||
) -> TyS<'tcx> {
|
||||
TyS { kind, flags, outer_exclusive_binder }
|
||||
}
|
||||
}
|
||||
|
||||
// `TyS` is used a lot. Make sure it doesn't unintentionally get bigger.
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
static_assert_size!(TyS<'_>, 32);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue