@@ -7,40 +7,68 @@ LL | const fn maybe_const_maybe<T: [const] ?Sized>() {}
77 | there is not a well-defined meaning for a `[const] ?` trait
88
99error: `const` trait not allowed with `?` trait polarity modifier
10- --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:6 :25
10+ --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:8 :25
1111 |
1212LL | fn const_maybe<T: const ?Sized>() {}
1313 | ----- ^
1414 | |
1515 | there is not a well-defined meaning for a `const ?` trait
1616
1717error: `[const]` trait not allowed with `!` trait polarity modifier
18- --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:9 :42
18+ --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:12 :42
1919 |
2020LL | const fn maybe_const_negative<T: [const] !Trait>() {}
2121 | ------- ^
2222 | |
2323 | there is not a well-defined meaning for a `[const] !` trait
2424
2525error: `const` trait not allowed with `!` trait polarity modifier
26- --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:13 :28
26+ --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:16 :28
2727 |
2828LL | fn const_negative<T: const !Trait>() {}
2929 | ----- ^
3030 | |
3131 | there is not a well-defined meaning for a `const !` trait
3232
3333error: negative bounds are not supported
34- --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:9 :42
34+ --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:12 :42
3535 |
3636LL | const fn maybe_const_negative<T: [const] !Trait>() {}
3737 | ^
3838
3939error: negative bounds are not supported
40- --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:13 :28
40+ --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:16 :28
4141 |
4242LL | fn const_negative<T: const !Trait>() {}
4343 | ^
4444
45- error: aborting due to 6 previous errors
45+ error: `[const]` can only be applied to `#[const_trait]` traits
46+ --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:3:31
47+ |
48+ LL | const fn maybe_const_maybe<T: [const] ?Sized>() {}
49+ | ^^^^^^^ can't be applied to `Sized`
50+ |
51+ note: `Sized` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
52+ --> $SRC_DIR/core/src/marker.rs:LL:COL
53+
54+ error: `[const]` can only be applied to `#[const_trait]` traits
55+ --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:3:31
56+ |
57+ LL | const fn maybe_const_maybe<T: [const] ?Sized>() {}
58+ | ^^^^^^^ can't be applied to `Sized`
59+ |
60+ note: `Sized` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
61+ --> $SRC_DIR/core/src/marker.rs:LL:COL
62+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
63+
64+ error: `const` can only be applied to `#[const_trait]` traits
65+ --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:8:19
66+ |
67+ LL | fn const_maybe<T: const ?Sized>() {}
68+ | ^^^^^ can't be applied to `Sized`
69+ |
70+ note: `Sized` can't be used with `const` because it isn't annotated with `#[const_trait]`
71+ --> $SRC_DIR/core/src/marker.rs:LL:COL
72+
73+ error: aborting due to 9 previous errors
4674
0 commit comments