-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 #91486 - matthiaskrgr:rollup-699fo18, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - #88906 (Implement write() method for Box<MaybeUninit<T>>) - #90269 (Make `Option::expect` unstably const) - #90854 (Type can be unsized and uninhabited) - #91170 (rustdoc: preload fonts) - #91273 (Fix ICE #91268 by checking that the snippet ends with a `)`) - #91381 (Android: -ldl must appear after -lgcc when linking) - #91453 (Document Windows TLS drop behaviour) - #91462 (Use try_normalize_erasing_regions in needs_drop) - #91474 (suppress warning about set_errno being unused on DragonFly) - #91483 (Sync rustfmt subtree) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
63 changed files
with
1,949 additions
and
455 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
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,21 @@ | ||
// run-pass | ||
// compile-flags:-C debuginfo=2 | ||
// edition:2018 | ||
|
||
use core::marker::PhantomData; | ||
|
||
pub struct Foo<T: ?Sized, A>( | ||
PhantomData<(A, T)>, | ||
); | ||
|
||
enum Never {} | ||
|
||
impl<T: ?Sized> Foo<T, Never> { | ||
fn new_foo() -> Foo<T, Never> { | ||
Foo(PhantomData) | ||
} | ||
} | ||
|
||
fn main() { | ||
let _ = Foo::<[()], Never>::new_foo(); | ||
} |
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-pattern: this file contains an unclosed delimiter | ||
// error-pattern: cannot find type `ţ` in this scope | ||
// error-pattern: parenthesized type parameters may only be used with a `Fn` trait | ||
// error-pattern: type arguments are not allowed for this type | ||
// error-pattern: mismatched types | ||
// ignore-tidy-trailing-newlines | ||
// `ţ` must be the last character in this file, it cannot be followed by a newline | ||
fn main() { | ||
0: u8(ţ |
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,50 @@ | ||
error: this file contains an unclosed delimiter | ||
--> $DIR/issue-91268.rs:9:12 | ||
| | ||
LL | fn main() { | ||
| - unclosed delimiter | ||
LL | 0: u8(ţ | ||
| - ^ | ||
| | | ||
| unclosed delimiter | ||
|
||
error: this file contains an unclosed delimiter | ||
--> $DIR/issue-91268.rs:9:12 | ||
| | ||
LL | fn main() { | ||
| - unclosed delimiter | ||
LL | 0: u8(ţ | ||
| - ^ | ||
| | | ||
| unclosed delimiter | ||
|
||
error[E0412]: cannot find type `ţ` in this scope | ||
--> $DIR/issue-91268.rs:9:11 | ||
| | ||
LL | 0: u8(ţ | ||
| ^ expecting a type here because of type ascription | ||
|
||
error[E0214]: parenthesized type parameters may only be used with a `Fn` trait | ||
--> $DIR/issue-91268.rs:9:8 | ||
| | ||
LL | 0: u8(ţ | ||
| ^^^^ only `Fn` traits may use parentheses | ||
|
||
error[E0109]: type arguments are not allowed for this type | ||
--> $DIR/issue-91268.rs:9:11 | ||
| | ||
LL | 0: u8(ţ | ||
| ^ type argument not allowed | ||
|
||
error[E0308]: mismatched types | ||
--> $DIR/issue-91268.rs:9:5 | ||
| | ||
LL | fn main() { | ||
| - expected `()` because of default return type | ||
LL | 0: u8(ţ | ||
| ^^^^^^^ expected `()`, found `u8` | ||
|
||
error: aborting due to 6 previous errors | ||
|
||
Some errors have detailed explanations: E0109, E0214, E0308, E0412. | ||
For more information about an error, try `rustc --explain E0109`. |
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,21 @@ | ||
#[repr(C)] | ||
union PtrRepr<T: ?Sized> { | ||
const_ptr: *const T, | ||
mut_ptr: *mut T, | ||
components: PtrComponents<T>, | ||
//~^ ERROR the trait bound | ||
} | ||
|
||
#[repr(C)] | ||
struct PtrComponents<T: Pointee + ?Sized> { | ||
data_address: *const (), | ||
metadata: <T as Pointee>::Metadata, | ||
} | ||
|
||
|
||
|
||
pub trait Pointee { | ||
type Metadata; | ||
} | ||
|
||
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,29 @@ | ||
error[E0277]: the trait bound `T: Pointee` is not satisfied in `PtrComponents<T>` | ||
--> $DIR/issue-81199.rs:5:17 | ||
| | ||
LL | components: PtrComponents<T>, | ||
| ^^^^^^^^^^^^^^^^ within `PtrComponents<T>`, the trait `Pointee` is not implemented for `T` | ||
| | ||
note: required because it appears within the type `PtrComponents<T>` | ||
--> $DIR/issue-81199.rs:10:8 | ||
| | ||
LL | struct PtrComponents<T: Pointee + ?Sized> { | ||
| ^^^^^^^^^^^^^ | ||
= note: no field of a union may have a dynamically sized type | ||
= help: change the field's type to have a statically known size | ||
help: consider further restricting this bound | ||
| | ||
LL | union PtrRepr<T: ?Sized + Pointee> { | ||
| +++++++++ | ||
help: borrowed types always have a statically known size | ||
| | ||
LL | components: &PtrComponents<T>, | ||
| + | ||
help: the `Box` type always has a statically known size and allocates its contents in the heap | ||
| | ||
LL | components: Box<PtrComponents<T>>, | ||
| ++++ + | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
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
Oops, something went wrong.