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#72468 - Elinvynia:backport, r=Mark-Simulacrum
[beta] Rollup backports This includes: * Fail if I/O error occurs during testing rust-lang#72089 * Fix hang in lexical_region_resolve rust-lang#72087 * Fix E0284 to not use incorrect wording rust-lang#71960 * Bump pulldown-cmark rust-lang#71682
- Loading branch information
Showing
13 changed files
with
148 additions
and
24 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
12 changes: 4 additions & 8 deletions
12
src/test/ui/associated-types/associated-types-overridden-binding.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Regression test for #69455: projection predicate was not satisfied. | ||
// Compiler should indicate the correct location of the | ||
// unsatisfied projection predicate | ||
|
||
pub trait Test<Rhs = Self> { | ||
type Output; | ||
|
||
fn test(self, rhs: Rhs) -> Self::Output; | ||
} | ||
|
||
impl Test<u32> for u64 { | ||
type Output = u64; | ||
|
||
fn test(self, other: u32) -> u64 { | ||
self + (other as u64) | ||
} | ||
} | ||
|
||
impl Test<u64> for u64 { | ||
type Output = u64; | ||
|
||
fn test(self, other: u64) -> u64 { | ||
(self + other) as u64 | ||
} | ||
} | ||
|
||
fn main() { | ||
let xs: Vec<u64> = vec![1, 2, 3]; | ||
println!("{}", 23u64.test(xs.iter().sum())); //~ ERROR: type annotations needed | ||
} |
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,9 @@ | ||
error[E0284]: type annotations needed: cannot satisfy `<u64 as Test<_>>::Output == _` | ||
--> $DIR/issue-69455.rs:29:26 | ||
| | ||
LL | println!("{}", 23u64.test(xs.iter().sum())); | ||
| ^^^^ cannot satisfy `<u64 as Test<_>>::Output == _` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0284`. |
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,32 @@ | ||
pub trait Element<S> { | ||
type Array; | ||
} | ||
|
||
impl<T> Element<()> for T { | ||
type Array = T; | ||
} | ||
|
||
impl<T: Element<S>, S> Element<[S; 3]> for T { | ||
type Array = [T::Array; 3]; | ||
} | ||
|
||
trait Foo<I> | ||
where | ||
u8: Element<I>, | ||
{ | ||
fn foo(self, x: <u8 as Element<I>>::Array); | ||
} | ||
|
||
impl<I> Foo<I> for u16 | ||
where | ||
u8: Element<I>, | ||
{ | ||
fn foo(self, _: <u8 as Element<I>>::Array) {} | ||
} | ||
|
||
fn main() { | ||
let b: [u8; 3] = [0u8; 3]; | ||
|
||
0u16.foo(b); //~ ERROR type annotations needed | ||
//<u16 as Foo<[(); 3]>>::foo(0u16, b); | ||
} |
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,9 @@ | ||
error[E0284]: type annotations needed: cannot satisfy `<u8 as Element<_>>::Array == [u8; 3]` | ||
--> $DIR/issue-69683.rs:30:10 | ||
| | ||
LL | 0u16.foo(b); | ||
| ^^^ cannot satisfy `<u8 as Element<_>>::Array == [u8; 3]` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0284`. |
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,5 @@ | ||
fn main() { | ||
let n: u32 = 1; | ||
let mut d: u64 = 2; | ||
d = d % n.into(); //~ ERROR type annotations needed | ||
} |
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,9 @@ | ||
error[E0284]: type annotations needed: cannot satisfy `<u64 as std::ops::Rem<_>>::Output == u64` | ||
--> $DIR/issue-71584.rs:4:11 | ||
| | ||
LL | d = d % n.into(); | ||
| ^ cannot satisfy `<u64 as std::ops::Rem<_>>::Output == u64` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0284`. |
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,7 @@ | ||
// Regression test for #72051, hang when resolving regions. | ||
|
||
// check-pass | ||
// edition:2018 | ||
|
||
pub async fn query<'a>(_: &(), _: &(), _: (&(dyn std::any::Any + 'a),) ) {} | ||
fn main() {} |
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