Bless tests
This commit is contained in:
parent
0ead25c4a9
commit
f956dc2e77
@ -11,6 +11,7 @@ type Assoc<'a, T> = <T as ToUnit<'a>>::Unit;
|
|||||||
impl<T> Overlap<T> for T {}
|
impl<T> Overlap<T> for T {}
|
||||||
|
|
||||||
impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
|
impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
|
||||||
//~^ ERROR conflicting implementations of trait `Overlap<for<'a> fn(&'a (), _)>`
|
//~^ ERROR the trait bound `for<'a> T: ToUnit<'a>` is not satisfied
|
||||||
|
//~| ERROR the trait bound `for<'a> T: ToUnit<'a>` is not satisfied
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,18 +1,26 @@
|
|||||||
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [?1t, '^0.Named(DefId(0:15 ~ structually_relate_aliases[de75]::{impl#1}::'a), "'a")], def_id: DefId(0:5 ~ structually_relate_aliases[de75]::ToUnit::Unit), .. }
|
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [?1t, '^0.Named(DefId(0:15 ~ structually_relate_aliases[de75]::{impl#1}::'a), "'a")], def_id: DefId(0:5 ~ structually_relate_aliases[de75]::ToUnit::Unit), .. }
|
||||||
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [?1t, '^0.Named(DefId(0:15 ~ structually_relate_aliases[de75]::{impl#1}::'a), "'a")], def_id: DefId(0:5 ~ structually_relate_aliases[de75]::ToUnit::Unit), .. }
|
error[E0277]: the trait bound `for<'a> T: ToUnit<'a>` is not satisfied
|
||||||
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [?1t, '^0.Named(DefId(0:15 ~ structually_relate_aliases[de75]::{impl#1}::'a), "'a")], def_id: DefId(0:5 ~ structually_relate_aliases[de75]::ToUnit::Unit), .. }
|
--> $DIR/structually-relate-aliases.rs:13:36
|
||||||
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [?1t, '^0.Named(DefId(0:15 ~ structually_relate_aliases[de75]::{impl#1}::'a), "'a")], def_id: DefId(0:5 ~ structually_relate_aliases[de75]::ToUnit::Unit), .. }
|
|
||||||
error[E0119]: conflicting implementations of trait `Overlap<for<'a> fn(&'a (), _)>` for type `for<'a> fn(&'a (), _)`
|
|
||||||
--> $DIR/structually-relate-aliases.rs:13:1
|
|
||||||
|
|
|
|
||||||
LL | impl<T> Overlap<T> for T {}
|
|
||||||
| ------------------------ first implementation here
|
|
||||||
LL |
|
|
||||||
LL | impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
|
LL | impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a> fn(&'a (), _)`
|
| ^^^^^^^^^^^^ the trait `for<'a> ToUnit<'a>` is not implemented for `T`
|
||||||
|
|
|
|
||||||
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
|
help: consider restricting type parameter `T`
|
||||||
|
|
|
||||||
|
LL | impl<T: for<'a> ToUnit<'a>> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
|
||||||
|
| ++++++++++++++++++++
|
||||||
|
|
||||||
error: aborting due to 1 previous error
|
error[E0277]: the trait bound `for<'a> T: ToUnit<'a>` is not satisfied
|
||||||
|
--> $DIR/structually-relate-aliases.rs:13:17
|
||||||
|
|
|
||||||
|
LL | impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> ToUnit<'a>` is not implemented for `T`
|
||||||
|
|
|
||||||
|
help: consider restricting type parameter `T`
|
||||||
|
|
|
||||||
|
LL | impl<T: for<'a> ToUnit<'a>> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
|
||||||
|
| ++++++++++++++++++++
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0119`.
|
error: aborting due to 2 previous errors
|
||||||
|
|
||||||
|
For more information about this error, try `rustc --explain E0277`.
|
||||||
|
@ -13,14 +13,14 @@ fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn weird0() -> impl Sized + !Sized {}
|
fn weird0() -> impl Sized + !Sized {}
|
||||||
//~^ ERROR the size for values of type `()` cannot be known at compilation time [E0277]
|
//~^ ERROR the trait bound `(): !Sized` is not satisfied
|
||||||
//~| ERROR the size for values of type `()` cannot be known at compilation time [E0277]
|
//~| ERROR the trait bound `(): !Sized` is not satisfied
|
||||||
//~| ERROR the size for values of type `()` cannot be known at compilation time [E0277]
|
//~| ERROR the trait bound `(): !Sized` is not satisfied
|
||||||
fn weird1() -> impl !Sized + Sized {}
|
fn weird1() -> impl !Sized + Sized {}
|
||||||
//~^ ERROR the size for values of type `()` cannot be known at compilation time [E0277]
|
//~^ ERROR the trait bound `(): !Sized` is not satisfied
|
||||||
//~| ERROR the size for values of type `()` cannot be known at compilation time [E0277]
|
//~| ERROR the trait bound `(): !Sized` is not satisfied
|
||||||
//~| ERROR the size for values of type `()` cannot be known at compilation time [E0277]
|
//~| ERROR the trait bound `(): !Sized` is not satisfied
|
||||||
fn weird2() -> impl !Sized {}
|
fn weird2() -> impl !Sized {}
|
||||||
//~^ ERROR the size for values of type `()` cannot be known at compilation time [E0277]
|
//~^ ERROR the trait bound `(): !Sized` is not satisfied
|
||||||
//~| ERROR the size for values of type `()` cannot be known at compilation time [E0277]
|
//~| ERROR the trait bound `(): !Sized` is not satisfied
|
||||||
//~| ERROR the size for values of type `()` cannot be known at compilation time [E0277]
|
//~| ERROR the trait bound `(): !Sized` is not satisfied
|
||||||
|
@ -1,74 +1,56 @@
|
|||||||
error[E0277]: the size for values of type `()` cannot be known at compilation time
|
error[E0277]: the trait bound `(): !Sized` is not satisfied
|
||||||
--> $DIR/opaque-type-unsatisfied-bound.rs:15:16
|
--> $DIR/opaque-type-unsatisfied-bound.rs:15:16
|
||||||
|
|
|
|
||||||
LL | fn weird0() -> impl Sized + !Sized {}
|
LL | fn weird0() -> impl Sized + !Sized {}
|
||||||
| ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
| ^^^^^^^^^^^^^^^^^^^ the trait bound `(): !Sized` is not satisfied
|
||||||
|
|
|
||||||
= help: the trait bound `(): !Sized` is not satisfied
|
|
||||||
|
|
||||||
error[E0277]: the size for values of type `()` cannot be known at compilation time
|
error[E0277]: the trait bound `(): !Sized` is not satisfied
|
||||||
--> $DIR/opaque-type-unsatisfied-bound.rs:15:36
|
--> $DIR/opaque-type-unsatisfied-bound.rs:15:36
|
||||||
|
|
|
|
||||||
LL | fn weird0() -> impl Sized + !Sized {}
|
LL | fn weird0() -> impl Sized + !Sized {}
|
||||||
| ^^ doesn't have a size known at compile-time
|
| ^^ the trait bound `(): !Sized` is not satisfied
|
||||||
|
|
|
||||||
= help: the trait bound `(): !Sized` is not satisfied
|
|
||||||
|
|
||||||
error[E0277]: the size for values of type `()` cannot be known at compilation time
|
error[E0277]: the trait bound `(): !Sized` is not satisfied
|
||||||
--> $DIR/opaque-type-unsatisfied-bound.rs:15:1
|
--> $DIR/opaque-type-unsatisfied-bound.rs:15:1
|
||||||
|
|
|
|
||||||
LL | fn weird0() -> impl Sized + !Sized {}
|
LL | fn weird0() -> impl Sized + !Sized {}
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait bound `(): !Sized` is not satisfied
|
||||||
|
|
|
||||||
= help: the trait bound `(): !Sized` is not satisfied
|
|
||||||
|
|
||||||
error[E0277]: the size for values of type `()` cannot be known at compilation time
|
error[E0277]: the trait bound `(): !Sized` is not satisfied
|
||||||
--> $DIR/opaque-type-unsatisfied-bound.rs:19:16
|
--> $DIR/opaque-type-unsatisfied-bound.rs:19:16
|
||||||
|
|
|
|
||||||
LL | fn weird1() -> impl !Sized + Sized {}
|
LL | fn weird1() -> impl !Sized + Sized {}
|
||||||
| ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
| ^^^^^^^^^^^^^^^^^^^ the trait bound `(): !Sized` is not satisfied
|
||||||
|
|
|
||||||
= help: the trait bound `(): !Sized` is not satisfied
|
|
||||||
|
|
||||||
error[E0277]: the size for values of type `()` cannot be known at compilation time
|
error[E0277]: the trait bound `(): !Sized` is not satisfied
|
||||||
--> $DIR/opaque-type-unsatisfied-bound.rs:19:36
|
--> $DIR/opaque-type-unsatisfied-bound.rs:19:36
|
||||||
|
|
|
|
||||||
LL | fn weird1() -> impl !Sized + Sized {}
|
LL | fn weird1() -> impl !Sized + Sized {}
|
||||||
| ^^ doesn't have a size known at compile-time
|
| ^^ the trait bound `(): !Sized` is not satisfied
|
||||||
|
|
|
||||||
= help: the trait bound `(): !Sized` is not satisfied
|
|
||||||
|
|
||||||
error[E0277]: the size for values of type `()` cannot be known at compilation time
|
error[E0277]: the trait bound `(): !Sized` is not satisfied
|
||||||
--> $DIR/opaque-type-unsatisfied-bound.rs:19:1
|
--> $DIR/opaque-type-unsatisfied-bound.rs:19:1
|
||||||
|
|
|
|
||||||
LL | fn weird1() -> impl !Sized + Sized {}
|
LL | fn weird1() -> impl !Sized + Sized {}
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait bound `(): !Sized` is not satisfied
|
||||||
|
|
|
||||||
= help: the trait bound `(): !Sized` is not satisfied
|
|
||||||
|
|
||||||
error[E0277]: the size for values of type `()` cannot be known at compilation time
|
error[E0277]: the trait bound `(): !Sized` is not satisfied
|
||||||
--> $DIR/opaque-type-unsatisfied-bound.rs:23:16
|
--> $DIR/opaque-type-unsatisfied-bound.rs:23:16
|
||||||
|
|
|
|
||||||
LL | fn weird2() -> impl !Sized {}
|
LL | fn weird2() -> impl !Sized {}
|
||||||
| ^^^^^^^^^^^ doesn't have a size known at compile-time
|
| ^^^^^^^^^^^ the trait bound `(): !Sized` is not satisfied
|
||||||
|
|
|
||||||
= help: the trait bound `(): !Sized` is not satisfied
|
|
||||||
|
|
||||||
error[E0277]: the size for values of type `()` cannot be known at compilation time
|
error[E0277]: the trait bound `(): !Sized` is not satisfied
|
||||||
--> $DIR/opaque-type-unsatisfied-bound.rs:23:28
|
--> $DIR/opaque-type-unsatisfied-bound.rs:23:28
|
||||||
|
|
|
|
||||||
LL | fn weird2() -> impl !Sized {}
|
LL | fn weird2() -> impl !Sized {}
|
||||||
| ^^ doesn't have a size known at compile-time
|
| ^^ the trait bound `(): !Sized` is not satisfied
|
||||||
|
|
|
||||||
= help: the trait bound `(): !Sized` is not satisfied
|
|
||||||
|
|
||||||
error[E0277]: the size for values of type `()` cannot be known at compilation time
|
error[E0277]: the trait bound `(): !Sized` is not satisfied
|
||||||
--> $DIR/opaque-type-unsatisfied-bound.rs:23:1
|
--> $DIR/opaque-type-unsatisfied-bound.rs:23:1
|
||||||
|
|
|
|
||||||
LL | fn weird2() -> impl !Sized {}
|
LL | fn weird2() -> impl !Sized {}
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait bound `(): !Sized` is not satisfied
|
||||||
|
|
|
||||||
= help: the trait bound `(): !Sized` is not satisfied
|
|
||||||
|
|
||||||
error[E0277]: the trait bound `impl !Trait: Trait` is not satisfied
|
error[E0277]: the trait bound `impl !Trait: Trait` is not satisfied
|
||||||
--> $DIR/opaque-type-unsatisfied-bound.rs:12:13
|
--> $DIR/opaque-type-unsatisfied-bound.rs:12:13
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
#![feature(negative_bounds, unboxed_closures)]
|
#![feature(negative_bounds, unboxed_closures)]
|
||||||
|
|
||||||
fn produce() -> impl !Fn<(u32,)> {}
|
fn produce() -> impl !Fn<(u32,)> {}
|
||||||
//~^ ERROR expected a `Fn(u32)` closure, found `()`
|
//~^ ERROR the trait bound `(): !Fn(u32)` is not satisfied
|
||||||
//~| ERROR expected a `Fn(u32)` closure, found `()`
|
//~| ERROR the trait bound `(): !Fn(u32)` is not satisfied
|
||||||
//~| ERROR expected a `Fn(u32)` closure, found `()`
|
//~| ERROR the trait bound `(): !Fn(u32)` is not satisfied
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,26 +1,20 @@
|
|||||||
error[E0277]: expected a `Fn(u32)` closure, found `()`
|
error[E0277]: the trait bound `(): !Fn(u32)` is not satisfied
|
||||||
--> $DIR/opaque-type-unsatisfied-fn-bound.rs:5:17
|
--> $DIR/opaque-type-unsatisfied-fn-bound.rs:5:17
|
||||||
|
|
|
|
||||||
LL | fn produce() -> impl !Fn<(u32,)> {}
|
LL | fn produce() -> impl !Fn<(u32,)> {}
|
||||||
| ^^^^^^^^^^^^^^^^ expected an `Fn(u32)` closure, found `()`
|
| ^^^^^^^^^^^^^^^^ the trait bound `(): !Fn(u32)` is not satisfied
|
||||||
|
|
|
||||||
= help: the trait bound `(): !Fn(u32)` is not satisfied
|
|
||||||
|
|
||||||
error[E0277]: expected a `Fn(u32)` closure, found `()`
|
error[E0277]: the trait bound `(): !Fn(u32)` is not satisfied
|
||||||
--> $DIR/opaque-type-unsatisfied-fn-bound.rs:5:34
|
--> $DIR/opaque-type-unsatisfied-fn-bound.rs:5:34
|
||||||
|
|
|
|
||||||
LL | fn produce() -> impl !Fn<(u32,)> {}
|
LL | fn produce() -> impl !Fn<(u32,)> {}
|
||||||
| ^^ expected an `Fn(u32)` closure, found `()`
|
| ^^ the trait bound `(): !Fn(u32)` is not satisfied
|
||||||
|
|
|
||||||
= help: the trait bound `(): !Fn(u32)` is not satisfied
|
|
||||||
|
|
||||||
error[E0277]: expected a `Fn(u32)` closure, found `()`
|
error[E0277]: the trait bound `(): !Fn(u32)` is not satisfied
|
||||||
--> $DIR/opaque-type-unsatisfied-fn-bound.rs:5:1
|
--> $DIR/opaque-type-unsatisfied-fn-bound.rs:5:1
|
||||||
|
|
|
|
||||||
LL | fn produce() -> impl !Fn<(u32,)> {}
|
LL | fn produce() -> impl !Fn<(u32,)> {}
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an `Fn(u32)` closure, found `()`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait bound `(): !Fn(u32)` is not satisfied
|
||||||
|
|
|
||||||
= help: the trait bound `(): !Fn(u32)` is not satisfied
|
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
error: aborting due to 3 previous errors
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user