-
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 #101508 - JohnTitor:rollup-i5i2vqc, r=JohnTitor
Rollup of 8 pull requests Successful merges: - #101451 (Add incremental test for changing struct name in assoc type.) - #101468 (fix RPIT ICE for implicit HRTB when missing dyn) - #101481 (Fix compile errors for uwp-windows-msvc targets) - #101484 (Remove dead broken code from const zst handling in backends) - #101486 (Add list of recognized repr attributes to the unrecognized repr error) - #101488 (rustdoc: remove unused CSS `#results > table`) - #101491 (rustdoc: remove outdated CSS `.sub-variant > div > .item-info`) - #101497 (:arrow_up: rust-analyzer) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
72 changed files
with
3,112 additions
and
949 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
65 changes: 65 additions & 0 deletions
65
src/test/incremental/issue-100521-change-struct-name-assocty.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,65 @@ | ||
// revisions: rpass1 rpass2 | ||
|
||
pub fn foo() { | ||
bar(); | ||
baz::<()>(); | ||
} | ||
|
||
fn bar() | ||
where | ||
<() as Table>::AllColumns:, | ||
{ | ||
} | ||
|
||
fn baz<W>() | ||
where | ||
W: AsQuery, | ||
<W as AsQuery>::Query:, | ||
{ | ||
} | ||
|
||
trait AsQuery { | ||
type Query; | ||
} | ||
|
||
trait UnimplementedTrait {} | ||
|
||
impl<T> AsQuery for T | ||
where | ||
T: UnimplementedTrait, | ||
{ | ||
type Query = (); | ||
} | ||
|
||
struct Wrapper<Expr>(Expr); | ||
|
||
impl<Ret> AsQuery for Wrapper<Ret> { | ||
type Query = (); | ||
} | ||
|
||
impl AsQuery for () | ||
where | ||
Wrapper<<() as Table>::AllColumns>: AsQuery, | ||
{ | ||
type Query = (); | ||
} | ||
|
||
trait Table { | ||
type AllColumns; | ||
} | ||
|
||
#[cfg(rpass1)] | ||
impl Table for () { | ||
type AllColumns = Checksum1; | ||
} | ||
#[cfg(rpass1)] | ||
struct Checksum1; | ||
|
||
#[cfg(rpass2)] | ||
impl Table for () { | ||
type AllColumns = Checksum2; | ||
} | ||
#[cfg(rpass2)] | ||
struct Checksum2; | ||
|
||
fn main() {} |
9 changes: 9 additions & 0 deletions
9
src/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.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,9 @@ | ||
error[E0277]: the trait bound `(): AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not satisfied | ||
--> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:13 | ||
| | ||
LL | fn ice() -> impl AsRef<Fn(&())> { | ||
| ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not implemented for `()` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
22 changes: 22 additions & 0 deletions
22
src/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.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,22 @@ | ||
error[E0782]: trait objects must include the `dyn` keyword | ||
--> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:24 | ||
| | ||
LL | fn ice() -> impl AsRef<Fn(&())> { | ||
| ^^^^^^^ | ||
| | ||
help: add `dyn` keyword before this trait | ||
| | ||
LL - fn ice() -> impl AsRef<Fn(&())> { | ||
LL + fn ice() -> impl AsRef<dyn Fn(&())> { | ||
| | ||
|
||
error[E0277]: the trait bound `(): AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not satisfied | ||
--> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:13 | ||
| | ||
LL | fn ice() -> impl AsRef<Fn(&())> { | ||
| ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not implemented for `()` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0277, E0782. | ||
For more information about an error, try `rustc --explain E0277`. |
12 changes: 12 additions & 0 deletions
12
src/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.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,12 @@ | ||
// revisions: edition2015 edition2021 | ||
//[edition2021]edition:2021 | ||
|
||
#![allow(warnings)] | ||
|
||
fn ice() -> impl AsRef<Fn(&())> { | ||
//~^ ERROR: the trait bound `(): AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not satisfied [E0277] | ||
//[edition2021]~| ERROR: trait objects must include the `dyn` keyword [E0782] | ||
todo!() | ||
} | ||
|
||
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
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,17 @@ | ||
#![crate_type = "lib"] | ||
|
||
#[repr(uwu)] //~ERROR: unrecognized representation hint | ||
pub struct OwO; | ||
|
||
#[repr(uwu = "a")] //~ERROR: unrecognized representation hint | ||
pub struct OwO2(i32); | ||
|
||
#[repr(uwu(4))] //~ERROR: unrecognized representation hint | ||
pub struct OwO3 { | ||
x: i32, | ||
} | ||
|
||
#[repr(uwu, u8)] //~ERROR: unrecognized representation hint | ||
pub enum OwO4 { | ||
UwU = 1, | ||
} |
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,35 @@ | ||
error[E0552]: unrecognized representation hint | ||
--> $DIR/invalid_repr_list_help.rs:3:8 | ||
| | ||
LL | #[repr(uwu)] | ||
| ^^^ | ||
| | ||
= help: valid reprs are `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize` | ||
|
||
error[E0552]: unrecognized representation hint | ||
--> $DIR/invalid_repr_list_help.rs:6:8 | ||
| | ||
LL | #[repr(uwu = "a")] | ||
| ^^^^^^^^^ | ||
| | ||
= help: valid reprs are `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize` | ||
|
||
error[E0552]: unrecognized representation hint | ||
--> $DIR/invalid_repr_list_help.rs:9:8 | ||
| | ||
LL | #[repr(uwu(4))] | ||
| ^^^^^^ | ||
| | ||
= help: valid reprs are `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize` | ||
|
||
error[E0552]: unrecognized representation hint | ||
--> $DIR/invalid_repr_list_help.rs:14:8 | ||
| | ||
LL | #[repr(uwu, u8)] | ||
| ^^^ | ||
| | ||
= help: valid reprs are `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize` | ||
|
||
error: aborting due to 4 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0552`. |
Oops, something went wrong.