-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
52 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// known-bug: #110395 | ||
// check-pass | ||
#![feature(const_trait_impl)] | ||
|
||
#[const_trait] | ||
|
8 changes: 0 additions & 8 deletions
8
tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.stderr
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.stderr
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.stderr
This file was deleted.
Oops, something went wrong.
5 changes: 2 additions & 3 deletions
5
tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-fail.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
// FIXME(effects) | ||
// check-pass | ||
#![feature(const_trait_impl, effects)] | ||
|
||
pub const fn equals_self<T: PartialEq>(t: &T) -> bool { | ||
*t == *t | ||
// (remove this) ~^ ERROR can't compare | ||
//~^ ERROR mismatched types | ||
// FIXME(effects): diagnostic | ||
} | ||
|
||
fn main() {} |
12 changes: 12 additions & 0 deletions
12
tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-fail.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/call-generic-method-fail.rs:4:5 | ||
| | ||
LL | *t == *t | ||
| ^^^^^^^^ expected `host`, found `true` | ||
| | ||
= note: expected constant `host` | ||
found constant `true` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
4 changes: 2 additions & 2 deletions
4
tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.stderr
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
#![feature( | ||
associated_type_bounds, | ||
const_trait_impl, | ||
effects, | ||
const_cmp, | ||
)] | ||
|
||
|
43 changes: 10 additions & 33 deletions
43
tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,16 @@ | ||
error[E0635]: unknown feature `const_cmp` | ||
--> $DIR/const-impl-trait.rs:6:5 | ||
error[E0277]: can't compare `impl PartialEq + Destruct + Copy` with `impl PartialEq + Destruct + Copy` | ||
--> $DIR/const-impl-trait.rs:28:17 | ||
| | ||
LL | const_cmp, | ||
| ^^^^^^^^^ | ||
|
||
error: ~const can only be applied to `#[const_trait]` traits | ||
--> $DIR/const-impl-trait.rs:11:30 | ||
| | ||
LL | const fn cmp(a: &impl ~const PartialEq) -> bool { | ||
| ^^^^^^^^^ | ||
|
||
error: ~const can only be applied to `#[const_trait]` traits | ||
--> $DIR/const-impl-trait.rs:15:30 | ||
| | ||
LL | const fn wrap(x: impl ~const PartialEq + ~const Destruct) | ||
| ^^^^^^^^^ | ||
|
||
error: ~const can only be applied to `#[const_trait]` traits | ||
--> $DIR/const-impl-trait.rs:16:20 | ||
LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `impl PartialEq + Destruct + Copy == impl PartialEq + Destruct + Copy` | ||
| | ||
LL | -> impl ~const PartialEq + ~const Destruct | ||
| ^^^^^^^^^ | ||
|
||
error: ~const can only be applied to `#[const_trait]` traits | ||
--> $DIR/const-impl-trait.rs:23:29 | ||
= help: the trait `PartialEq<impl PartialEq + Destruct + Copy>` is not implemented for `impl PartialEq + Destruct + Copy` | ||
note: required by a bound in `Foo::{opaque#0}` | ||
--> $DIR/const-impl-trait.rs:24:22 | ||
| | ||
LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy; | ||
| ^^^^^^^^^ | ||
|
||
error: ~const can only be applied to `#[const_trait]` traits | ||
--> $DIR/const-impl-trait.rs:27:29 | ||
| | ||
LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy { | ||
| ^^^^^^^^^ | ||
| ^^^^^^^^^^^^^^^^ required by this bound in `Foo::{opaque#0}` | ||
|
||
error: aborting due to 6 previous errors | ||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0635`. | ||
For more information about this error, try `rustc --explain E0277`. |
4 changes: 2 additions & 2 deletions
4
tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 4 additions & 10 deletions
14
tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
error[E0635]: unknown feature `const_cmp` | ||
--> $DIR/derive-const-use.rs:2:30 | ||
| | ||
LL | #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const)] | ||
| ^^^^^^^^^ | ||
|
||
error[E0635]: unknown feature `const_default_impls` | ||
--> $DIR/derive-const-use.rs:2:41 | ||
--> $DIR/derive-const-use.rs:3:5 | ||
| | ||
LL | #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const)] | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
LL | const_default_impls, derive_const)] | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0635`. |
4 changes: 2 additions & 2 deletions
4
tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.stderr
This file was deleted.
Oops, something went wrong.