-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #119918 - matthiaskrgr:rollup-kjjh51l, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #119891 (rename `reported_signature_mismatch` to reflect its use) - #119894 (Allow `~const` on associated type bounds again) - #119896 (Taint `_` placeholder types in trait impl method signatures) - #119898 (Remove unused `ErrorReporting` variant from overflow handling) - #119902 (fix typo in `fn()` docs) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
25 changed files
with
255 additions
and
91 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
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
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
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
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
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
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
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
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
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
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
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
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: 14 additions & 0 deletions
14
tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.qualified.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,14 @@ | ||
error[E0277]: the trait bound `T: Trait` is not satisfied | ||
--> $DIR/assoc-type-const-bound-usage-0.rs:21:6 | ||
| | ||
LL | <T as /* FIXME: ~const */ Trait>::Assoc::func() | ||
| ^ the trait `Trait` is not implemented for `T` | ||
| | ||
help: consider further restricting this bound | ||
| | ||
LL | const fn qualified<T: ~const Trait + Trait>() -> i32 { | ||
| +++++++ | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
24 changes: 24 additions & 0 deletions
24
tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// FIXME(effects): Collapse the revisions into one once we support `<Ty as ~const Trait>::Proj`. | ||
// revisions: unqualified qualified | ||
//[unqualified] check-pass | ||
//[qualified] known-bug: unknown | ||
|
||
#![feature(const_trait_impl, effects)] | ||
|
||
#[const_trait] | ||
trait Trait { | ||
type Assoc: ~const Trait; | ||
fn func() -> i32; | ||
} | ||
|
||
#[cfg(unqualified)] | ||
const fn unqualified<T: ~const Trait>() -> i32 { | ||
T::Assoc::func() | ||
} | ||
|
||
#[cfg(qualified)] | ||
const fn qualified<T: ~const Trait>() -> i32 { | ||
<T as /* FIXME: ~const */ Trait>::Assoc::func() | ||
} | ||
|
||
fn main() {} |
14 changes: 14 additions & 0 deletions
14
tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.qualified.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,14 @@ | ||
error[E0277]: the trait bound `T: Trait` is not satisfied | ||
--> $DIR/assoc-type-const-bound-usage-1.rs:23:43 | ||
| | ||
LL | fn qualified<T: const Trait>() -> Type<{ <T as /* FIXME: const */ Trait>::Assoc::func() }> { | ||
| ^ the trait `Trait` is not implemented for `T` | ||
| | ||
help: consider further restricting this bound | ||
| | ||
LL | fn qualified<T: const Trait + Trait>() -> Type<{ <T as /* FIXME: const */ Trait>::Assoc::func() }> { | ||
| +++++++ | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
27 changes: 27 additions & 0 deletions
27
tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// FIXME(effects): Collapse the revisions into one once we support `<Ty as const Trait>::Proj`. | ||
// revisions: unqualified qualified | ||
//[unqualified] check-pass | ||
//[qualified] known-bug: unknown | ||
|
||
#![feature(const_trait_impl, effects, generic_const_exprs)] | ||
#![allow(incomplete_features)] | ||
|
||
#[const_trait] | ||
trait Trait { | ||
type Assoc: ~const Trait; | ||
fn func() -> i32; | ||
} | ||
|
||
struct Type<const N: i32>; | ||
|
||
#[cfg(unqualified)] | ||
fn unqualified<T: const Trait>() -> Type<{ T::Assoc::func() }> { | ||
Type | ||
} | ||
|
||
#[cfg(qualified)] | ||
fn qualified<T: const Trait>() -> Type<{ <T as /* FIXME: const */ Trait>::Assoc::func() }> { | ||
Type | ||
} | ||
|
||
fn main() {} |
15 changes: 0 additions & 15 deletions
15
tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.rs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.