mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Auto merge of #13866 - Nilstrieb:rustc_safe_intrinsic, r=Veykril
Use `rustc_safe_intrinsic` attribute to check for intrinsic safety Instead of maintaining a list that is poorly kept in sync we can just use the attribute. This will make new RA versions unusable with old toolchains that don't have the attribute yet. Should we keep maintaining the list as a fallback or just don't care?
This commit is contained in:
commit
0d76b94c90
3 changed files with 14 additions and 48 deletions
|
@ -86,6 +86,7 @@ fn main() {
|
|||
check_diagnostics(
|
||||
r#"
|
||||
extern "rust-intrinsic" {
|
||||
#[rustc_safe_intrinsic]
|
||||
pub fn bitreverse(x: u32) -> u32; // Safe intrinsic
|
||||
pub fn floorf32(x: f32) -> f32; // Unsafe intrinsic
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue