diff options
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r-- | crates/ra_ide/src/diagnostics.rs | 18 |
1 files changed, 9 insertions, 9 deletions
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 { | |||
321 | fn test_wrap_return_type() { | 321 | fn test_wrap_return_type() { |
322 | let before = r#" | 322 | let before = r#" |
323 | //- /main.rs | 323 | //- /main.rs |
324 | use std::{string::String, result::Result::{self, Ok, Err}}; | 324 | use core::{string::String, result::Result::{self, Ok, Err}}; |
325 | 325 | ||
326 | fn div(x: i32, y: i32) -> Result<i32, String> { | 326 | fn div(x: i32, y: i32) -> Result<i32, String> { |
327 | if y == 0 { | 327 | if y == 0 { |
@@ -330,7 +330,7 @@ mod tests { | |||
330 | x / y<|> | 330 | x / y<|> |
331 | } | 331 | } |
332 | 332 | ||
333 | //- /std/lib.rs | 333 | //- /core/lib.rs |
334 | pub mod string { | 334 | pub mod string { |
335 | pub struct String { } | 335 | pub struct String { } |
336 | } | 336 | } |
@@ -339,7 +339,7 @@ mod tests { | |||
339 | } | 339 | } |
340 | "#; | 340 | "#; |
341 | let after = r#" | 341 | let after = r#" |
342 | use std::{string::String, result::Result::{self, Ok, Err}}; | 342 | use core::{string::String, result::Result::{self, Ok, Err}}; |
343 | 343 | ||
344 | fn div(x: i32, y: i32) -> Result<i32, String> { | 344 | fn div(x: i32, y: i32) -> Result<i32, String> { |
345 | if y == 0 { | 345 | if y == 0 { |
@@ -355,7 +355,7 @@ mod tests { | |||
355 | fn test_wrap_return_type_handles_generic_functions() { | 355 | fn test_wrap_return_type_handles_generic_functions() { |
356 | let before = r#" | 356 | let before = r#" |
357 | //- /main.rs | 357 | //- /main.rs |
358 | use std::result::Result::{self, Ok, Err}; | 358 | use core::result::Result::{self, Ok, Err}; |
359 | 359 | ||
360 | fn div<T>(x: T) -> Result<T, i32> { | 360 | fn div<T>(x: T) -> Result<T, i32> { |
361 | if x == 0 { | 361 | if x == 0 { |
@@ -364,13 +364,13 @@ mod tests { | |||
364 | <|>x | 364 | <|>x |
365 | } | 365 | } |
366 | 366 | ||
367 | //- /std/lib.rs | 367 | //- /core/lib.rs |
368 | pub mod result { | 368 | pub mod result { |
369 | pub enum Result<T, E> { Ok(T), Err(E) } | 369 | pub enum Result<T, E> { Ok(T), Err(E) } |
370 | } | 370 | } |
371 | "#; | 371 | "#; |
372 | let after = r#" | 372 | let after = r#" |
373 | use std::result::Result::{self, Ok, Err}; | 373 | use core::result::Result::{self, Ok, Err}; |
374 | 374 | ||
375 | fn div<T>(x: T) -> Result<T, i32> { | 375 | fn div<T>(x: T) -> Result<T, i32> { |
376 | if x == 0 { | 376 | if x == 0 { |
@@ -386,7 +386,7 @@ mod tests { | |||
386 | fn test_wrap_return_type_handles_type_aliases() { | 386 | fn test_wrap_return_type_handles_type_aliases() { |
387 | let before = r#" | 387 | let before = r#" |
388 | //- /main.rs | 388 | //- /main.rs |
389 | use std::{string::String, result::Result::{self, Ok, Err}}; | 389 | use core::{string::String, result::Result::{self, Ok, Err}}; |
390 | 390 | ||
391 | type MyResult<T> = Result<T, String>; | 391 | type MyResult<T> = Result<T, String>; |
392 | 392 | ||
@@ -397,7 +397,7 @@ mod tests { | |||
397 | x <|>/ y | 397 | x <|>/ y |
398 | } | 398 | } |
399 | 399 | ||
400 | //- /std/lib.rs | 400 | //- /core/lib.rs |
401 | pub mod string { | 401 | pub mod string { |
402 | pub struct String { } | 402 | pub struct String { } |
403 | } | 403 | } |
@@ -406,7 +406,7 @@ mod tests { | |||
406 | } | 406 | } |
407 | "#; | 407 | "#; |
408 | let after = r#" | 408 | let after = r#" |
409 | use std::{string::String, result::Result::{self, Ok, Err}}; | 409 | use core::{string::String, result::Result::{self, Ok, Err}}; |
410 | 410 | ||
411 | type MyResult<T> = Result<T, String>; | 411 | type MyResult<T> = Result<T, String>; |
412 | fn div(x: i32, y: i32) -> MyResult<i32> { | 412 | fn div(x: i32, y: i32) -> MyResult<i32> { |