diff options
author | Francesco Zardi <[email protected]> | 2020-10-21 20:53:05 +0100 |
---|---|---|
committer | Francesco Zardi <[email protected]> | 2020-10-21 20:53:05 +0100 |
commit | 0be21b05d6811936a22d491f2cea4c7fe244ce2f (patch) | |
tree | e9d82a5ac0cdfcd5bd1e6269785c2083ee589403 /crates/hir_def/src/item_tree/tests.rs | |
parent | f3aa44b01df7dd679adfe3afe55283cfed611508 (diff) |
Move safe intrinsic tests
Diffstat (limited to 'crates/hir_def/src/item_tree/tests.rs')
-rw-r--r-- | crates/hir_def/src/item_tree/tests.rs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/crates/hir_def/src/item_tree/tests.rs b/crates/hir_def/src/item_tree/tests.rs index 495c5a7e9..4b354c4c1 100644 --- a/crates/hir_def/src/item_tree/tests.rs +++ b/crates/hir_def/src/item_tree/tests.rs | |||
@@ -437,23 +437,3 @@ fn assoc_item_macros() { | |||
437 | "#]], | 437 | "#]], |
438 | ); | 438 | ); |
439 | } | 439 | } |
440 | |||
441 | #[test] | ||
442 | fn safe_intrinsic() { | ||
443 | check( | ||
444 | r" | ||
445 | #![feature(core_intrinsics)] | ||
446 | |||
447 | fn reverse(input: u32) -> u32 { | ||
448 | std::intrinsics::bitreverse(input) | ||
449 | } | ||
450 | ", | ||
451 | expect![[r#" | ||
452 | inner attrs: Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("feature"))] }, input: Some(TokenTree(SUBTREE () 0 | ||
453 | IDENT core_intrinsics 1)) }]) } | ||
454 | |||
455 | top-level items: | ||
456 | Function { name: Name(Text("reverse")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, has_body: true, is_unsafe: false, params: [Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("u32"))] }, generic_args: [None] })], is_varargs: false, ret_type: Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("u32"))] }, generic_args: [None] }), ast_id: FileAstId::<syntax::ast::generated::nodes::Fn>(0) } | ||
457 | "#]], | ||
458 | ); | ||
459 | } | ||