From 41f9f38d6e19c669a14432b9ec56f26425c6c9e2 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Sat, 21 Aug 2021 18:45:56 -0500 Subject: 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. --- compiler/rustc_session/src/session.rs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'compiler/rustc_session/src') diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index 5b163603d5f..fabdebfb212 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -189,9 +189,6 @@ pub struct Session { /// Cap lint level specified by a driver specifically. pub driver_lint_caps: FxHashMap, - /// `Span`s of trait methods that weren't found to avoid emitting object safety errors - pub trait_methods_not_found: Lock>, - /// 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>, @@ -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()), -- cgit 1.4.1-3-g733a5