forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#130888 - cuviper:beta-next, r=cuviper
[beta] backports - Use equality when relating formal and expected type in arg checking rust-lang#129317 - Don't call `extern_crate` when local crate name is the same as a dependency and we have a trait error rust-lang#130275 - bootstrap: Set the dylib path when building books with rustdoc rust-lang#130536 r? cuviper
- Loading branch information
Showing
10 changed files
with
145 additions
and
91 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//@ check-pass | ||
|
||
// Regression test for for #129286. | ||
// Makes sure that we don't have unconstrained type variables that come from | ||
// bivariant type parameters due to the way that we construct expectation types | ||
// when checking call expressions in HIR typeck. | ||
|
||
trait Trait { | ||
type Item; | ||
} | ||
|
||
struct Struct<A: Trait<Item = B>, B> { | ||
pub field: A, | ||
} | ||
|
||
fn identity<T>(x: T) -> T { | ||
x | ||
} | ||
|
||
fn test<A: Trait<Item = B>, B>(x: &Struct<A, B>) { | ||
let x: &Struct<_, _> = identity(x); | ||
} | ||
|
||
fn main() {} |
1 change: 1 addition & 0 deletions
1
tests/ui/typeck/auxiliary/foreign_struct_trait_unimplemented.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 @@ | ||
pub struct B; |
Oops, something went wrong.