about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.stderr
blob: 0ac40c512708df9251c4ae8b5a1e722844af7fc5 (plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
error: `[const]` trait not allowed with `?` trait polarity modifier
  --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:3:39
   |
LL | const fn maybe_const_maybe<T: [const] ?Sized>() {}
   |                               ------- ^
   |                               |
   |                               there is not a well-defined meaning for a `[const] ?` trait

error: `const` trait not allowed with `?` trait polarity modifier
  --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:8:25
   |
LL | fn const_maybe<T: const ?Sized>() {}
   |                   ----- ^
   |                   |
   |                   there is not a well-defined meaning for a `const ?` trait

error: `[const]` trait not allowed with `!` trait polarity modifier
  --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:12:42
   |
LL | const fn maybe_const_negative<T: [const] !Trait>() {}
   |                                  ------- ^
   |                                  |
   |                                  there is not a well-defined meaning for a `[const] !` trait

error: `const` trait not allowed with `!` trait polarity modifier
  --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:16:28
   |
LL | fn const_negative<T: const !Trait>() {}
   |                      ----- ^
   |                      |
   |                      there is not a well-defined meaning for a `const !` trait

error: negative bounds are not supported
  --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:12:42
   |
LL | const fn maybe_const_negative<T: [const] !Trait>() {}
   |                                          ^

error: negative bounds are not supported
  --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:16:28
   |
LL | fn const_negative<T: const !Trait>() {}
   |                            ^

error: `[const]` can only be applied to `const` traits
  --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:3:31
   |
LL | const fn maybe_const_maybe<T: [const] ?Sized>() {}
   |                               ^^^^^^^ can't be applied to `Sized`
   |
note: `Sized` can't be used with `[const]` because it isn't `const`
  --> $SRC_DIR/core/src/marker.rs:LL:COL

error: `[const]` can only be applied to `const` traits
  --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:3:31
   |
LL | const fn maybe_const_maybe<T: [const] ?Sized>() {}
   |                               ^^^^^^^ can't be applied to `Sized`
   |
note: `Sized` can't be used with `[const]` because it isn't `const`
  --> $SRC_DIR/core/src/marker.rs:LL:COL
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `const` can only be applied to `const` traits
  --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:8:19
   |
LL | fn const_maybe<T: const ?Sized>() {}
   |                   ^^^^^ can't be applied to `Sized`
   |
note: `Sized` can't be used with `const` because it isn't `const`
  --> $SRC_DIR/core/src/marker.rs:LL:COL

error: aborting due to 9 previous errors