fork/rust
git clone https://git.julia.blue/fork/rust
5e1a799842b
1.41.0
1error[E0423]: expected value, found enum `n::Z` 2 --> $DIR/privacy-enum-ctor.rs:23:9 3 | 4LL | n::Z; 5 | ^^^^ 6 | 7help: try using one of the enum's variants 8 | 9LL | m::Z::Fn; 10 | ^^^^^^^^ 11LL | m::Z::Struct; 12 | ^^^^^^^^^^^^ 13LL | m::Z::Unit; 14 | ^^^^^^^^^^ 15 16error[E0423]: expected value, found enum `Z` 17 --> $DIR/privacy-enum-ctor.rs:25:9 18 | 19LL | / fn f() { 20LL | | n::Z; 21LL | | 22LL | | Z; 23 | | ^ 24... | 25LL | | // This is ok, it is equivalent to not having braces 26LL | | } 27 | |_____- similarly named function `f` defined here 28 | 29help: a function with a similar name exists 30 | 31LL | f; 32 | ^ 33help: try using one of the enum's variants 34 | 35LL | m::Z::Fn; 36 | ^^^^^^^^ 37LL | m::Z::Struct; 38 | ^^^^^^^^^^^^ 39LL | m::Z::Unit; 40 | ^^^^^^^^^^ 41 42error[E0423]: expected value, found struct variant `Z::Struct` 43 --> $DIR/privacy-enum-ctor.rs:29:20 44 | 45LL | / Struct { 46LL | | s: u8, 47LL | | }, 48 | |_____________- `Z::Struct` defined here 49... 50LL | let _: Z = Z::Struct; 51 | ^^^^^^^^^ did you mean `Z::Struct { /* fields */ }`? 52 53error[E0423]: expected value, found enum `m::E` 54 --> $DIR/privacy-enum-ctor.rs:41:16 55 | 56LL | / fn f() { 57LL | | n::Z; 58LL | | 59LL | | Z; 60... | 61LL | | // This is ok, it is equivalent to not having braces 62LL | | } 63 | |_____- similarly named function `f` defined here 64... 65LL | let _: E = m::E; 66 | ^^^^ 67 | 68help: a function with a similar name exists 69 | 70LL | let _: E = m::f; 71 | ^ 72help: try using one of the enum's variants 73 | 74LL | let _: E = E::Fn; 75 | ^^^^^ 76LL | let _: E = E::Struct; 77 | ^^^^^^^^^ 78LL | let _: E = E::Unit; 79 | ^^^^^^^ 80help: possible better candidates are found in other modules, you can import them into scope 81 | 82LL | use std::f32::consts::E; 83 | 84LL | use std::f64::consts::E; 85 | 86 87error[E0423]: expected value, found struct variant `m::E::Struct` 88 --> $DIR/privacy-enum-ctor.rs:45:16 89 | 90LL | / Struct { 91LL | | s: u8, 92LL | | }, 93 | |_________- `m::E::Struct` defined here 94... 95LL | let _: E = m::E::Struct; 96 | ^^^^^^^^^^^^ did you mean `m::E::Struct { /* fields */ }`? 97 98error[E0423]: expected value, found enum `E` 99 --> $DIR/privacy-enum-ctor.rs:49:16 100 | 101LL | let _: E = E; 102 | ^ 103 | 104help: try using one of the enum's variants 105 | 106LL | let _: E = E::Fn; 107 | ^^^^^ 108LL | let _: E = E::Struct; 109 | ^^^^^^^^^ 110LL | let _: E = E::Unit; 111 | ^^^^^^^ 112help: possible better candidates are found in other modules, you can import them into scope 113 | 114LL | use std::f32::consts::E; 115 | 116LL | use std::f64::consts::E; 117 | 118 119error[E0423]: expected value, found struct variant `E::Struct` 120 --> $DIR/privacy-enum-ctor.rs:53:16 121 | 122LL | / Struct { 123LL | | s: u8, 124LL | | }, 125 | |_________- `E::Struct` defined here 126... 127LL | let _: E = E::Struct; 128 | ^^^^^^^^^ did you mean `E::Struct { /* fields */ }`? 129 130error[E0412]: cannot find type `Z` in this scope 131 --> $DIR/privacy-enum-ctor.rs:57:12 132 | 133LL | / pub enum E { 134LL | | Fn(u8), 135LL | | Struct { 136LL | | s: u8, 137LL | | }, 138LL | | Unit, 139LL | | } 140 | |_____- similarly named enum `E` defined here 141... 142LL | let _: Z = m::n::Z; 143 | ^ 144 | 145help: an enum with a similar name exists 146 | 147LL | let _: E = m::n::Z; 148 | ^ 149help: possible candidate is found in another module, you can import it into scope 150 | 151LL | use m::n::Z; 152 | 153 154error[E0423]: expected value, found enum `m::n::Z` 155 --> $DIR/privacy-enum-ctor.rs:57:16 156 | 157LL | let _: Z = m::n::Z; 158 | ^^^^^^^ 159 | 160help: try using one of the enum's variants 161 | 162LL | let _: Z = m::Z::Fn; 163 | ^^^^^^^^ 164LL | let _: Z = m::Z::Struct; 165 | ^^^^^^^^^^^^ 166LL | let _: Z = m::Z::Unit; 167 | ^^^^^^^^^^ 168 169error[E0412]: cannot find type `Z` in this scope 170 --> $DIR/privacy-enum-ctor.rs:61:12 171 | 172LL | / pub enum E { 173LL | | Fn(u8), 174LL | | Struct { 175LL | | s: u8, 176LL | | }, 177LL | | Unit, 178LL | | } 179 | |_____- similarly named enum `E` defined here 180... 181LL | let _: Z = m::n::Z::Fn; 182 | ^ 183 | 184help: an enum with a similar name exists 185 | 186LL | let _: E = m::n::Z::Fn; 187 | ^ 188help: possible candidate is found in another module, you can import it into scope 189 | 190LL | use m::n::Z; 191 | 192 193error[E0412]: cannot find type `Z` in this scope 194 --> $DIR/privacy-enum-ctor.rs:64:12 195 | 196LL | / pub enum E { 197LL | | Fn(u8), 198LL | | Struct { 199LL | | s: u8, 200LL | | }, 201LL | | Unit, 202LL | | } 203 | |_____- similarly named enum `E` defined here 204... 205LL | let _: Z = m::n::Z::Struct; 206 | ^ 207 | 208help: an enum with a similar name exists 209 | 210LL | let _: E = m::n::Z::Struct; 211 | ^ 212help: possible candidate is found in another module, you can import it into scope 213 | 214LL | use m::n::Z; 215 | 216 217error[E0423]: expected value, found struct variant `m::n::Z::Struct` 218 --> $DIR/privacy-enum-ctor.rs:64:16 219 | 220LL | / Struct { 221LL | | s: u8, 222LL | | }, 223 | |_____________- `m::n::Z::Struct` defined here 224... 225LL | let _: Z = m::n::Z::Struct; 226 | ^^^^^^^^^^^^^^^ did you mean `m::n::Z::Struct { /* fields */ }`? 227 228error[E0412]: cannot find type `Z` in this scope 229 --> $DIR/privacy-enum-ctor.rs:68:12 230 | 231LL | / pub enum E { 232LL | | Fn(u8), 233LL | | Struct { 234LL | | s: u8, 235LL | | }, 236LL | | Unit, 237LL | | } 238 | |_____- similarly named enum `E` defined here 239... 240LL | let _: Z = m::n::Z::Unit {}; 241 | ^ 242 | 243help: an enum with a similar name exists 244 | 245LL | let _: E = m::n::Z::Unit {}; 246 | ^ 247help: possible candidate is found in another module, you can import it into scope 248 | 249LL | use m::n::Z; 250 | 251 252error[E0603]: enum `Z` is private 253 --> $DIR/privacy-enum-ctor.rs:57:22 254 | 255LL | let _: Z = m::n::Z; 256 | ^ 257 258error[E0603]: enum `Z` is private 259 --> $DIR/privacy-enum-ctor.rs:61:22 260 | 261LL | let _: Z = m::n::Z::Fn; 262 | ^ 263 264error[E0603]: enum `Z` is private 265 --> $DIR/privacy-enum-ctor.rs:64:22 266 | 267LL | let _: Z = m::n::Z::Struct; 268 | ^ 269 270error[E0603]: enum `Z` is private 271 --> $DIR/privacy-enum-ctor.rs:68:22 272 | 273LL | let _: Z = m::n::Z::Unit {}; 274 | ^ 275 276error[E0308]: mismatched types 277 --> $DIR/privacy-enum-ctor.rs:27:20 278 | 279LL | Fn(u8), 280 | ------ fn(u8) -> m::n::Z {m::n::Z::Fn} defined here 281... 282LL | let _: Z = Z::Fn; 283 | - ^^^^^ 284 | | | 285 | | expected enum `m::n::Z`, found fn item 286 | | help: use parentheses to instantiate this tuple variant: `Z::Fn(_)` 287 | expected due to this 288 | 289 = note: expected enum `m::n::Z` 290 found fn item `fn(u8) -> m::n::Z {m::n::Z::Fn}` 291 292error[E0618]: expected function, found enum variant `Z::Unit` 293 --> $DIR/privacy-enum-ctor.rs:31:17 294 | 295LL | Unit, 296 | ---- `Z::Unit` defined here 297... 298LL | let _ = Z::Unit(); 299 | ^^^^^^^-- 300 | | 301 | call expression requires function 302 | 303help: `Z::Unit` is a unit variant, you need to write it without the parenthesis 304 | 305LL | let _ = Z::Unit; 306 | ^^^^^^^ 307 308error[E0308]: mismatched types 309 --> $DIR/privacy-enum-ctor.rs:43:16 310 | 311LL | Fn(u8), 312 | ------ fn(u8) -> m::E {m::E::Fn} defined here 313... 314LL | let _: E = m::E::Fn; 315 | - ^^^^^^^^ 316 | | | 317 | | expected enum `m::E`, found fn item 318 | | help: use parentheses to instantiate this tuple variant: `m::E::Fn(_)` 319 | expected due to this 320 | 321 = note: expected enum `m::E` 322 found fn item `fn(u8) -> m::E {m::E::Fn}` 323 324error[E0618]: expected function, found enum variant `m::E::Unit` 325 --> $DIR/privacy-enum-ctor.rs:47:16 326 | 327LL | Unit, 328 | ---- `m::E::Unit` defined here 329... 330LL | let _: E = m::E::Unit(); 331 | ^^^^^^^^^^-- 332 | | 333 | call expression requires function 334 | 335help: `m::E::Unit` is a unit variant, you need to write it without the parenthesis 336 | 337LL | let _: E = m::E::Unit; 338 | ^^^^^^^^^^ 339 340error[E0308]: mismatched types 341 --> $DIR/privacy-enum-ctor.rs:51:16 342 | 343LL | Fn(u8), 344 | ------ fn(u8) -> m::E {m::E::Fn} defined here 345... 346LL | let _: E = E::Fn; 347 | - ^^^^^ 348 | | | 349 | | expected enum `m::E`, found fn item 350 | | help: use parentheses to instantiate this tuple variant: `E::Fn(_)` 351 | expected due to this 352 | 353 = note: expected enum `m::E` 354 found fn item `fn(u8) -> m::E {m::E::Fn}` 355 356error[E0618]: expected function, found enum variant `E::Unit` 357 --> $DIR/privacy-enum-ctor.rs:55:16 358 | 359LL | Unit, 360 | ---- `E::Unit` defined here 361... 362LL | let _: E = E::Unit(); 363 | ^^^^^^^-- 364 | | 365 | call expression requires function 366 | 367help: `E::Unit` is a unit variant, you need to write it without the parenthesis 368 | 369LL | let _: E = E::Unit; 370 | ^^^^^^^ 371 372error: aborting due to 23 previous errors 373 374Some errors have detailed explanations: E0308, E0412, E0423, E0603, E0618. 375For more information about an error, try `rustc --explain E0308`.