1
Fork 0

Rollup merge of #125990 - tbu-:pr_unsafe_env_lint_name, r=ehuss

Rename `deprecated_safe` lint to `deprecated_safe_2024`

Create a lint group `deprecated_safe` that includes `deprecated_safe_2024`.

Addresses https://github.com/rust-lang/rust/issues/124866#issuecomment-2142814375.

r? `@ehuss`
This commit is contained in:
Trevor Gross 2024-07-22 11:40:19 -05:00 committed by GitHub
commit 81135a015f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 15 additions and 12 deletions

View file

@ -10,7 +10,7 @@ use rustc_middle::thir::visit::Visitor;
use rustc_middle::thir::*;
use rustc_middle::ty::print::with_no_trimmed_paths;
use rustc_middle::ty::{self, ParamEnv, Ty, TyCtxt};
use rustc_session::lint::builtin::{DEPRECATED_SAFE, UNSAFE_OP_IN_UNSAFE_FN, UNUSED_UNSAFE};
use rustc_session::lint::builtin::{DEPRECATED_SAFE_2024, UNSAFE_OP_IN_UNSAFE_FN, UNUSED_UNSAFE};
use rustc_session::lint::Level;
use rustc_span::def_id::{DefId, LocalDefId};
use rustc_span::symbol::Symbol;
@ -99,7 +99,7 @@ impl<'tcx> UnsafetyVisitor<'_, 'tcx> {
{
let sm = self.tcx.sess.source_map();
self.tcx.emit_node_span_lint(
DEPRECATED_SAFE,
DEPRECATED_SAFE_2024,
self.hir_context,
span,
CallToDeprecatedSafeFnRequiresUnsafe {