mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
fix: classify safe
as a contextual kw
This commit is contained in:
parent
002f6ad6f1
commit
834ccbffba
5 changed files with 11 additions and 11 deletions
|
@ -554,7 +554,7 @@ fn main() {
|
|||
r#"
|
||||
//- /ed2021.rs crate:ed2021 edition:2021
|
||||
#[rustc_deprecated_safe_2024]
|
||||
unsafe fn safe_fn() -> u8 {
|
||||
unsafe fn safe() -> u8 {
|
||||
0
|
||||
}
|
||||
//- /ed2024.rs crate:ed2024 edition:2024
|
||||
|
@ -564,7 +564,7 @@ unsafe fn not_safe() -> u8 {
|
|||
}
|
||||
//- /main.rs crate:main deps:ed2021,ed2024
|
||||
fn main() {
|
||||
ed2021::safe_fn();
|
||||
ed2021::safe();
|
||||
ed2024::not_safe();
|
||||
//^^^^^^^^^^^^^^^^^^💡 error: this operation is unsafe and requires an unsafe function or block
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue