Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
  • Loading branch information
celinval and adpaco-aws committed Nov 28, 2023
1 parent abc6eea commit 930380e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions kani-compiler/src/kani_middle/reachability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ impl<'a, 'tcx> MonoItemsFnCollector<'a, 'tcx> {
let concrete_kind = concrete_ty.kind();
let trait_kind = trait_ty.kind();

assert!(!concrete_kind.is_trait(), "Expected a concrete type, but found: {concrete_ty:?}");
assert!(trait_kind.is_trait(), "Expected a trait: {trait_ty:?}");
assert!(!concrete_kind.is_trait(), "expected a concrete type, but found `{concrete_ty:?}`");
assert!(trait_kind.is_trait(), "expected a trait `{trait_ty:?}`");
if let Some(principal) = trait_kind.trait_principal() {
// A trait object type can have multiple trait bounds but up to one non-auto-trait
// bound. This non-auto-trait, named principal, is the only one that can have methods.
Expand Down
2 changes: 1 addition & 1 deletion kani-compiler/src/kani_middle/stubbing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub fn harness_stub_map(
/// Stubbing may cause an instance to not be correctly instantiated since we delay checking its
/// generic bounds.
///
/// In stable mir, trying to retrieve an Instance::body() will ICE if we cannot evaluate a
/// In stable MIR, trying to retrieve an `Instance::body()` will ICE if we cannot evaluate a
/// constant as expected. For now, use internal APIs to anticipate this issue.
pub fn validate_instance(tcx: TyCtxt, instance: Instance) -> bool {
let internal_instance = rustc_internal::internal(instance);
Expand Down

0 comments on commit 930380e

Please sign in to comment.