Restrict access to crate_name.
Also remove original_crate_name, which had the exact same implementation
This commit is contained in:
parent
2f601ef527
commit
0e71283495
19 changed files with 23 additions and 30 deletions
|
@ -6,6 +6,7 @@ use rustc_infer::infer::InferCtxt;
|
|||
use rustc_middle::ty::{self, TraitRef, Ty, TyCtxt, WithConstness};
|
||||
use rustc_middle::ty::{ToPredicate, TypeFoldable};
|
||||
use rustc_session::DiagnosticMessageId;
|
||||
use rustc_span::def_id::LOCAL_CRATE;
|
||||
use rustc_span::Span;
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
|
@ -231,7 +232,8 @@ pub fn report_autoderef_recursion_limit_error<'tcx>(tcx: TyCtxt<'tcx>, span: Spa
|
|||
.span_label(span, "deref recursion limit reached")
|
||||
.help(&format!(
|
||||
"consider adding a `#![recursion_limit=\"{}\"]` attribute to your crate (`{}`)",
|
||||
suggested_limit, tcx.crate_name,
|
||||
suggested_limit,
|
||||
tcx.crate_name(LOCAL_CRATE),
|
||||
))
|
||||
.emit();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue