From 90331ea0350eaea281d35bd0aa13df7f20a8600d Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Thu, 11 Jun 2020 16:22:31 +0200 Subject: Make known paths use `core` instead of `std` --- crates/ra_ide/src/diagnostics.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'crates/ra_ide/src/diagnostics.rs') diff --git a/crates/ra_ide/src/diagnostics.rs b/crates/ra_ide/src/diagnostics.rs index bf14a467f..0f1cb0bcc 100644 --- a/crates/ra_ide/src/diagnostics.rs +++ b/crates/ra_ide/src/diagnostics.rs @@ -321,7 +321,7 @@ mod tests { fn test_wrap_return_type() { let before = r#" //- /main.rs - use std::{string::String, result::Result::{self, Ok, Err}}; + use core::{string::String, result::Result::{self, Ok, Err}}; fn div(x: i32, y: i32) -> Result { if y == 0 { @@ -330,7 +330,7 @@ mod tests { x / y<|> } - //- /std/lib.rs + //- /core/lib.rs pub mod string { pub struct String { } } @@ -339,7 +339,7 @@ mod tests { } "#; let after = r#" - use std::{string::String, result::Result::{self, Ok, Err}}; + use core::{string::String, result::Result::{self, Ok, Err}}; fn div(x: i32, y: i32) -> Result { if y == 0 { @@ -355,7 +355,7 @@ mod tests { fn test_wrap_return_type_handles_generic_functions() { let before = r#" //- /main.rs - use std::result::Result::{self, Ok, Err}; + use core::result::Result::{self, Ok, Err}; fn div(x: T) -> Result { if x == 0 { @@ -364,13 +364,13 @@ mod tests { <|>x } - //- /std/lib.rs + //- /core/lib.rs pub mod result { pub enum Result { Ok(T), Err(E) } } "#; let after = r#" - use std::result::Result::{self, Ok, Err}; + use core::result::Result::{self, Ok, Err}; fn div(x: T) -> Result { if x == 0 { @@ -386,7 +386,7 @@ mod tests { fn test_wrap_return_type_handles_type_aliases() { let before = r#" //- /main.rs - use std::{string::String, result::Result::{self, Ok, Err}}; + use core::{string::String, result::Result::{self, Ok, Err}}; type MyResult = Result; @@ -397,7 +397,7 @@ mod tests { x <|>/ y } - //- /std/lib.rs + //- /core/lib.rs pub mod string { pub struct String { } } @@ -406,7 +406,7 @@ mod tests { } "#; let after = r#" - use std::{string::String, result::Result::{self, Ok, Err}}; + use core::{string::String, result::Result::{self, Ok, Err}}; type MyResult = Result; fn div(x: i32, y: i32) -> MyResult { -- cgit v1.2.3