From 31588aea04aa1240fdc7b5279535f63b9f1681f8 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Sat, 29 May 2021 17:17:08 +0200 Subject: Remove fragment kind knowledge from builtin macros --- crates/hir_ty/src/tests/macros.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'crates/hir_ty/src') diff --git a/crates/hir_ty/src/tests/macros.rs b/crates/hir_ty/src/tests/macros.rs index 6588aa46c..7647bb08b 100644 --- a/crates/hir_ty/src/tests/macros.rs +++ b/crates/hir_ty/src/tests/macros.rs @@ -751,6 +751,24 @@ fn bar() -> u32 {0} ); } +#[test] +fn infer_builtin_macros_include_expression() { + check_types( + r#" +//- /main.rs +#[rustc_builtin_macro] +macro_rules! include {() => {}} +fn main() { + let i = include!("bla.rs"); + i; + //^ i32 +} +//- /bla.rs +0 + "#, + ) +} + #[test] fn infer_builtin_macros_include_child_mod() { check_types( -- cgit v1.2.3