aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_assists/src/tests
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-03-12 14:41:08 +0000
committerLukas Wirth <[email protected]>2021-03-12 14:42:53 +0000
commit6d35c67b6e39fae1efc48405b49d408b86666534 (patch)
tree2ae7bb8f1c4073ccc03cd5d863c730e30385cd9a /crates/ide_assists/src/tests
parente505752442f849c7d37465f0e0b6aa042644787b (diff)
Fix convert_iter_for_each_to_for doctest
Diffstat (limited to 'crates/ide_assists/src/tests')
-rw-r--r--crates/ide_assists/src/tests/generated.rs15
1 files changed, 11 insertions, 4 deletions
diff --git a/crates/ide_assists/src/tests/generated.rs b/crates/ide_assists/src/tests/generated.rs
index af513ca22..3f77edd8d 100644
--- a/crates/ide_assists/src/tests/generated.rs
+++ b/crates/ide_assists/src/tests/generated.rs
@@ -210,17 +210,24 @@ fn doctest_convert_iter_for_each_to_for() {
210 check_doc_test( 210 check_doc_test(
211 "convert_iter_for_each_to_for", 211 "convert_iter_for_each_to_for",
212 r#####" 212 r#####"
213//- /lib.rs crate:core
214pub mod iter { pub mod traits { pub mod iterator { pub trait Iterator {} } } }
215pub struct SomeIter;
216impl self::iter::traits::iterator::Iterator for SomeIter {}
217//- /lib.rs crate:main deps:core
218use core::SomeIter;
213fn main() { 219fn main() {
214 let vec = vec![(1, 2), (2, 3), (3, 4)]; 220 let iter = SomeIter;
215 x.iter().for_each(|(x, y)| { 221 iter.for_each$0(|(x, y)| {
216 println!("x: {}, y: {}", x, y); 222 println!("x: {}, y: {}", x, y);
217 }); 223 });
218} 224}
219"#####, 225"#####,
220 r#####" 226 r#####"
227use core::SomeIter;
221fn main() { 228fn main() {
222 let vec = vec![(1, 2), (2, 3), (3, 4)]; 229 let iter = SomeIter;
223 for (x, y) in x.iter() { 230 for (x, y) in iter {
224 println!("x: {}, y: {}", x, y); 231 println!("x: {}, y: {}", x, y);
225 } 232 }
226} 233}