Move a wf-check into the site where the value is instantiated
This commit is contained in:
parent
1481fd964b
commit
8286ea5a49
8 changed files with 95 additions and 59 deletions
|
|
@ -1,8 +1,8 @@
|
|||
error: ~const can only be applied to `#[const_trait]` traits
|
||||
--> $DIR/super-traits-fail-2.rs:11:12
|
||||
--> $DIR/super-traits-fail-2.rs:11:19
|
||||
|
|
||||
LL | trait Bar: ~const Foo {}
|
||||
| ^^^^^^^^^^
|
||||
| ^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
error: ~const can only be applied to `#[const_trait]` traits
|
||||
--> $DIR/super-traits-fail-2.rs:11:12
|
||||
--> $DIR/super-traits-fail-2.rs:11:19
|
||||
|
|
||||
LL | trait Bar: ~const Foo {}
|
||||
| ^^^^^^^^^^
|
||||
| ^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
error: ~const can only be applied to `#[const_trait]` traits
|
||||
--> $DIR/super-traits-fail-3.rs:12:12
|
||||
--> $DIR/super-traits-fail-3.rs:12:19
|
||||
|
|
||||
LL | trait Bar: ~const Foo {}
|
||||
| ^^^^^^^^^^
|
||||
| ^^^
|
||||
|
||||
error: ~const can only be applied to `#[const_trait]` traits
|
||||
--> $DIR/super-traits-fail-3.rs:15:17
|
||||
--> $DIR/super-traits-fail-3.rs:15:24
|
||||
|
|
||||
LL | const fn foo<T: ~const Bar>(x: &T) {
|
||||
| ^^^^^^^^^^
|
||||
| ^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
error: ~const can only be applied to `#[const_trait]` traits
|
||||
--> $DIR/super-traits-fail-3.rs:12:12
|
||||
--> $DIR/super-traits-fail-3.rs:12:19
|
||||
|
|
||||
LL | trait Bar: ~const Foo {}
|
||||
| ^^^^^^^^^^
|
||||
| ^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
error: ~const can only be applied to `#[const_trait]` traits
|
||||
--> $DIR/super-traits-fail-3.rs:15:17
|
||||
--> $DIR/super-traits-fail-3.rs:15:24
|
||||
|
|
||||
LL | const fn foo<T: ~const Bar>(x: &T) {
|
||||
| ^^^^^^^^^^
|
||||
| ^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue