From f96c1a0414ee302fe96503d89f2998483345c8a9 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Tue, 1 Jun 2021 13:39:19 +0200 Subject: Implement per-edition preludes --- crates/hir_ty/src/tests/simple.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'crates/hir_ty/src/tests/simple.rs') diff --git a/crates/hir_ty/src/tests/simple.rs b/crates/hir_ty/src/tests/simple.rs index ac312981d..3418ed21e 100644 --- a/crates/hir_ty/src/tests/simple.rs +++ b/crates/hir_ty/src/tests/simple.rs @@ -2712,3 +2712,23 @@ fn main() { "#]], ); } + +#[test] +fn prelude_2015() { + check_types( + r#" +//- /main.rs edition:2015 crate:main deps:core +fn f() { + Rust; + //^ Rust +} + +//- /core.rs crate:core +pub mod prelude { + pub mod rust_2015 { + pub struct Rust; + } +} + "#, + ); +} -- cgit v1.2.3