about summary refs log tree commit diff
path: root/tests/ui/methods/issues/issue-94581.stderr
blob: d04d6ca5e3cd39ffb3ea2e1061ef24a320fe0c09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
error[E0599]: no method named `map` found for reference `&'static [i32]` in the current scope
  --> $DIR/issue-94581.rs:7:35
   |
LL |     let _sqsum: i32 = get_slice().map(|i| i * i).sum();
   |                                   ^^^ `&'static [i32]` is not an iterator
   |
help: call `.into_iter()` first
   |
LL |     let _sqsum: i32 = get_slice().into_iter().map(|i| i * i).sum();
   |                                   ++++++++++++

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.