Repository navigation
ui test next-solver diff #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,16 @@ | ||
| error[E0308]: const not compatible with trait | ||
| error[E0478]: lifetime bound not satisfied | ||
| --> $DIR/associated-const-impl-wrong-lifetime.rs:7:5 | ||
| | | ||
| LL | const NAME: &'a str = "unit"; | ||
| | ^^^^^^^^^^^^^^^^^^^ lifetime mismatch | ||
| | ^^^^^^^^^^^^^^^^^^^ | ||
| | | ||
| = note: expected reference `&'static _` | ||
| found reference `&'a _` | ||
| note: the lifetime `'a` as defined here... | ||
| note: lifetime parameter instantiated with the lifetime `'a` as defined here | ||
| --> $DIR/associated-const-impl-wrong-lifetime.rs:6:6 | ||
| | | ||
| LL | impl<'a> Foo for &'a () { | ||
| | ^^ | ||
| = note: ...does not necessarily outlive the static lifetime | ||
| = note: but lifetime parameter must outlive the static lifetime | ||
|
|
||
| error: aborting due to 1 previous error | ||
|
|
||
| For more information about this error, try `rustc --explain E0308`. | ||
| For more information about this error, try `rustc --explain E0478`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,14 @@ | ||
| error: constant expression depends on a generic parameter | ||
| --> $DIR/associated-const-type-parameter-arrays-2.rs:16:22 | ||
| error[E0282]: type annotations needed for `[{integer}; _]` | ||
| --> $DIR/associated-const-type-parameter-arrays-2.rs:16:9 | ||
| | | ||
| LL | let _array = [4; <A as Foo>::Y]; | ||
| | ^^^^^^^^^^^^^ | ||
| | ^^^^^^ - type must be known at this point | ||
| | | ||
| = note: this may fail depending on what value the parameter takes | ||
|
|
||
| error: constant expression depends on a generic parameter | ||
| --> $DIR/associated-const-type-parameter-arrays-2.rs:16:18 | ||
| | | ||
| LL | let _array = [4; <A as Foo>::Y]; | ||
| | ^^^^^^^^^^^^^^^^^^ | ||
| help: consider giving `_array` an explicit type, where the placeholders `_` are specified | ||
| | | ||
| = note: this may fail depending on what value the parameter takes | ||
| LL | let _array: [{integer}; _] = [4; <A as Foo>::Y]; | ||
| | ++++++++++++++++ | ||
|
|
||
| error: aborting due to 2 previous errors | ||
| error: aborting due to 1 previous error | ||
|
|
||
| For more information about this error, try `rustc --explain E0282`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,13 +16,6 @@ error[E0277]: the trait bound `String: Copy` is not satisfied | |
| | | ||
| LL | const _: Ty::Pr<String> = String::new(); | ||
| | ^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String` | ||
| | | ||
| note: required by a bound in `Ty::Pr` | ||
| --> $DIR/generic-associated-types-bad.rs:10:16 | ||
| | | ||
| LL | impl Ty { | ||
| LL | type Pr<T: Copy> = T; | ||
| | ^^^^ required by this bound in `Ty::Pr` | ||
|
Comment on lines
-19
to
-25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we lose these? We don't carry an appropriate obligation cause code? |
||
|
|
||
| error: aborting due to 2 previous errors | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,44 +1,23 @@ | ||
| error[E0308]: mismatched types | ||
| error[E0271]: type mismatch resolving `Foo<fn(&())>::Assoc == u32` | ||
| --> $DIR/issue-109789.rs:18:11 | ||
| | | ||
| LL | fn bar(_: Foo<for<'a> fn(&'a ())>::Assoc) {} | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other | ||
| | | ||
| = note: expected struct `Foo<fn(&'static ())>` | ||
| found struct `Foo<for<'a> fn(&'a ())>` | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ | ||
|
|
||
| error[E0308]: mismatched types | ||
| error: the type `Foo<for<'a> fn(&'a ())>::Assoc` is not well-formed | ||
| --> $DIR/issue-109789.rs:18:11 | ||
| | | ||
| LL | fn bar(_: Foo<for<'a> fn(&'a ())>::Assoc) {} | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other | ||
| | | ||
| = note: expected struct `Foo<fn(&'static ())>` | ||
| found struct `Foo<for<'a> fn(&'a ())>` | ||
| = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
|
|
||
| error: higher-ranked subtype error | ||
| --> $DIR/issue-109789.rs:18:1 | ||
| | | ||
| LL | fn bar(_: Foo<for<'a> fn(&'a ())>::Assoc) {} | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| error: higher-ranked subtype error | ||
| --> $DIR/issue-109789.rs:18:1 | ||
| | | ||
| LL | fn bar(_: Foo<for<'a> fn(&'a ())>::Assoc) {} | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | | ||
| = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
|
|
||
| error: higher-ranked subtype error | ||
| --> $DIR/issue-109789.rs:18:1 | ||
| error[E0271]: type mismatch resolving `Foo<fn(&())>::Assoc == u32` | ||
| --> $DIR/issue-109789.rs:18:11 | ||
| | | ||
| LL | fn bar(_: Foo<for<'a> fn(&'a ())>::Assoc) {} | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ | ||
| | | ||
| = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
|
|
||
| error: aborting due to 5 previous errors | ||
| error: aborting due to 3 previous errors | ||
|
|
||
| For more information about this error, try `rustc --explain E0308`. | ||
| For more information about this error, try `rustc --explain E0271`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,15 @@ | ||
| error: overflow evaluating associated type `Carrier<'b>::Focus<i32>` | ||
| error[E0275]: overflow evaluating the requirement `for<'b> Carrier<'b>::Focus<i32> == _` | ||
| --> $DIR/issue-111879-0.rs:9:5 | ||
| | | ||
| LL | pub type Focus<T> = &'a mut for<'b> fn(Carrier<'b>::Focus<i32>); | ||
| | ^^^^^^^^^^^^^^^^^ | ||
|
|
||
| error: aborting due to 1 previous error | ||
| error[E0275]: overflow evaluating whether `&'a mut for<'b> fn(Carrier<'b>::Focus<i32>)` is well-formed | ||
| --> $DIR/issue-111879-0.rs:9:5 | ||
| | | ||
| LL | pub type Focus<T> = &'a mut for<'b> fn(Carrier<'b>::Focus<i32>); | ||
| | ^^^^^^^^^^^^^^^^^ | ||
|
|
||
| error: aborting due to 2 previous errors | ||
|
|
||
| For more information about this error, try `rustc --explain E0275`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ error[E0282]: type annotations needed | |
| LL | iter::empty() | ||
| | ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty` | ||
| | | ||
| = note: cannot infer type of hidden type of opaque | ||
| help: consider specifying a concrete type for the type parameter `T` | ||
| | | ||
| LL | iter::empty::</* Type */>() | ||
|
|
@@ -15,6 +16,7 @@ error[E0282]: type annotations needed | |
| LL | iter::empty() | ||
| | ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty` | ||
| | | ||
| = note: cannot infer type of hidden type of opaque | ||
| help: consider specifying a concrete type for the type parameter `T` | ||
| | | ||
| LL | iter::empty::</* Type */>() | ||
|
|
@@ -26,6 +28,7 @@ error[E0282]: type annotations needed | |
| LL | iter::empty() | ||
| | ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty` | ||
| | | ||
| = note: cannot infer type of hidden type of opaque | ||
| help: consider specifying a concrete type for the type parameter `T` | ||
| | | ||
| LL | iter::empty::</* Type */>() | ||
|
|
@@ -84,9 +87,6 @@ error[E0277]: `*const ()` cannot be sent between threads safely | |
| | | ||
| LL | fn mismatch() -> impl Iterator<Item: Copy, Item: Send> { | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely | ||
| LL | | ||
| LL | iter::empty::<*const ()>() | ||
| | -------------------------- return type was inferred to be `std::iter::Empty<*const ()>` here | ||
|
Comment on lines
-87
to
-89
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suspect that recovering the "point at the return expression(s)" logic in the new solver should be doable? Might possibly need replacing some obligation cause codes so that appropriate info is tracked though. |
||
| | | ||
| = help: the trait `Send` is not implemented for `*const ()` | ||
|
|
||
|
|
@@ -95,32 +95,18 @@ error[E0277]: the trait bound `String: Copy` is not satisfied | |
| | | ||
| LL | fn mismatch_2() -> impl Iterator<Item: Copy, Item: Send> { | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String` | ||
| LL | | ||
| LL | iter::empty::<String>() | ||
| | ----------------------- return type was inferred to be `std::iter::Empty<String>` here | ||
|
|
||
| error[E0271]: expected `IntoIter<u32, 1>` to be an iterator that yields `i32`, but it yields `u32` | ||
| --> $DIR/duplicate-bound-err.rs:103:17 | ||
| | | ||
| LL | fn foo() -> impl Iterator<Item = i32, Item = u32> { | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u32` | ||
| ... | ||
| LL | [2u32].into_iter() | ||
| | ------------------ return type was inferred to be `std::array::IntoIter<u32, 1>` here | ||
| | | ||
| note: the method call chain might not have had the expected associated types | ||
| --> $DIR/duplicate-bound-err.rs:106:16 | ||
| | | ||
| LL | [2u32].into_iter() | ||
| | ------ ^^^^^^^^^^^ `Iterator::Item` is `u32` here | ||
| | | | ||
| | this expression has type `[u32; 1]` | ||
|
|
||
| error[E0271]: expected `impl Iterator<Item = u32>` to be an iterator that yields `i32`, but it yields `u32` | ||
| error[E0284]: type annotations needed: cannot satisfy `<impl Iterator<Item = u32> as Iterator>::Item == i32` | ||
| --> $DIR/duplicate-bound-err.rs:103:17 | ||
| | | ||
| LL | fn foo() -> impl Iterator<Item = i32, Item = u32> { | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u32` | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot satisfy `<impl Iterator<Item = u32> as Iterator>::Item == i32` | ||
|
Comment on lines
+105
to
+109
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, unfortunate. |
||
| | | ||
| note: required by a bound in `Trait3::foo::{anon_assoc#0}` | ||
| --> $DIR/duplicate-bound-err.rs:99:31 | ||
|
|
@@ -273,5 +259,5 @@ LL | fn uncallable_rtn(_: impl Trait<foo(..): Trait<ASSOC = 3>, foo(..): Trait<A | |
|
|
||
| error: aborting due to 25 previous errors | ||
|
|
||
| Some errors have detailed explanations: E0271, E0277, E0282, E0719. | ||
| Some errors have detailed explanations: E0271, E0277, E0282, E0284, E0719. | ||
| For more information about an error, try `rustc --explain E0271`. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish we silenced these kind of errors (that are already implied by others)