-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 #87400 - JohnTitor:rollup-zbwyuxi, r=JohnTitor
Rollup of 8 pull requests Successful merges: - #87034 (DOC: fix hypothetical Rust code in `step_by()` docstring) - #87298 (memorialize Anna Harren in the bastion of the turbofish) - #87332 (Don't hide fields of enum struct variants) - #87362 (Make `x.py d` an alias for `x.py doc`) - #87372 (Move calls to test_main into one function) - #87373 (Extend HIR WF checking to fields) - #87376 (Change rustdoc logo to use the full container size) - #87383 (Add regression tests for the impl_trait_in_bindings ICEs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
34 changed files
with
276 additions
and
47 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
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,7 @@ | ||
use std::fmt::Debug; | ||
|
||
fn main() { | ||
let x: Option<impl Debug> = Some(44_u32); | ||
//~^ `impl Trait` not allowed outside of function and method return types | ||
println!("{:?}", x); | ||
} |
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[E0562]: `impl Trait` not allowed outside of function and method return types | ||
--> $DIR/issue-54600.rs:4:19 | ||
| | ||
LL | let x: Option<impl Debug> = Some(44_u32); | ||
| ^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0562`. |
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 @@ | ||
use std::ops::Add; | ||
|
||
fn main() { | ||
let i: i32 = 0; | ||
let j: &impl Add = &i; | ||
//~^ `impl Trait` not allowed outside of function and method return types | ||
} |
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[E0562]: `impl Trait` not allowed outside of function and method return types | ||
--> $DIR/issue-54840.rs:5:13 | ||
| | ||
LL | let j: &impl Add = &i; | ||
| ^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0562`. |
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,12 @@ | ||
#![feature(generators, generator_trait, never_type)] | ||
|
||
use std::ops::Generator; | ||
|
||
fn mk_gen() -> impl Generator<Return=!, Yield=()> { | ||
|| { loop { yield; } } | ||
} | ||
|
||
fn main() { | ||
let gens: [impl Generator<Return=!, Yield=()>;2] = [ mk_gen(), mk_gen() ]; | ||
//~^ `impl Trait` not allowed outside of function and method return types | ||
} |
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[E0562]: `impl Trait` not allowed outside of function and method return types | ||
--> $DIR/issue-58504.rs:10:16 | ||
| | ||
LL | let gens: [impl Generator<Return=!, Yield=()>;2] = [ mk_gen(), mk_gen() ]; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0562`. |
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,14 @@ | ||
trait Lam {} | ||
|
||
pub struct B; | ||
impl Lam for B {} | ||
pub struct Wrap<T>(T); | ||
|
||
const _A: impl Lam = { | ||
//~^ `impl Trait` not allowed outside of function and method return types | ||
let x: Wrap<impl Lam> = Wrap(B); | ||
//~^ `impl Trait` not allowed outside of function and method return types | ||
x.0 | ||
}; | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
error[E0562]: `impl Trait` not allowed outside of function and method return types | ||
--> $DIR/issue-58956.rs:7:11 | ||
| | ||
LL | const _A: impl Lam = { | ||
| ^^^^^^^^ | ||
|
||
error[E0562]: `impl Trait` not allowed outside of function and method return types | ||
--> $DIR/issue-58956.rs:9:17 | ||
| | ||
LL | let x: Wrap<impl Lam> = Wrap(B); | ||
| ^^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0562`. |
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,4 @@ | ||
fn main() { | ||
let x : (impl Copy,) = (true,); | ||
//~^ `impl Trait` not allowed outside of function and method return types | ||
} |
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[E0562]: `impl Trait` not allowed outside of function and method return types | ||
--> $DIR/issue-70971.rs:2:14 | ||
| | ||
LL | let x : (impl Copy,) = (true,); | ||
| ^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0562`. |
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,10 @@ | ||
struct Bug { | ||
V1: [(); { | ||
let f: impl core::future::Future<Output = u8> = async { 1 }; | ||
//~^ `impl Trait` not allowed outside of function and method return types | ||
//~| expected identifier | ||
1 | ||
}], | ||
} | ||
|
||
fn main() {} |
Oops, something went wrong.