1
Fork 0

Remove Session.trait_methods_not_found

Instead, avoid registering the problematic well-formed obligation
to begin with. This removes global untracked mutable state,
and avoids potential issues with incremental compilation.
This commit is contained in:
Aaron Hill 2021-08-21 18:45:56 -05:00
parent b6e334d873
commit 41f9f38d6e
No known key found for this signature in database
GPG key ID: B4087E510E98B164
4 changed files with 23 additions and 15 deletions

View file

@ -189,9 +189,6 @@ pub struct Session {
/// Cap lint level specified by a driver specifically.
pub driver_lint_caps: FxHashMap<lint::LintId, lint::Level>,
/// `Span`s of trait methods that weren't found to avoid emitting object safety errors
pub trait_methods_not_found: Lock<FxHashSet<Span>>,
/// Mapping from ident span to path span for paths that don't exist as written, but that
/// exist under `std`. For example, wrote `str::from_utf8` instead of `std::str::from_utf8`.
pub confused_type_with_std_module: Lock<FxHashMap<Span, Span>>,
@ -1353,7 +1350,6 @@ pub fn build_session(
print_fuel,
jobserver: jobserver::client(),
driver_lint_caps,
trait_methods_not_found: Lock::new(Default::default()),
confused_type_with_std_module: Lock::new(Default::default()),
ctfe_backtrace,
miri_unleashed_features: Lock::new(Default::default()),