Conversation
As a rule, the application of `unsafe` to a declaration requires that use-sites of that declaration also require `unsafe`. For example, a field declared `unsafe` may only be read in the lexical context of an `unsafe` block. For nearly all safe traits, the safety obligations of fields are explicitly discharged when they are mentioned in method definitions. For example, idiomatically implementing `Clone` (a safe trait) for a type with unsafe fields will require `unsafe` to clone those fields. Prior to this commit, `Copy` violated this rule. The trait is marked safe, and although it has no explicit methods, its implementation permits reads of `Self`. This commit resolves this by making `Copy` conditionally safe to implement. It remains safe to implement for ADTs without unsafe fields, but unsafe to implement for ADTs with unsafe fields. Tracking: rust-lang#132922
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
It's more graphviz-y than it is results-y. This lets us reduce visibility of several types in `graphviz.rs`.
The part about zero-sized structures is totally wrong. The rest of it has almost no explanatory value; there are better explanations in comments elsewhere.
jsondocck: Parse, don't validate commands. Centralizes knowledge of jsondocck syntax into the parser, so the checker doesn't need to know what the indexes are. [Vaguely related zulip discussion](https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/jsondocck.20rewrite) I'm very happy this is negative LoC, despite adding a big, documented enum! r? ``@fmease``
…ouxu [AIX] Pass -bnoipath when adding rust upstream dynamic crates Unlike ELF linkers, AIX doesn't feature `DT_SONAME` to override the dependency name when outputing a shared library, which is something we rely on for dylib crates. See for reference: https://github.com/rust-lang/rust/blob/bc145cec4565a97a1b08df52d26ddf48ce3d7d0a/compiler/rustc_codegen_ssa/src/back/linker.rs#L464) Thus, `ld` on AIX will use the full path to shared libraries as the dependency if passed it by default unless `noipath` is passed, so pass it here so we don't end up with full path dependencies for dylib crates.
[AIX] Replace sa_sigaction with sa_union.__su_sigaction for AIX On AIX, the `sa_sigaction` member of `struct sigaction` is accessed as the union member `sa_union.__su_sigaction`.
[AIX] Remove option "-n" from AIX "ln" command The option `-n` for the AIX `ln` command has a different purpose than it does on Linux. On Linux, the `-n` option is used to treat the destination path as normal file if it is a symbolic link to a directory, which is the default behavior of the AIX `ln` command.
…iler-errors Make `Copy` unsafe to implement for ADTs with `unsafe` fields As a rule, the application of `unsafe` to a declaration requires that use-sites of that declaration also entail `unsafe`. For example, a field declared `unsafe` may only be read in the lexical context of an `unsafe` block. For nearly all safe traits, the safety obligations of fields are explicitly discharged when they are mentioned in method definitions. For example, idiomatically implementing `Clone` (a safe trait) for a type with unsafe fields will require `unsafe` to clone those fields. Prior to this commit, `Copy` violated this rule. The trait is marked safe, and although it has no explicit methods, its implementation permits reads of `Self`. This commit resolves this by making `Copy` conditionally safe to implement. It remains safe to implement for ADTs without unsafe fields, but unsafe to implement for ADTs with unsafe fields. Tracking: rust-lang#132922 r? ```@compiler-errors```
…n, r=jieyouxu Don't use `AsyncFnOnce::CallOnceFuture` bounds for signature deduction We shouldn't be using `AsyncFnOnce::CallOnceFuture` projection bounds to deduce anything about the return type of an async closure, **only** `AsyncFnOnce::Output`. This was accidental b/c all we were looking at was the def id of the trait, rather than the projection. This PR fixes that. This doesn't affect stable code, since `CallOnceFuture` bounds cannot be written on stable. Fixes rust-lang#134015
handle cygwin environment in `install::sanitize_sh` Resolves rust-lang#132507
…eyouxu Use SourceMap to load debugger visualizer files
…lts, r=tmiasko Move `write_graphviz_results` r? ``@tmiasko``
…_queue_maintainers, r=jieyouxu Add compiler-maintainers who requested to be on review rotation r? ``@davidtwco`` cc ``@Noratrieb`` ``@SparrowLii``
…lubby789 bootstrap: Forward cargo JSON output to stdout, not stderr This fixes the RA errors I've been seeing on proc-macros after the re-landing of rust-lang#134040. r? clubby789
|
@bors r+ rollup=never p=7 |
|
includes rollup=always p=6 #134123, hence bump to p=7 |
|
☀️ Test successful - checks-actions |
|
📌 Perf builds for each rolled up PR:
previous master: 4996052717 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
|
Finished benchmarking commit (33c245b): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 1.6%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 2.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResults (secondary 0.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 768.862s -> 768.372s (-0.06%) |
Rollup of 11 pull requests Successful merges: - rust-lang#133478 (jsondocck: Parse, don't validate commands.) - rust-lang#133967 ([AIX] Pass -bnoipath when adding rust upstream dynamic crates) - rust-lang#133970 ([AIX] Replace sa_sigaction with sa_union.__su_sigaction for AIX) - rust-lang#133980 ([AIX] Remove option "-n" from AIX "ln" command) - rust-lang#134008 (Make `Copy` unsafe to implement for ADTs with `unsafe` fields) - rust-lang#134017 (Don't use `AsyncFnOnce::CallOnceFuture` bounds for signature deduction) - rust-lang#134023 (handle cygwin environment in `install::sanitize_sh`) - rust-lang#134041 (Use SourceMap to load debugger visualizer files) - rust-lang#134065 (Move `write_graphviz_results`) - rust-lang#134106 (Add compiler-maintainers who requested to be on review rotation) - rust-lang#134123 (bootstrap: Forward cargo JSON output to stdout, not stderr) Failed merges: - rust-lang#134120 (Remove Felix from ping groups and review rotation) r? `@ghost` `@rustbot` modify labels: rollup
Successful merges:
Copyunsafe to implement for ADTs withunsafefields #134008 (MakeCopyunsafe to implement for ADTs withunsafefields)AsyncFnOnce::CallOnceFuturebounds for signature deduction #134017 (Don't useAsyncFnOnce::CallOnceFuturebounds for signature deduction)install::sanitize_sh#134023 (handle cygwin environment ininstall::sanitize_sh)write_graphviz_results#134065 (Movewrite_graphviz_results)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup