Rollup merge of #143171 - fmease:fix-span-of-maybe-const-mod, r=compiler-errors
Fix the span of trait bound modifier `[const]` r? project-const-traits or anyone
This commit is contained in:
@@ -1071,7 +1071,7 @@ impl<'a> Parser<'a> {
|
|||||||
&& self.look_ahead(1, |t| t.is_keyword(kw::Const))
|
&& self.look_ahead(1, |t| t.is_keyword(kw::Const))
|
||||||
&& self.look_ahead(2, |t| *t == token::CloseBracket)
|
&& self.look_ahead(2, |t| *t == token::CloseBracket)
|
||||||
{
|
{
|
||||||
let start = self.prev_token.span;
|
let start = self.token.span;
|
||||||
self.bump();
|
self.bump();
|
||||||
self.expect_keyword(exp!(Const)).unwrap();
|
self.expect_keyword(exp!(Const)).unwrap();
|
||||||
self.bump();
|
self.bump();
|
||||||
|
|||||||
@@ -5,145 +5,145 @@ LL | #![feature(const_fn_trait_ref_impls)]
|
|||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/fn_trait_refs.rs:14:6
|
--> $DIR/fn_trait_refs.rs:14:8
|
||||||
|
|
|
|
||||||
LL | T: [const] Fn<()> + [const] Destruct,
|
LL | T: [const] Fn<()> + [const] Destruct,
|
||||||
| ^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/fn_trait_refs.rs:14:6
|
--> $DIR/fn_trait_refs.rs:14:8
|
||||||
|
|
|
|
||||||
LL | T: [const] Fn<()> + [const] Destruct,
|
LL | T: [const] Fn<()> + [const] Destruct,
|
||||||
| ^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/fn_trait_refs.rs:14:6
|
--> $DIR/fn_trait_refs.rs:14:8
|
||||||
|
|
|
|
||||||
LL | T: [const] Fn<()> + [const] Destruct,
|
LL | T: [const] Fn<()> + [const] Destruct,
|
||||||
| ^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/fn_trait_refs.rs:21:6
|
--> $DIR/fn_trait_refs.rs:21:8
|
||||||
|
|
|
|
||||||
LL | T: [const] FnMut<()> + [const] Destruct,
|
LL | T: [const] FnMut<()> + [const] Destruct,
|
||||||
| ^^^^^^^^^ can't be applied to `FnMut`
|
| ^^^^^^^ can't be applied to `FnMut`
|
||||||
|
|
|
|
||||||
note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/fn_trait_refs.rs:21:6
|
--> $DIR/fn_trait_refs.rs:21:8
|
||||||
|
|
|
|
||||||
LL | T: [const] FnMut<()> + [const] Destruct,
|
LL | T: [const] FnMut<()> + [const] Destruct,
|
||||||
| ^^^^^^^^^ can't be applied to `FnMut`
|
| ^^^^^^^ can't be applied to `FnMut`
|
||||||
|
|
|
|
||||||
note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/fn_trait_refs.rs:21:6
|
--> $DIR/fn_trait_refs.rs:21:8
|
||||||
|
|
|
|
||||||
LL | T: [const] FnMut<()> + [const] Destruct,
|
LL | T: [const] FnMut<()> + [const] Destruct,
|
||||||
| ^^^^^^^^^ can't be applied to `FnMut`
|
| ^^^^^^^ can't be applied to `FnMut`
|
||||||
|
|
|
|
||||||
note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/fn_trait_refs.rs:28:6
|
--> $DIR/fn_trait_refs.rs:28:8
|
||||||
|
|
|
|
||||||
LL | T: [const] FnOnce<()>,
|
LL | T: [const] FnOnce<()>,
|
||||||
| ^^^^^^^^^ can't be applied to `FnOnce`
|
| ^^^^^^^ can't be applied to `FnOnce`
|
||||||
|
|
|
|
||||||
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/fn_trait_refs.rs:28:6
|
--> $DIR/fn_trait_refs.rs:28:8
|
||||||
|
|
|
|
||||||
LL | T: [const] FnOnce<()>,
|
LL | T: [const] FnOnce<()>,
|
||||||
| ^^^^^^^^^ can't be applied to `FnOnce`
|
| ^^^^^^^ can't be applied to `FnOnce`
|
||||||
|
|
|
|
||||||
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/fn_trait_refs.rs:28:6
|
--> $DIR/fn_trait_refs.rs:28:8
|
||||||
|
|
|
|
||||||
LL | T: [const] FnOnce<()>,
|
LL | T: [const] FnOnce<()>,
|
||||||
| ^^^^^^^^^ can't be applied to `FnOnce`
|
| ^^^^^^^ can't be applied to `FnOnce`
|
||||||
|
|
|
|
||||||
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/fn_trait_refs.rs:35:6
|
--> $DIR/fn_trait_refs.rs:35:8
|
||||||
|
|
|
|
||||||
LL | T: [const] Fn<()> + [const] Destruct,
|
LL | T: [const] Fn<()> + [const] Destruct,
|
||||||
| ^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/fn_trait_refs.rs:35:6
|
--> $DIR/fn_trait_refs.rs:35:8
|
||||||
|
|
|
|
||||||
LL | T: [const] Fn<()> + [const] Destruct,
|
LL | T: [const] Fn<()> + [const] Destruct,
|
||||||
| ^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/fn_trait_refs.rs:35:6
|
--> $DIR/fn_trait_refs.rs:35:8
|
||||||
|
|
|
|
||||||
LL | T: [const] Fn<()> + [const] Destruct,
|
LL | T: [const] Fn<()> + [const] Destruct,
|
||||||
| ^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/fn_trait_refs.rs:49:6
|
--> $DIR/fn_trait_refs.rs:49:8
|
||||||
|
|
|
|
||||||
LL | T: [const] FnMut<()> + [const] Destruct,
|
LL | T: [const] FnMut<()> + [const] Destruct,
|
||||||
| ^^^^^^^^^ can't be applied to `FnMut`
|
| ^^^^^^^ can't be applied to `FnMut`
|
||||||
|
|
|
|
||||||
note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/fn_trait_refs.rs:49:6
|
--> $DIR/fn_trait_refs.rs:49:8
|
||||||
|
|
|
|
||||||
LL | T: [const] FnMut<()> + [const] Destruct,
|
LL | T: [const] FnMut<()> + [const] Destruct,
|
||||||
| ^^^^^^^^^ can't be applied to `FnMut`
|
| ^^^^^^^ can't be applied to `FnMut`
|
||||||
|
|
|
|
||||||
note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/fn_trait_refs.rs:49:6
|
--> $DIR/fn_trait_refs.rs:49:8
|
||||||
|
|
|
|
||||||
LL | T: [const] FnMut<()> + [const] Destruct,
|
LL | T: [const] FnMut<()> + [const] Destruct,
|
||||||
| ^^^^^^^^^ can't be applied to `FnMut`
|
| ^^^^^^^ can't be applied to `FnMut`
|
||||||
|
|
|
|
||||||
note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/unstable-const-fn-in-libcore.rs:19:30
|
--> $DIR/unstable-const-fn-in-libcore.rs:19:32
|
||||||
|
|
|
|
||||||
LL | const fn unwrap_or_else<F: [const] FnOnce() -> T>(self, f: F) -> T {
|
LL | const fn unwrap_or_else<F: [const] FnOnce() -> T>(self, f: F) -> T {
|
||||||
| ^^^^^^^^^ can't be applied to `FnOnce`
|
| ^^^^^^^ can't be applied to `FnOnce`
|
||||||
|
|
|
|
||||||
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/unstable-const-fn-in-libcore.rs:19:30
|
--> $DIR/unstable-const-fn-in-libcore.rs:19:32
|
||||||
|
|
|
|
||||||
LL | const fn unwrap_or_else<F: [const] FnOnce() -> T>(self, f: F) -> T {
|
LL | const fn unwrap_or_else<F: [const] FnOnce() -> T>(self, f: F) -> T {
|
||||||
| ^^^^^^^^^ can't be applied to `FnOnce`
|
| ^^^^^^^ can't be applied to `FnOnce`
|
||||||
|
|
|
|
||||||
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/normalize-tait-in-const.rs:27:33
|
--> $DIR/normalize-tait-in-const.rs:27:35
|
||||||
|
|
|
|
||||||
LL | const fn with_positive<F: for<'a> [const] Fn(&'a Alias<'a>) + [const] Destruct>(fun: F) {
|
LL | const fn with_positive<F: for<'a> [const] Fn(&'a Alias<'a>) + [const] Destruct>(fun: F) {
|
||||||
| ^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/normalize-tait-in-const.rs:27:33
|
--> $DIR/normalize-tait-in-const.rs:27:35
|
||||||
|
|
|
|
||||||
LL | const fn with_positive<F: for<'a> [const] Fn(&'a Alias<'a>) + [const] Destruct>(fun: F) {
|
LL | const fn with_positive<F: for<'a> [const] Fn(&'a Alias<'a>) + [const] Destruct>(fun: F) {
|
||||||
| ^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ LL | T: [const] ?Tr,
|
|||||||
| there is not a well-defined meaning for a `[const] ?` trait
|
| there is not a well-defined meaning for a `[const] ?` trait
|
||||||
|
|
||||||
error: `[const]` may only modify trait bounds, not lifetime bounds
|
error: `[const]` may only modify trait bounds, not lifetime bounds
|
||||||
--> $DIR/bounds-type.rs:16:6
|
--> $DIR/bounds-type.rs:16:8
|
||||||
|
|
|
|
||||||
LL | T: [const] 'a,
|
LL | T: [const] 'a,
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
||||||
error: `const` may only modify trait bounds, not lifetime bounds
|
error: `const` may only modify trait bounds, not lifetime bounds
|
||||||
--> $DIR/bounds-type.rs:17:8
|
--> $DIR/bounds-type.rs:17:8
|
||||||
|
|||||||
@@ -1,55 +1,55 @@
|
|||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const_trait_impl.rs:34:7
|
--> $DIR/const_trait_impl.rs:34:9
|
||||||
|
|
|
|
||||||
LL | impl<T: [const] Default> const A for T {
|
LL | impl<T: [const] Default> const A for T {
|
||||||
| ^^^^^^^^^ can't be applied to `Default`
|
| ^^^^^^^ can't be applied to `Default`
|
||||||
|
|
|
|
||||||
note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/default.rs:LL:COL
|
--> $SRC_DIR/core/src/default.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const_trait_impl.rs:40:7
|
--> $DIR/const_trait_impl.rs:40:9
|
||||||
|
|
|
|
||||||
LL | impl<T: [const] Default + [const] Sup> const A for T {
|
LL | impl<T: [const] Default + [const] Sup> const A for T {
|
||||||
| ^^^^^^^^^ can't be applied to `Default`
|
| ^^^^^^^ can't be applied to `Default`
|
||||||
|
|
|
|
||||||
note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/default.rs:LL:COL
|
--> $SRC_DIR/core/src/default.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const_trait_impl.rs:46:7
|
--> $DIR/const_trait_impl.rs:46:9
|
||||||
|
|
|
|
||||||
LL | impl<T: [const] Default + [const] Sub> const A for T {
|
LL | impl<T: [const] Default + [const] Sub> const A for T {
|
||||||
| ^^^^^^^^^ can't be applied to `Default`
|
| ^^^^^^^ can't be applied to `Default`
|
||||||
|
|
|
|
||||||
note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/default.rs:LL:COL
|
--> $SRC_DIR/core/src/default.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const_trait_impl.rs:40:7
|
--> $DIR/const_trait_impl.rs:40:9
|
||||||
|
|
|
|
||||||
LL | impl<T: [const] Default + [const] Sup> const A for T {
|
LL | impl<T: [const] Default + [const] Sup> const A for T {
|
||||||
| ^^^^^^^^^ can't be applied to `Default`
|
| ^^^^^^^ can't be applied to `Default`
|
||||||
|
|
|
|
||||||
note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/default.rs:LL:COL
|
--> $SRC_DIR/core/src/default.rs:LL:COL
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const_trait_impl.rs:34:7
|
--> $DIR/const_trait_impl.rs:34:9
|
||||||
|
|
|
|
||||||
LL | impl<T: [const] Default> const A for T {
|
LL | impl<T: [const] Default> const A for T {
|
||||||
| ^^^^^^^^^ can't be applied to `Default`
|
| ^^^^^^^ can't be applied to `Default`
|
||||||
|
|
|
|
||||||
note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/default.rs:LL:COL
|
--> $SRC_DIR/core/src/default.rs:LL:COL
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const_trait_impl.rs:46:7
|
--> $DIR/const_trait_impl.rs:46:9
|
||||||
|
|
|
|
||||||
LL | impl<T: [const] Default + [const] Sub> const A for T {
|
LL | impl<T: [const] Default + [const] Sub> const A for T {
|
||||||
| ^^^^^^^^^ can't be applied to `Default`
|
| ^^^^^^^ can't be applied to `Default`
|
||||||
|
|
|
|
||||||
note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/default.rs:LL:COL
|
--> $SRC_DIR/core/src/default.rs:LL:COL
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-and-const-params.rs:8:13
|
--> $DIR/conditionally-const-and-const-params.rs:8:15
|
||||||
|
|
|
|
||||||
LL | fn add<A: [const] Add42>(self) -> Foo<{ A::add(N) }> {
|
LL | fn add<A: [const] Add42>(self) -> Foo<{ A::add(N) }> {
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/conditionally-const-and-const-params.rs:8:8
|
--> $DIR/conditionally-const-and-const-params.rs:8:8
|
||||||
@@ -11,10 +11,10 @@ LL | fn add<A: [const] Add42>(self) -> Foo<{ A::add(N) }> {
|
|||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-and-const-params.rs:26:9
|
--> $DIR/conditionally-const-and-const-params.rs:26:11
|
||||||
|
|
|
|
||||||
LL | fn bar<A: [const] Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
|
LL | fn bar<A: [const] Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/conditionally-const-and-const-params.rs:26:4
|
--> $DIR/conditionally-const-and-const-params.rs:26:4
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:7:24
|
--> $DIR/conditionally-const-invalid-places.rs:7:26
|
||||||
|
|
|
|
||||||
LL | fn non_const_function<T: [const] Trait>() {}
|
LL | fn non_const_function<T: [const] Trait>() {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:7:4
|
--> $DIR/conditionally-const-invalid-places.rs:7:4
|
||||||
@@ -11,66 +11,66 @@ LL | fn non_const_function<T: [const] Trait>() {}
|
|||||||
| ^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:9:16
|
--> $DIR/conditionally-const-invalid-places.rs:9:18
|
||||||
|
|
|
|
||||||
LL | struct Struct<T: [const] Trait> { field: T }
|
LL | struct Struct<T: [const] Trait> { field: T }
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: this item cannot have `[const]` trait bounds
|
= note: this item cannot have `[const]` trait bounds
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:10:21
|
--> $DIR/conditionally-const-invalid-places.rs:10:23
|
||||||
|
|
|
|
||||||
LL | struct TupleStruct<T: [const] Trait>(T);
|
LL | struct TupleStruct<T: [const] Trait>(T);
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: this item cannot have `[const]` trait bounds
|
= note: this item cannot have `[const]` trait bounds
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:11:20
|
--> $DIR/conditionally-const-invalid-places.rs:11:22
|
||||||
|
|
|
|
||||||
LL | struct UnitStruct<T: [const] Trait>;
|
LL | struct UnitStruct<T: [const] Trait>;
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: this item cannot have `[const]` trait bounds
|
= note: this item cannot have `[const]` trait bounds
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:14:12
|
--> $DIR/conditionally-const-invalid-places.rs:14:14
|
||||||
|
|
|
|
||||||
LL | enum Enum<T: [const] Trait> { Variant(T) }
|
LL | enum Enum<T: [const] Trait> { Variant(T) }
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: this item cannot have `[const]` trait bounds
|
= note: this item cannot have `[const]` trait bounds
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:16:14
|
--> $DIR/conditionally-const-invalid-places.rs:16:16
|
||||||
|
|
|
|
||||||
LL | union Union<T: [const] Trait> { field: T }
|
LL | union Union<T: [const] Trait> { field: T }
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: this item cannot have `[const]` trait bounds
|
= note: this item cannot have `[const]` trait bounds
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:19:12
|
--> $DIR/conditionally-const-invalid-places.rs:19:14
|
||||||
|
|
|
|
||||||
LL | type Type<T: [const] Trait> = T;
|
LL | type Type<T: [const] Trait> = T;
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: this item cannot have `[const]` trait bounds
|
= note: this item cannot have `[const]` trait bounds
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:21:17
|
--> $DIR/conditionally-const-invalid-places.rs:21:19
|
||||||
|
|
|
|
||||||
LL | const CONSTANT<T: [const] Trait>: () = ();
|
LL | const CONSTANT<T: [const] Trait>: () = ();
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: this item cannot have `[const]` trait bounds
|
= note: this item cannot have `[const]` trait bounds
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:25:16
|
--> $DIR/conditionally-const-invalid-places.rs:25:18
|
||||||
|
|
|
|
||||||
LL | type Type<T: [const] Trait>: [const] Trait;
|
LL | type Type<T: [const] Trait>: [const] Trait;
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: associated types in non-`#[const_trait]` traits cannot have `[const]` trait bounds
|
note: associated types in non-`#[const_trait]` traits cannot have `[const]` trait bounds
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:25:5
|
--> $DIR/conditionally-const-invalid-places.rs:25:5
|
||||||
@@ -79,10 +79,10 @@ LL | type Type<T: [const] Trait>: [const] Trait;
|
|||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:25:32
|
--> $DIR/conditionally-const-invalid-places.rs:25:34
|
||||||
|
|
|
|
||||||
LL | type Type<T: [const] Trait>: [const] Trait;
|
LL | type Type<T: [const] Trait>: [const] Trait;
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: associated types in non-`#[const_trait]` traits cannot have `[const]` trait bounds
|
note: associated types in non-`#[const_trait]` traits cannot have `[const]` trait bounds
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:25:5
|
--> $DIR/conditionally-const-invalid-places.rs:25:5
|
||||||
@@ -91,10 +91,10 @@ LL | type Type<T: [const] Trait>: [const] Trait;
|
|||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:28:28
|
--> $DIR/conditionally-const-invalid-places.rs:28:30
|
||||||
|
|
|
|
||||||
LL | fn non_const_function<T: [const] Trait>();
|
LL | fn non_const_function<T: [const] Trait>();
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:28:8
|
--> $DIR/conditionally-const-invalid-places.rs:28:8
|
||||||
@@ -103,18 +103,18 @@ LL | fn non_const_function<T: [const] Trait>();
|
|||||||
| ^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:29:21
|
--> $DIR/conditionally-const-invalid-places.rs:29:23
|
||||||
|
|
|
|
||||||
LL | const CONSTANT<T: [const] Trait>: ();
|
LL | const CONSTANT<T: [const] Trait>: ();
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: this item cannot have `[const]` trait bounds
|
= note: this item cannot have `[const]` trait bounds
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:34:16
|
--> $DIR/conditionally-const-invalid-places.rs:34:18
|
||||||
|
|
|
|
||||||
LL | type Type<T: [const] Trait> = ();
|
LL | type Type<T: [const] Trait> = ();
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: associated types in non-const impls cannot have `[const]` trait bounds
|
note: associated types in non-const impls cannot have `[const]` trait bounds
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:34:5
|
--> $DIR/conditionally-const-invalid-places.rs:34:5
|
||||||
@@ -123,10 +123,10 @@ LL | type Type<T: [const] Trait> = ();
|
|||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:36:28
|
--> $DIR/conditionally-const-invalid-places.rs:36:30
|
||||||
|
|
|
|
||||||
LL | fn non_const_function<T: [const] Trait>() {}
|
LL | fn non_const_function<T: [const] Trait>() {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:36:8
|
--> $DIR/conditionally-const-invalid-places.rs:36:8
|
||||||
@@ -135,18 +135,18 @@ LL | fn non_const_function<T: [const] Trait>() {}
|
|||||||
| ^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:37:21
|
--> $DIR/conditionally-const-invalid-places.rs:37:23
|
||||||
|
|
|
|
||||||
LL | const CONSTANT<T: [const] Trait>: () = ();
|
LL | const CONSTANT<T: [const] Trait>: () = ();
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: this item cannot have `[const]` trait bounds
|
= note: this item cannot have `[const]` trait bounds
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:44:16
|
--> $DIR/conditionally-const-invalid-places.rs:44:18
|
||||||
|
|
|
|
||||||
LL | type Type<T: [const] Trait> = ();
|
LL | type Type<T: [const] Trait> = ();
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: inherent associated types cannot have `[const]` trait bounds
|
note: inherent associated types cannot have `[const]` trait bounds
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:44:5
|
--> $DIR/conditionally-const-invalid-places.rs:44:5
|
||||||
@@ -155,10 +155,10 @@ LL | type Type<T: [const] Trait> = ();
|
|||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:46:28
|
--> $DIR/conditionally-const-invalid-places.rs:46:30
|
||||||
|
|
|
|
||||||
LL | fn non_const_function<T: [const] Trait>() {}
|
LL | fn non_const_function<T: [const] Trait>() {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:46:8
|
--> $DIR/conditionally-const-invalid-places.rs:46:8
|
||||||
@@ -167,18 +167,18 @@ LL | fn non_const_function<T: [const] Trait>() {}
|
|||||||
| ^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:47:21
|
--> $DIR/conditionally-const-invalid-places.rs:47:23
|
||||||
|
|
|
|
||||||
LL | const CONSTANT<T: [const] Trait>: () = ();
|
LL | const CONSTANT<T: [const] Trait>: () = ();
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: this item cannot have `[const]` trait bounds
|
= note: this item cannot have `[const]` trait bounds
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:52:13
|
--> $DIR/conditionally-const-invalid-places.rs:52:15
|
||||||
|
|
|
|
||||||
LL | trait Child0: [const] Trait {}
|
LL | trait Child0: [const] Trait {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
|
note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:52:1
|
--> $DIR/conditionally-const-invalid-places.rs:52:1
|
||||||
@@ -187,10 +187,10 @@ LL | trait Child0: [const] Trait {}
|
|||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:53:24
|
--> $DIR/conditionally-const-invalid-places.rs:53:26
|
||||||
|
|
|
|
||||||
LL | trait Child1 where Self: [const] Trait {}
|
LL | trait Child1 where Self: [const] Trait {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
|
note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:53:1
|
--> $DIR/conditionally-const-invalid-places.rs:53:1
|
||||||
@@ -199,10 +199,10 @@ LL | trait Child1 where Self: [const] Trait {}
|
|||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:56:7
|
--> $DIR/conditionally-const-invalid-places.rs:56:9
|
||||||
|
|
|
|
||||||
LL | impl<T: [const] Trait> Trait for T {}
|
LL | impl<T: [const] Trait> Trait for T {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this impl is not `const`, so it cannot have `[const]` trait bounds
|
note: this impl is not `const`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:56:1
|
--> $DIR/conditionally-const-invalid-places.rs:56:1
|
||||||
@@ -211,10 +211,10 @@ LL | impl<T: [const] Trait> Trait for T {}
|
|||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:59:7
|
--> $DIR/conditionally-const-invalid-places.rs:59:9
|
||||||
|
|
|
|
||||||
LL | impl<T: [const] Trait> Struct<T> {}
|
LL | impl<T: [const] Trait> Struct<T> {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: inherent impls cannot have `[const]` trait bounds
|
note: inherent impls cannot have `[const]` trait bounds
|
||||||
--> $DIR/conditionally-const-invalid-places.rs:59:1
|
--> $DIR/conditionally-const-invalid-places.rs:59:1
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/const-bound-on-not-const-associated-fn.rs:11:38
|
--> $DIR/const-bound-on-not-const-associated-fn.rs:11:40
|
||||||
|
|
|
|
||||||
LL | fn do_something_else() where Self: [const] MyTrait;
|
LL | fn do_something_else() where Self: [const] MyTrait;
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/const-bound-on-not-const-associated-fn.rs:11:8
|
--> $DIR/const-bound-on-not-const-associated-fn.rs:11:8
|
||||||
@@ -11,10 +11,10 @@ LL | fn do_something_else() where Self: [const] MyTrait;
|
|||||||
| ^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/const-bound-on-not-const-associated-fn.rs:22:30
|
--> $DIR/const-bound-on-not-const-associated-fn.rs:22:32
|
||||||
|
|
|
|
||||||
LL | pub fn foo(&self) where T: [const] MyTrait {
|
LL | pub fn foo(&self) where T: [const] MyTrait {
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/const-bound-on-not-const-associated-fn.rs:22:12
|
--> $DIR/const-bound-on-not-const-associated-fn.rs:22:12
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const-bounds-non-const-trait.rs:6:19
|
--> $DIR/const-bounds-non-const-trait.rs:6:21
|
||||||
|
|
|
|
||||||
LL | const fn perform<T: [const] NonConst>() {}
|
LL | const fn perform<T: [const] NonConst>() {}
|
||||||
| ^^^^^^^^^ can't be applied to `NonConst`
|
| ^^^^^^^ can't be applied to `NonConst`
|
||||||
|
|
|
|
||||||
help: mark `NonConst` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `NonConst` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|
|
|
||||||
@@ -10,10 +10,10 @@ LL | #[const_trait] trait NonConst {}
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const-bounds-non-const-trait.rs:6:19
|
--> $DIR/const-bounds-non-const-trait.rs:6:21
|
||||||
|
|
|
|
||||||
LL | const fn perform<T: [const] NonConst>() {}
|
LL | const fn perform<T: [const] NonConst>() {}
|
||||||
| ^^^^^^^^^ can't be applied to `NonConst`
|
| ^^^^^^^ can't be applied to `NonConst`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: mark `NonConst` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `NonConst` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const-closure-parse-not-item.rs:7:20
|
--> $DIR/const-closure-parse-not-item.rs:7:25
|
||||||
|
|
|
|
||||||
LL | const fn test() -> impl [const] Fn() {
|
LL | const fn test() -> impl [const] Fn() {
|
||||||
| ^^^^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const-closure-parse-not-item.rs:7:20
|
--> $DIR/const-closure-parse-not-item.rs:7:25
|
||||||
|
|
|
|
||||||
LL | const fn test() -> impl [const] Fn() {
|
LL | const fn test() -> impl [const] Fn() {
|
||||||
| ^^^^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const-closure-parse-not-item.rs:7:20
|
--> $DIR/const-closure-parse-not-item.rs:7:25
|
||||||
|
|
|
|
||||||
LL | const fn test() -> impl [const] Fn() {
|
LL | const fn test() -> impl [const] Fn() {
|
||||||
| ^^^^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const-closure-trait-method-fail.rs:14:30
|
--> $DIR/const-closure-trait-method-fail.rs:14:32
|
||||||
|
|
|
|
||||||
LL | const fn need_const_closure<T: [const] FnOnce(()) -> i32>(x: T) -> i32 {
|
LL | const fn need_const_closure<T: [const] FnOnce(()) -> i32>(x: T) -> i32 {
|
||||||
| ^^^^^^^^^ can't be applied to `FnOnce`
|
| ^^^^^^^ can't be applied to `FnOnce`
|
||||||
|
|
|
|
||||||
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const-closure-trait-method-fail.rs:14:30
|
--> $DIR/const-closure-trait-method-fail.rs:14:32
|
||||||
|
|
|
|
||||||
LL | const fn need_const_closure<T: [const] FnOnce(()) -> i32>(x: T) -> i32 {
|
LL | const fn need_const_closure<T: [const] FnOnce(()) -> i32>(x: T) -> i32 {
|
||||||
| ^^^^^^^^^ can't be applied to `FnOnce`
|
| ^^^^^^^ can't be applied to `FnOnce`
|
||||||
|
|
|
|
||||||
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const-closure-trait-method.rs:14:30
|
--> $DIR/const-closure-trait-method.rs:14:32
|
||||||
|
|
|
|
||||||
LL | const fn need_const_closure<T: [const] FnOnce(()) -> i32>(x: T) -> i32 {
|
LL | const fn need_const_closure<T: [const] FnOnce(()) -> i32>(x: T) -> i32 {
|
||||||
| ^^^^^^^^^ can't be applied to `FnOnce`
|
| ^^^^^^^ can't be applied to `FnOnce`
|
||||||
|
|
|
|
||||||
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const-closure-trait-method.rs:14:30
|
--> $DIR/const-closure-trait-method.rs:14:32
|
||||||
|
|
|
|
||||||
LL | const fn need_const_closure<T: [const] FnOnce(()) -> i32>(x: T) -> i32 {
|
LL | const fn need_const_closure<T: [const] FnOnce(()) -> i32>(x: T) -> i32 {
|
||||||
| ^^^^^^^^^ can't be applied to `FnOnce`
|
| ^^^^^^^ can't be applied to `FnOnce`
|
||||||
|
|
|
|
||||||
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|||||||
@@ -1,74 +1,74 @@
|
|||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const-closures.rs:8:10
|
--> $DIR/const-closures.rs:8:12
|
||||||
|
|
|
|
||||||
LL | F: [const] FnOnce() -> u8,
|
LL | F: [const] FnOnce() -> u8,
|
||||||
| ^^^^^^^^^ can't be applied to `FnOnce`
|
| ^^^^^^^ can't be applied to `FnOnce`
|
||||||
|
|
|
|
||||||
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const-closures.rs:9:10
|
--> $DIR/const-closures.rs:9:12
|
||||||
|
|
|
|
||||||
LL | F: [const] FnMut() -> u8,
|
LL | F: [const] FnMut() -> u8,
|
||||||
| ^^^^^^^^^ can't be applied to `FnMut`
|
| ^^^^^^^ can't be applied to `FnMut`
|
||||||
|
|
|
|
||||||
note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const-closures.rs:10:10
|
--> $DIR/const-closures.rs:10:12
|
||||||
|
|
|
|
||||||
LL | F: [const] Fn() -> u8,
|
LL | F: [const] Fn() -> u8,
|
||||||
| ^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const-closures.rs:8:10
|
--> $DIR/const-closures.rs:8:12
|
||||||
|
|
|
|
||||||
LL | F: [const] FnOnce() -> u8,
|
LL | F: [const] FnOnce() -> u8,
|
||||||
| ^^^^^^^^^ can't be applied to `FnOnce`
|
| ^^^^^^^ can't be applied to `FnOnce`
|
||||||
|
|
|
|
||||||
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const-closures.rs:9:10
|
--> $DIR/const-closures.rs:9:12
|
||||||
|
|
|
|
||||||
LL | F: [const] FnMut() -> u8,
|
LL | F: [const] FnMut() -> u8,
|
||||||
| ^^^^^^^^^ can't be applied to `FnMut`
|
| ^^^^^^^ can't be applied to `FnMut`
|
||||||
|
|
|
|
||||||
note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const-closures.rs:10:10
|
--> $DIR/const-closures.rs:10:12
|
||||||
|
|
|
|
||||||
LL | F: [const] Fn() -> u8,
|
LL | F: [const] Fn() -> u8,
|
||||||
| ^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const-closures.rs:23:18
|
--> $DIR/const-closures.rs:23:20
|
||||||
|
|
|
|
||||||
LL | const fn answer<F: [const] Fn() -> u8>(f: &F) -> u8 {
|
LL | const fn answer<F: [const] Fn() -> u8>(f: &F) -> u8 {
|
||||||
| ^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/const-closures.rs:23:18
|
--> $DIR/const-closures.rs:23:20
|
||||||
|
|
|
|
||||||
LL | const fn answer<F: [const] Fn() -> u8>(f: &F) -> u8 {
|
LL | const fn answer<F: [const] Fn() -> u8>(f: &F) -> u8 {
|
||||||
| ^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ LL | let _: &dyn const Trait;
|
|||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/const-trait-bounds-trait-objects.rs:10:13
|
--> $DIR/const-trait-bounds-trait-objects.rs:10:17
|
||||||
|
|
|
|
||||||
LL | let _: &dyn [const] Trait;
|
LL | let _: &dyn [const] Trait;
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: trait objects cannot have `[const]` trait bounds
|
= note: trait objects cannot have `[const]` trait bounds
|
||||||
|
|
||||||
@@ -19,10 +19,10 @@ LL | const fn handle(_: &dyn const NonConst) {}
|
|||||||
| ^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/const-trait-bounds-trait-objects.rs:17:19
|
--> $DIR/const-trait-bounds-trait-objects.rs:17:23
|
||||||
|
|
|
|
||||||
LL | const fn take(_: &dyn [const] NonConst) {}
|
LL | const fn take(_: &dyn [const] NonConst) {}
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: trait objects cannot have `[const]` trait bounds
|
= note: trait objects cannot have `[const]` trait bounds
|
||||||
|
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ LL | impl const T for S {}
|
|||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: const trait impls are experimental
|
error[E0658]: const trait impls are experimental
|
||||||
--> $DIR/feature-gate.rs:13:13
|
--> $DIR/feature-gate.rs:13:15
|
||||||
|
|
|
|
||||||
LL | const fn f<A: [const] T>() {}
|
LL | const fn f<A: [const] T>() {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
||||||
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
||||||
@@ -29,10 +29,10 @@ LL | fn g<A: const T>() {}
|
|||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: const trait impls are experimental
|
error[E0658]: const trait impls are experimental
|
||||||
--> $DIR/feature-gate.rs:18:12
|
--> $DIR/feature-gate.rs:18:17
|
||||||
|
|
|
|
||||||
LL | discard! { impl [const] T }
|
LL | discard! { impl [const] T }
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
||||||
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
||||||
|
|||||||
@@ -9,29 +9,29 @@ LL | const move || {
|
|||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/ice-112822-expected-type-for-param.rs:3:20
|
--> $DIR/ice-112822-expected-type-for-param.rs:3:25
|
||||||
|
|
|
|
||||||
LL | const fn test() -> impl [const] Fn() {
|
LL | const fn test() -> impl [const] Fn() {
|
||||||
| ^^^^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/ice-112822-expected-type-for-param.rs:3:20
|
--> $DIR/ice-112822-expected-type-for-param.rs:3:25
|
||||||
|
|
|
|
||||||
LL | const fn test() -> impl [const] Fn() {
|
LL | const fn test() -> impl [const] Fn() {
|
||||||
| ^^^^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/ice-112822-expected-type-for-param.rs:3:20
|
--> $DIR/ice-112822-expected-type-for-param.rs:3:25
|
||||||
|
|
|
|
||||||
LL | const fn test() -> impl [const] Fn() {
|
LL | const fn test() -> impl [const] Fn() {
|
||||||
| ^^^^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/ice-123664-unexpected-bound-var.rs:4:25
|
--> $DIR/ice-123664-unexpected-bound-var.rs:4:27
|
||||||
|
|
|
|
||||||
LL | const fn with_positive<F: [const] Fn()>() {}
|
LL | const fn with_positive<F: [const] Fn()>() {}
|
||||||
| ^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/ice-123664-unexpected-bound-var.rs:4:25
|
--> $DIR/ice-123664-unexpected-bound-var.rs:4:27
|
||||||
|
|
|
|
||||||
LL | const fn with_positive<F: [const] Fn()>() {}
|
LL | const fn with_positive<F: [const] Fn()>() {}
|
||||||
| ^^^^^^^^^ can't be applied to `Fn`
|
| ^^^^^^^ can't be applied to `Fn`
|
||||||
|
|
|
|
||||||
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/non-const-op-in-closure-in-const.rs:10:42
|
--> $DIR/non-const-op-in-closure-in-const.rs:10:44
|
||||||
|
|
|
|
||||||
LL | impl<A, B> const Convert<B> for A where B: [const] From<A> {
|
LL | impl<A, B> const Convert<B> for A where B: [const] From<A> {
|
||||||
| ^^^^^^^^^ can't be applied to `From`
|
| ^^^^^^^ can't be applied to `From`
|
||||||
|
|
|
|
||||||
note: `From` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `From` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/non-const-op-in-closure-in-const.rs:10:42
|
--> $DIR/non-const-op-in-closure-in-const.rs:10:44
|
||||||
|
|
|
|
||||||
LL | impl<A, B> const Convert<B> for A where B: [const] From<A> {
|
LL | impl<A, B> const Convert<B> for A where B: [const] From<A> {
|
||||||
| ^^^^^^^^^ can't be applied to `From`
|
| ^^^^^^^ can't be applied to `From`
|
||||||
|
|
|
|
||||||
note: `From` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
note: `From` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
|
||||||
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/super-traits-fail-2.rs:11:10
|
--> $DIR/super-traits-fail-2.rs:11:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
|
note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/super-traits-fail-2.rs:11:1
|
--> $DIR/super-traits-fail-2.rs:11:1
|
||||||
@@ -11,10 +11,10 @@ LL | trait Bar: [const] Foo {}
|
|||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-2.rs:11:10
|
--> $DIR/super-traits-fail-2.rs:11:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|
|
|
||||||
@@ -22,10 +22,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-2.rs:11:10
|
--> $DIR/super-traits-fail-2.rs:11:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
@@ -34,10 +34,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-2.rs:11:10
|
--> $DIR/super-traits-fail-2.rs:11:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-2.rs:11:10
|
--> $DIR/super-traits-fail-2.rs:11:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|
|
|
||||||
@@ -10,10 +10,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-2.rs:11:10
|
--> $DIR/super-traits-fail-2.rs:11:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
@@ -22,10 +22,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-2.rs:11:10
|
--> $DIR/super-traits-fail-2.rs:11:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
@@ -34,10 +34,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-2.rs:11:10
|
--> $DIR/super-traits-fail-2.rs:11:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
@@ -46,10 +46,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-2.rs:11:10
|
--> $DIR/super-traits-fail-2.rs:11:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/super-traits-fail-2.rs:11:10
|
--> $DIR/super-traits-fail-2.rs:11:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
|
note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/super-traits-fail-2.rs:11:1
|
--> $DIR/super-traits-fail-2.rs:11:1
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
|
note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/super-traits-fail-3.rs:23:1
|
--> $DIR/super-traits-fail-3.rs:23:1
|
||||||
@@ -11,30 +11,30 @@ LL | trait Bar: [const] Foo {}
|
|||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0658]: const trait impls are experimental
|
error[E0658]: const trait impls are experimental
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
||||||
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: const trait impls are experimental
|
error[E0658]: const trait impls are experimental
|
||||||
--> $DIR/super-traits-fail-3.rs:32:15
|
--> $DIR/super-traits-fail-3.rs:32:17
|
||||||
|
|
|
|
||||||
LL | const fn foo<T: [const] Bar>(x: &T) {
|
LL | const fn foo<T: [const] Bar>(x: &T) {
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
||||||
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|
|
|
||||||
@@ -42,10 +42,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
@@ -54,10 +54,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
@@ -66,10 +66,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:32:15
|
--> $DIR/super-traits-fail-3.rs:32:17
|
||||||
|
|
|
|
||||||
LL | const fn foo<T: [const] Bar>(x: &T) {
|
LL | const fn foo<T: [const] Bar>(x: &T) {
|
||||||
| ^^^^^^^^^ can't be applied to `Bar`
|
| ^^^^^^^ can't be applied to `Bar`
|
||||||
|
|
|
|
||||||
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
|
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|
|
|
||||||
@@ -77,10 +77,10 @@ LL | #[const_trait] trait Bar: [const] Foo {}
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:32:15
|
--> $DIR/super-traits-fail-3.rs:32:17
|
||||||
|
|
|
|
||||||
LL | const fn foo<T: [const] Bar>(x: &T) {
|
LL | const fn foo<T: [const] Bar>(x: &T) {
|
||||||
| ^^^^^^^^^ can't be applied to `Bar`
|
| ^^^^^^^ can't be applied to `Bar`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
|
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
|
note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/super-traits-fail-3.rs:23:1
|
--> $DIR/super-traits-fail-3.rs:23:1
|
||||||
@@ -11,30 +11,30 @@ LL | trait Bar: [const] Foo {}
|
|||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0658]: const trait impls are experimental
|
error[E0658]: const trait impls are experimental
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
||||||
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: const trait impls are experimental
|
error[E0658]: const trait impls are experimental
|
||||||
--> $DIR/super-traits-fail-3.rs:32:15
|
--> $DIR/super-traits-fail-3.rs:32:17
|
||||||
|
|
|
|
||||||
LL | const fn foo<T: [const] Bar>(x: &T) {
|
LL | const fn foo<T: [const] Bar>(x: &T) {
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
||||||
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|
|
|
||||||
@@ -42,10 +42,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
@@ -54,10 +54,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
@@ -66,10 +66,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:32:15
|
--> $DIR/super-traits-fail-3.rs:32:17
|
||||||
|
|
|
|
||||||
LL | const fn foo<T: [const] Bar>(x: &T) {
|
LL | const fn foo<T: [const] Bar>(x: &T) {
|
||||||
| ^^^^^^^^^ can't be applied to `Bar`
|
| ^^^^^^^ can't be applied to `Bar`
|
||||||
|
|
|
|
||||||
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
|
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|
|
|
||||||
@@ -77,10 +77,10 @@ LL | #[const_trait] trait Bar: [const] Foo {}
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:32:15
|
--> $DIR/super-traits-fail-3.rs:32:17
|
||||||
|
|
|
|
||||||
LL | const fn foo<T: [const] Bar>(x: &T) {
|
LL | const fn foo<T: [const] Bar>(x: &T) {
|
||||||
| ^^^^^^^^^ can't be applied to `Bar`
|
| ^^^^^^^ can't be applied to `Bar`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
|
help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
error[E0658]: const trait impls are experimental
|
error[E0658]: const trait impls are experimental
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
||||||
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: const trait impls are experimental
|
error[E0658]: const trait impls are experimental
|
||||||
--> $DIR/super-traits-fail-3.rs:32:15
|
--> $DIR/super-traits-fail-3.rs:32:17
|
||||||
|
|
|
|
||||||
LL | const fn foo<T: [const] Bar>(x: &T) {
|
LL | const fn foo<T: [const] Bar>(x: &T) {
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
||||||
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
error[E0658]: const trait impls are experimental
|
error[E0658]: const trait impls are experimental
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
||||||
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: const trait impls are experimental
|
error[E0658]: const trait impls are experimental
|
||||||
--> $DIR/super-traits-fail-3.rs:32:15
|
--> $DIR/super-traits-fail-3.rs:32:17
|
||||||
|
|
|
|
||||||
LL | const fn foo<T: [const] Bar>(x: &T) {
|
LL | const fn foo<T: [const] Bar>(x: &T) {
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
|
||||||
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
|
note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/super-traits-fail-3.rs:23:1
|
--> $DIR/super-traits-fail-3.rs:23:1
|
||||||
@@ -11,10 +11,10 @@ LL | trait Bar: [const] Foo {}
|
|||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|
|
|
||||||
@@ -22,10 +22,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
@@ -34,10 +34,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
@@ -46,10 +46,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:32:15
|
--> $DIR/super-traits-fail-3.rs:32:17
|
||||||
|
|
|
|
||||||
LL | const fn foo<T: [const] Bar>(x: &T) {
|
LL | const fn foo<T: [const] Bar>(x: &T) {
|
||||||
| ^^^^^^^^^ can't be applied to `Bar`
|
| ^^^^^^^ can't be applied to `Bar`
|
||||||
|
|
|
|
||||||
help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|
|
|
||||||
@@ -57,10 +57,10 @@ LL | #[const_trait] trait Bar: [const] Foo {}
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:32:15
|
--> $DIR/super-traits-fail-3.rs:32:17
|
||||||
|
|
|
|
||||||
LL | const fn foo<T: [const] Bar>(x: &T) {
|
LL | const fn foo<T: [const] Bar>(x: &T) {
|
||||||
| ^^^^^^^^^ can't be applied to `Bar`
|
| ^^^^^^^ can't be applied to `Bar`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|
|
|
||||||
@@ -10,10 +10,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
@@ -22,10 +22,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
@@ -34,10 +34,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
@@ -46,10 +46,10 @@ LL | #[const_trait] trait Foo {
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^ can't be applied to `Foo`
|
| ^^^^^^^ can't be applied to `Foo`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/super-traits-fail-3.rs:23:10
|
--> $DIR/super-traits-fail-3.rs:23:12
|
||||||
|
|
|
|
||||||
LL | trait Bar: [const] Foo {}
|
LL | trait Bar: [const] Foo {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
|
note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/super-traits-fail-3.rs:23:1
|
--> $DIR/super-traits-fail-3.rs:23:1
|
||||||
@@ -11,10 +11,10 @@ LL | trait Bar: [const] Foo {}
|
|||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:32:15
|
--> $DIR/super-traits-fail-3.rs:32:17
|
||||||
|
|
|
|
||||||
LL | const fn foo<T: [const] Bar>(x: &T) {
|
LL | const fn foo<T: [const] Bar>(x: &T) {
|
||||||
| ^^^^^^^^^ can't be applied to `Bar`
|
| ^^^^^^^ can't be applied to `Bar`
|
||||||
|
|
|
|
||||||
help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|
|
|
||||||
@@ -22,10 +22,10 @@ LL | #[const_trait] trait Bar: [const] Foo {}
|
|||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
||||||
error: `[const]` can only be applied to `#[const_trait]` traits
|
error: `[const]` can only be applied to `#[const_trait]` traits
|
||||||
--> $DIR/super-traits-fail-3.rs:32:15
|
--> $DIR/super-traits-fail-3.rs:32:17
|
||||||
|
|
|
|
||||||
LL | const fn foo<T: [const] Bar>(x: &T) {
|
LL | const fn foo<T: [const] Bar>(x: &T) {
|
||||||
| ^^^^^^^^^ can't be applied to `Bar`
|
| ^^^^^^^ can't be applied to `Bar`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
|
help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ error[E0658]: use of unstable const library feature `unstable`
|
|||||||
--> $DIR/syntactical-unstable.rs:13:20
|
--> $DIR/syntactical-unstable.rs:13:20
|
||||||
|
|
|
|
||||||
LL | trait Foo: [const] MyTrait {
|
LL | trait Foo: [const] MyTrait {
|
||||||
| --------- ^^^^^^^
|
| ------- ^^^^^^^
|
||||||
| |
|
| |
|
||||||
| trait is not stable as const yet
|
| trait is not stable as const yet
|
||||||
|
|
|
|
||||||
= help: add `#![feature(unstable)]` to the crate attributes to enable
|
= help: add `#![feature(unstable)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
@@ -13,9 +13,9 @@ error[E0658]: use of unstable const library feature `unstable`
|
|||||||
--> $DIR/syntactical-unstable.rs:19:45
|
--> $DIR/syntactical-unstable.rs:19:45
|
||||||
|
|
|
|
||||||
LL | const fn where_clause<T>() where T: [const] MyTrait {}
|
LL | const fn where_clause<T>() where T: [const] MyTrait {}
|
||||||
| --------- ^^^^^^^
|
| ------- ^^^^^^^
|
||||||
| |
|
| |
|
||||||
| trait is not stable as const yet
|
| trait is not stable as const yet
|
||||||
|
|
|
|
||||||
= help: add `#![feature(unstable)]` to the crate attributes to enable
|
= help: add `#![feature(unstable)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
@@ -24,9 +24,9 @@ error[E0658]: use of unstable const library feature `unstable`
|
|||||||
--> $DIR/syntactical-unstable.rs:22:53
|
--> $DIR/syntactical-unstable.rs:22:53
|
||||||
|
|
|
|
||||||
LL | const fn nested<T>() where T: Deref<Target: [const] MyTrait> {}
|
LL | const fn nested<T>() where T: Deref<Target: [const] MyTrait> {}
|
||||||
| --------- ^^^^^^^
|
| ------- ^^^^^^^
|
||||||
| |
|
| |
|
||||||
| trait is not stable as const yet
|
| trait is not stable as const yet
|
||||||
|
|
|
|
||||||
= help: add `#![feature(unstable)]` to the crate attributes to enable
|
= help: add `#![feature(unstable)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
@@ -35,9 +35,9 @@ error[E0658]: use of unstable const library feature `unstable`
|
|||||||
--> $DIR/syntactical-unstable.rs:25:33
|
--> $DIR/syntactical-unstable.rs:25:33
|
||||||
|
|
|
|
||||||
LL | const fn rpit() -> impl [const] MyTrait { Local }
|
LL | const fn rpit() -> impl [const] MyTrait { Local }
|
||||||
| ------------ ^^^^^^^
|
| ------- ^^^^^^^
|
||||||
| |
|
| |
|
||||||
| trait is not stable as const yet
|
| trait is not stable as const yet
|
||||||
|
|
|
|
||||||
= help: add `#![feature(unstable)]` to the crate attributes to enable
|
= help: add `#![feature(unstable)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
@@ -55,9 +55,9 @@ error[E0658]: use of unstable const library feature `unstable`
|
|||||||
--> $DIR/syntactical-unstable.rs:15:24
|
--> $DIR/syntactical-unstable.rs:15:24
|
||||||
|
|
|
|
||||||
LL | type Item: [const] MyTrait;
|
LL | type Item: [const] MyTrait;
|
||||||
| --------- ^^^^^^^
|
| ------- ^^^^^^^
|
||||||
| |
|
| |
|
||||||
| trait is not stable as const yet
|
| trait is not stable as const yet
|
||||||
|
|
|
|
||||||
= help: add `#![feature(unstable)]` to the crate attributes to enable
|
= help: add `#![feature(unstable)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/trait-where-clause.rs:8:22
|
--> $DIR/trait-where-clause.rs:8:24
|
||||||
|
|
|
|
||||||
LL | fn b() where Self: [const] Bar;
|
LL | fn b() where Self: [const] Bar;
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/trait-where-clause.rs:8:8
|
--> $DIR/trait-where-clause.rs:8:8
|
||||||
@@ -11,10 +11,10 @@ LL | fn b() where Self: [const] Bar;
|
|||||||
| ^
|
| ^
|
||||||
|
|
||||||
error: `[const]` is not allowed here
|
error: `[const]` is not allowed here
|
||||||
--> $DIR/trait-where-clause.rs:10:11
|
--> $DIR/trait-where-clause.rs:10:13
|
||||||
|
|
|
|
||||||
LL | fn c<T: [const] Bar>();
|
LL | fn c<T: [const] Bar>();
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
note: this function is not `const`, so it cannot have `[const]` trait bounds
|
||||||
--> $DIR/trait-where-clause.rs:10:8
|
--> $DIR/trait-where-clause.rs:10:8
|
||||||
|
|||||||
Reference in New Issue
Block a user