Skip to content

Commit

Permalink
remove invalid TyCompat relation for effects
Browse files Browse the repository at this point in the history
  • Loading branch information
fee1-dead committed Aug 24, 2024
1 parent 4074d49 commit 378902e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
1 change: 0 additions & 1 deletion library/core/src/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,6 @@ pub mod effects {
pub trait TyCompat<T: ?Sized> {}

impl<T: ?Sized> TyCompat<T> for T {}
impl<T: ?Sized> TyCompat<T> for Maybe {}
impl<T: ?Sized> TyCompat<Maybe> for T {}

#[lang = "EffectsIntersection"]
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ check-pass
//~ ERROR the trait bound
//@ compile-flags: -Znext-solver

#![allow(incomplete_features)]
Expand All @@ -17,6 +17,6 @@ impl Foo for S {
}

impl const Bar for S {}
//FIXME ~^ ERROR the trait bound
// FIXME(effects) bad span

fn main() {}
11 changes: 11 additions & 0 deletions tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
error[E0277]: the trait bound `Maybe: TyCompat<<(Foo::{synthetic#0},) as std::marker::effects::Intersection>::Output>` is not satisfied
|
note: required by a bound in `Bar::{synthetic#0}`
--> $DIR/super-traits-fail.rs:11:1
|
LL | #[const_trait]
| ^^^^^^^^^^^^^^ required by this bound in `Bar::{synthetic#0}`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.

0 comments on commit 378902e

Please sign in to comment.