parent
4d1e502122
commit
ea14c4a48f
4 changed files with 18 additions and 13 deletions
|
|
@ -1,6 +0,0 @@
|
|||
//@ known-bug: #134355
|
||||
|
||||
//@compile-flags: --crate-type=lib
|
||||
fn digit() -> str {
|
||||
return { i32::MIN };
|
||||
}
|
||||
|
|
@ -17,12 +17,20 @@ LL | type LineStream<'c, 'd> = impl Stream;
|
|||
| |
|
||||
| found 0 type parameters
|
||||
|
||||
error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> == ()`
|
||||
error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to ()`
|
||||
--> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:28:43
|
||||
|
|
||||
LL | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
|
||||
|
||||
error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to _`
|
||||
--> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:28:43
|
||||
|
|
||||
LL | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
|
||||
|
|
||||
= note: the return type of a function must have a statically known size
|
||||
|
||||
error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to _`
|
||||
--> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:28:73
|
||||
|
|
||||
|
|
@ -35,7 +43,7 @@ error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normali
|
|||
LL | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0049, E0271, E0407.
|
||||
For more information about an error, try `rustc --explain E0049`.
|
||||
|
|
|
|||
|
|
@ -28,9 +28,10 @@ impl X for Y {
|
|||
fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}
|
||||
//~^ method `line_stream` is not a member of trait `X`
|
||||
//[current]~^^ ERROR `()` is not a future
|
||||
//[next]~^^^ ERROR type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> == ()`
|
||||
//[next]~| ERROR type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to _`
|
||||
//[next]~| ERROR type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to _`
|
||||
//[next]~| ERROR type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to ()`
|
||||
//[next]~| ERROR type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to _`
|
||||
}
|
||||
|
||||
pub fn main() {}
|
||||
|
|
|
|||
|
|
@ -181,8 +181,9 @@ LL | fn hat() -> dyn std::fmt::Display {
|
|||
|
|
||||
help: consider returning an `impl Trait` instead of a `dyn Trait`
|
||||
|
|
||||
LL | fn hat() -> impl std::fmt::Display {
|
||||
| ~~~~
|
||||
LL - fn hat() -> dyn std::fmt::Display {
|
||||
LL + fn hat() -> impl std::fmt::Display {
|
||||
|
|
||||
help: alternatively, box the return type, and wrap all of the returned values in `Box::new`
|
||||
|
|
||||
LL ~ fn hat() -> Box<dyn std::fmt::Display> {
|
||||
|
|
@ -202,8 +203,9 @@ LL | fn pug() -> dyn std::fmt::Display {
|
|||
|
|
||||
help: consider returning an `impl Trait` instead of a `dyn Trait`
|
||||
|
|
||||
LL | fn pug() -> impl std::fmt::Display {
|
||||
| ~~~~
|
||||
LL - fn pug() -> dyn std::fmt::Display {
|
||||
LL + fn pug() -> impl std::fmt::Display {
|
||||
|
|
||||
help: alternatively, box the return type, and wrap all of the returned values in `Box::new`
|
||||
|
|
||||
LL ~ fn pug() -> Box<dyn std::fmt::Display> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue