-
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 #95250 - matthiaskrgr:rollup-ma4zl69, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #94249 (Better errors when a Copy impl on a Struct is not self-consistent) - #95069 (Fix auto traits in rustdoc) - #95221 (interpret/memory: simplify check_and_deref_ptr) - #95225 (remove `[async output]` from `impl Future` pretty-printing) - #95238 (Stop emitting E0026 for struct enums with underscores) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
34 changed files
with
203 additions
and
66 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#![crate_name = "foo"] | ||
|
||
// @has 'foo/struct.Foo.html' | ||
// @has - '//*[@id="impl-Send"]' 'impl !Send for Foo' | ||
// @has - '//*[@id="impl-Sync"]' 'impl !Sync for Foo' | ||
pub struct Foo(*const i8); | ||
pub trait Whatever: Send {} | ||
impl<T: Send + ?Sized> Whatever for T {} |
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,40 @@ | ||
#![feature(extern_types)] | ||
|
||
extern "Rust" { | ||
type OpaqueListContents; | ||
} | ||
|
||
pub struct ListS<T> { | ||
len: usize, | ||
data: [T; 0], | ||
opaque: OpaqueListContents, | ||
} | ||
|
||
pub struct Interned<'a, T>(&'a T); | ||
|
||
impl<'a, T> Clone for Interned<'a, T> { | ||
fn clone(&self) -> Self { | ||
*self | ||
} | ||
} | ||
|
||
impl<'a, T> Copy for Interned<'a, T> {} | ||
|
||
pub struct List<'tcx, T>(Interned<'tcx, ListS<T>>); | ||
//~^ NOTE this field does not implement `Copy` | ||
//~| NOTE the `Copy` impl for `Interned<'tcx, ListS<T>>` requires that `OpaqueListContents: Sized` | ||
|
||
impl<'tcx, T> Clone for List<'tcx, T> { | ||
fn clone(&self) -> Self { | ||
*self | ||
} | ||
} | ||
|
||
impl<'tcx, T> Copy for List<'tcx, T> {} | ||
//~^ ERROR the trait `Copy` may not be implemented for this type | ||
|
||
fn assert_is_copy<T: Copy>() {} | ||
|
||
fn main() { | ||
assert_is_copy::<List<'static, ()>>(); | ||
} |
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,18 @@ | ||
error[E0204]: the trait `Copy` may not be implemented for this type | ||
--> $DIR/deep-bad-copy-reason.rs:33:15 | ||
| | ||
LL | pub struct List<'tcx, T>(Interned<'tcx, ListS<T>>); | ||
| ------------------------ this field does not implement `Copy` | ||
... | ||
LL | impl<'tcx, T> Copy for List<'tcx, T> {} | ||
| ^^^^ | ||
| | ||
note: the `Copy` impl for `Interned<'tcx, ListS<T>>` requires that `OpaqueListContents: Sized` | ||
--> $DIR/deep-bad-copy-reason.rs:23:26 | ||
| | ||
LL | pub struct List<'tcx, T>(Interned<'tcx, ListS<T>>); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0204`. |
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.