-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bye bye
assemble_candidates_via_self_ty
- Loading branch information
Showing
13 changed files
with
129 additions
and
133 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
19 changes: 19 additions & 0 deletions
19
tests/ui/traits/next-solver/assembly/ambig-projection-self-is-ambig.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,19 @@ | ||
// check-pass | ||
// compile-flags: -Znext-solver | ||
|
||
trait Reader: Default { | ||
fn read_u8_array<A>(&self) -> Result<A, ()> { | ||
todo!() | ||
} | ||
|
||
fn read_u8(&self) -> Result<u8, ()> { | ||
let a: [u8; 1] = self.read_u8_array::<_>()?; | ||
// This results in a nested `<Result<?0, ()> as Try>::Residual: Sized` goal. | ||
// The self type normalizes to `?0`. We previously did not force that to be | ||
// ambiguous but instead incompletely applied the `Self: Sized` candidate | ||
// from the `ParamEnv`, resulting in a type error. | ||
Ok(a[0]) | ||
} | ||
} | ||
|
||
fn main() {} |
16 changes: 16 additions & 0 deletions
16
tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.is_send.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,16 @@ | ||
error[E0283]: type annotations needed: cannot satisfy `Foo: Send` | ||
--> $DIR/dont-type_of-tait-in-defining-scope.rs:15:18 | ||
| | ||
LL | needs_send::<Foo>(); | ||
| ^^^ | ||
| | ||
= note: cannot satisfy `Foo: Send` | ||
note: required by a bound in `needs_send` | ||
--> $DIR/dont-type_of-tait-in-defining-scope.rs:12:18 | ||
| | ||
LL | fn needs_send<T: Send>() {} | ||
| ^^^^ required by this bound in `needs_send` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0283`. |
4 changes: 2 additions & 2 deletions
4
tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.not_send.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
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