|
| 1 | +error[E0423]: expected function, tuple struct or tuple variant, found struct `std::collections::HashMap` |
| 2 | + --> $DIR/multi-suggestion.rs:17:13 |
| 3 | + | |
| 4 | +LL | let _ = std::collections::HashMap(); |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 6 | + --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL |
| 7 | + | |
| 8 | + = note: `std::collections::HashMap` defined here |
| 9 | + | |
| 10 | +help: you might have meant to use an associated function to build this type |
| 11 | + | |
| 12 | +LL | let _ = std::collections::HashMap::new(); |
| 13 | + | +++++ |
| 14 | +LL - let _ = std::collections::HashMap(); |
| 15 | +LL + let _ = std::collections::HashMap::with_capacity(_); |
| 16 | + | |
| 17 | +LL - let _ = std::collections::HashMap(); |
| 18 | +LL + let _ = std::collections::HashMap::with_hasher(_); |
| 19 | + | |
| 20 | +LL - let _ = std::collections::HashMap(); |
| 21 | +LL + let _ = std::collections::HashMap::with_capacity_and_hasher(_, _); |
| 22 | + | |
| 23 | +help: consider using the `Default` trait |
| 24 | + | |
| 25 | +LL | let _ = <std::collections::HashMap as std::default::Default>::default(); |
| 26 | + | + ++++++++++++++++++++++++++++++++++ |
| 27 | + |
| 28 | +error[E0423]: cannot initialize a tuple struct which contains private fields |
| 29 | + --> $DIR/multi-suggestion.rs:11:19 |
| 30 | + | |
| 31 | +LL | wtf: Some(Box(U { |
| 32 | + | ^^^ |
| 33 | + | |
| 34 | +note: constructor is not visible here due to private fields |
| 35 | + --> $SRC_DIR/alloc/src/boxed.rs:LL:COL |
| 36 | + | |
| 37 | + = note: private field |
| 38 | + | |
| 39 | + = note: private field |
| 40 | +help: you might have meant to use an associated function to build this type |
| 41 | + | |
| 42 | +LL - wtf: Some(Box(U { |
| 43 | +LL - wtf: None, |
| 44 | +LL - x: (), |
| 45 | +LL - })), |
| 46 | +LL + wtf: Some(Box::new(_)), |
| 47 | + | |
| 48 | +LL - wtf: Some(Box(U { |
| 49 | +LL - wtf: None, |
| 50 | +LL - x: (), |
| 51 | +LL - })), |
| 52 | +LL + wtf: Some(Box::new_uninit()), |
| 53 | + | |
| 54 | +LL - wtf: Some(Box(U { |
| 55 | +LL - wtf: None, |
| 56 | +LL - x: (), |
| 57 | +LL - })), |
| 58 | +LL + wtf: Some(Box::new_zeroed()), |
| 59 | + | |
| 60 | +LL - wtf: Some(Box(U { |
| 61 | +LL - wtf: None, |
| 62 | +LL - x: (), |
| 63 | +LL - })), |
| 64 | +LL + wtf: Some(Box::new_in(_, _)), |
| 65 | + | |
| 66 | + and 12 other candidates |
| 67 | +help: consider using the `Default` trait |
| 68 | + | |
| 69 | +LL - wtf: Some(Box(U { |
| 70 | +LL + wtf: Some(<Box as std::default::Default>::default()), |
| 71 | + | |
| 72 | + |
| 73 | +error: cannot construct `HashMap<_, _, _>` with struct literal syntax due to private fields |
| 74 | + --> $DIR/multi-suggestion.rs:19:13 |
| 75 | + | |
| 76 | +LL | let _ = std::collections::HashMap {}; |
| 77 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 78 | + | |
| 79 | + = note: private field `base` that was not provided |
| 80 | +help: you might have meant to use an associated function to build this type |
| 81 | + | |
| 82 | +LL - let _ = std::collections::HashMap {}; |
| 83 | +LL + let _ = std::collections::HashMap::new(); |
| 84 | + | |
| 85 | +LL - let _ = std::collections::HashMap {}; |
| 86 | +LL + let _ = std::collections::HashMap::with_capacity(_); |
| 87 | + | |
| 88 | +LL - let _ = std::collections::HashMap {}; |
| 89 | +LL + let _ = std::collections::HashMap::with_hasher(_); |
| 90 | + | |
| 91 | +LL - let _ = std::collections::HashMap {}; |
| 92 | +LL + let _ = std::collections::HashMap::with_capacity_and_hasher(_, _); |
| 93 | + | |
| 94 | +help: consider using the `Default` trait |
| 95 | + | |
| 96 | +LL - let _ = std::collections::HashMap {}; |
| 97 | +LL + let _ = <std::collections::HashMap as std::default::Default>::default(); |
| 98 | + | |
| 99 | + |
| 100 | +error: cannot construct `Box<_, _>` with struct literal syntax due to private fields |
| 101 | + --> $DIR/multi-suggestion.rs:21:13 |
| 102 | + | |
| 103 | +LL | let _ = Box {}; |
| 104 | + | ^^^ |
| 105 | + | |
| 106 | + = note: private fields `0` and `1` that were not provided |
| 107 | +help: you might have meant to use an associated function to build this type |
| 108 | + | |
| 109 | +LL - let _ = Box {}; |
| 110 | +LL + let _ = Box::new(_); |
| 111 | + | |
| 112 | +LL - let _ = Box {}; |
| 113 | +LL + let _ = Box::new_uninit(); |
| 114 | + | |
| 115 | +LL - let _ = Box {}; |
| 116 | +LL + let _ = Box::new_zeroed(); |
| 117 | + | |
| 118 | +LL - let _ = Box {}; |
| 119 | +LL + let _ = Box::new_in(_, _); |
| 120 | + | |
| 121 | + and 12 other candidates |
| 122 | +help: consider using the `Default` trait |
| 123 | + | |
| 124 | +LL - let _ = Box {}; |
| 125 | +LL + let _ = <Box as std::default::Default>::default(); |
| 126 | + | |
| 127 | + |
| 128 | +error: aborting due to 4 previous errors |
| 129 | + |
| 130 | +For more information about this error, try `rustc --explain E0423`. |
0 commit comments