File: ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (51 lines) | stat: -rw-r--r-- 2,338 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
error: expected a pattern, found an expression
  --> $DIR/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.rs:2:31
   |
LL |     let str::<{fn str() { let str::T>>::as_bytes; }}, T>::as_bytes;
   |                               ^^^^^^^^^^^^^^^^^^ not a pattern
   |
   = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html>

error[E0412]: cannot find type `T` in this scope
  --> $DIR/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.rs:2:55
   |
LL |     let str::<{fn str() { let str::T>>::as_bytes; }}, T>::as_bytes;
   |                                                       ^ not found in this scope

error[E0109]: const and type arguments are not allowed on builtin type `str`
  --> $DIR/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.rs:2:15
   |
LL |     let str::<{fn str() { let str::T>>::as_bytes; }}, T>::as_bytes;
   |         ---   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  ^ const and type arguments not allowed
   |         |
   |         not allowed on builtin type `str`
   |
help: primitive type `str` doesn't have generic parameters
   |
LL -     let str::<{fn str() { let str::T>>::as_bytes; }}, T>::as_bytes;
LL +     let str::as_bytes;
   |

error[E0533]: expected unit struct, unit variant or constant, found associated function `str<{
                  fn str() { let (/*ERROR*/); }
              }, T>::as_bytes`
  --> $DIR/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.rs:2:9
   |
LL |     let str::<{fn str() { let str::T>>::as_bytes; }}, T>::as_bytes;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a unit struct, unit variant or constant

error[E0282]: type annotations needed
  --> $DIR/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.rs:2:31
   |
LL |     let str::<{fn str() { let str::T>>::as_bytes; }}, T>::as_bytes;
   |                               ^^^^^^^^^^^^^^^^^^
   |
help: consider giving this pattern a type
   |
LL |     let str::<{fn str() { let str::T>>::as_bytes: /* Type */; }}, T>::as_bytes;
   |                                                 ++++++++++++

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0109, E0282, E0412, E0533.
For more information about an error, try `rustc --explain E0109`.