rustc_session: implement latent TODO
This commit is contained in:
parent
45bad64ab4
commit
55393b6eca
4 changed files with 10 additions and 7 deletions
|
@ -36,7 +36,7 @@ use rustc_middle::ty::{self, print::Printer, GenericArg, RegisteredTools, Ty, Ty
|
|||
use rustc_session::config::ExpectedValues;
|
||||
use rustc_session::lint::{BuiltinLintDiagnostics, LintExpectationId};
|
||||
use rustc_session::lint::{FutureIncompatibleInfo, Level, Lint, LintBuffer, LintId};
|
||||
use rustc_session::Session;
|
||||
use rustc_session::{LintStoreMarker, Session};
|
||||
use rustc_span::edit_distance::find_best_match_for_name;
|
||||
use rustc_span::symbol::{sym, Ident, Symbol};
|
||||
use rustc_span::{BytePos, Span};
|
||||
|
@ -77,6 +77,8 @@ pub struct LintStore {
|
|||
lint_groups: FxHashMap<&'static str, LintGroup>,
|
||||
}
|
||||
|
||||
impl LintStoreMarker for LintStore {}
|
||||
|
||||
/// The target of the `by_name` map, which accounts for renaming/deprecation.
|
||||
#[derive(Debug)]
|
||||
enum TargetLint {
|
||||
|
|
|
@ -30,8 +30,9 @@ use rustc_span::Span;
|
|||
use std::any::Any;
|
||||
use std::cell::Cell;
|
||||
|
||||
/// Extract the `LintStore` from the query context.
|
||||
/// This function exists because we've erased `LintStore` as `dyn Any` in the session.
|
||||
/// Extract the [`LintStore`] from [`Session`].
|
||||
///
|
||||
/// This function exists because [`Session::lint_store`] is type-erased.
|
||||
pub fn unerased_lint_store(sess: &Session) -> &LintStore {
|
||||
let store: &Lrc<_> = sess.lint_store.as_ref().unwrap();
|
||||
let store: &dyn Any = &**store;
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#![feature(min_specialization)]
|
||||
#![feature(never_type)]
|
||||
#![feature(rustc_attrs)]
|
||||
#![cfg_attr(bootstrap, feature(trait_upcasting))]
|
||||
#![recursion_limit = "256"]
|
||||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
#![deny(rustc::diagnostic_outside_of_impl)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue