Improve safe transmute error reporting
This patch updates the error reporting when Safe Transmute is not possible between 2 types by including the reason. Also, fix some small bugs that occur when computing the `Answer` for transmutability.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use super::query_context::test::{Def, UltraMinimal};
|
||||
use crate::maybe_transmutable::MaybeTransmutableQuery;
|
||||
use crate::{layout, Answer, Reason, Set};
|
||||
use crate::{layout, Answer, Reason};
|
||||
use itertools::Itertools;
|
||||
|
||||
mod bool {
|
||||
@@ -48,9 +48,9 @@ mod bool {
|
||||
|
||||
let into_set = |alts: Vec<_>| {
|
||||
#[cfg(feature = "rustc")]
|
||||
let mut set = Set::default();
|
||||
let mut set = crate::Set::default();
|
||||
#[cfg(not(feature = "rustc"))]
|
||||
let mut set = Set::new();
|
||||
let mut set = std::collections::HashSet::new();
|
||||
set.extend(alts);
|
||||
set
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user