Remove an extraneous include
SymbolWrapper.cpp doesn't use std::optional or llvm::Optional, so this patch removes the extraneous include. Note that llvm/ADT/Optional.h has been deprecated upstream. This patch ensures that SymbolWrapper.cpp continues to compile even after the upcoming removal of Optional.h.
Add `--no-undefined-version` link flag and fix associated breakage
LLVM upstream sets `--no-undefined-version` by default in lld: https://reviews.llvm.org/D135402.
Due to a bug in how version scripts are generated, this breaks the `dylib` output type for most crates. See https://github.com/rust-lang/rust/issues/105967#issuecomment-1428671533 for details.
This PR adds the flag to gcc flavor linkers in anticipation of this LLVM change rolling in, and patches `rustc` to not attempt to export `__rust_*` allocator symbols when they weren't generated.
Fixes#105967
Stabilize movbe target feature
Almost all "old" x86 target features are stable. As far as I can tell, these are the last two unstable features in the `x86-64-v2` or `x86-64-v3` microarchitecture levels, so I'm not sure if it was an oversight or if they're still unstable for a reason (see #106323 for `f16c`).
Note that this only stabilizes the target features, and not the intrinsics.
cc ```@Amanieu```
r? ```@rust-lang/lang```
Relax ordering rules for `asm!` operands
The `asm!` and `global_asm!` macros require their operands to appear strictly in the following order:
- Template strings
- Positional operands
- Named operands
- Explicit register operands
- `clobber_abi`
- `options`
This is overly strict and can be inconvienent when building complex `asm!` statements with macros. This PR relaxes the ordering requirements as follows:
- Template strings must still come before all other operands.
- Positional operands must still come before named and explicit register operands.
- Named and explicit register operands can be freely mixed.
- `options` and `clobber_abi` can appear in any position after the template strings.
r? ```````@joshtriplett```````
Rollup of 9 pull requests
Successful merges:
- #108879 (Unconstrained terms should account for infer vars being equated)
- #108936 (Rustdoc: don't hide anonymous reexport)
- #108940 (Add myself to compiler reviewers list)
- #108945 (Make some report and emit errors take DefIds instead of BodyIds)
- #108946 (Document the resulting values produced when using `From<bool>` on floats)
- #108956 (Make ptr::from_ref and ptr::from_mut in #106116 const.)
- #108960 (Remove `body_def_id` from `Inherited`)
- #108963 (only call git on git checkouts during bootstrap)
- #108964 (Fix the docs for pointer method with_metadata_of)
Failed merges:
- #108950 (Directly construct Inherited in typeck.)
r? `@ghost`
`@rustbot` modify labels: rollup
Introduce a no-op `PlaceMention` statement for `let _ =`.
Fixes https://github.com/rust-lang/rust/issues/54003
Fixes https://github.com/rust-lang/rust/issues/80059
Split from https://github.com/rust-lang/rust/pull/101500
This PR introduces a new `PlaceMention` statement dedicated to matches that neither introduce bindings nor ascribe types. Without this, all traces of the match would vanish from MIR, making it impossible to diagnose unsafety or use in #101500.
This allows to mark `let _ = <unsafe union access or dereference>` as requiring an unsafe block.
Nominating for lang team, as this introduces an extra error.
Fix the docs for pointer method with_metadata_of
The name of the argument to `{*const T, *mut T}::with_metadata_of` was changed from `val` to `meta` recently, but the docs weren't updated to match.
Relevant pull request: #103701
Remove `body_def_id` from `Inherited`
We can just use the body id from the obligation cause.
Follow-up to #108945, only my commit is relevant.
r? `@cjgillot` cc `@spastorino`
Document the resulting values produced when using `From<bool>` on floats
Have the documentation of the implementation of `From<bool>` on `f32` and `f64` indicate the output values (`0.0` for `false` and `1.0` for `true`).
closes#108939
Unconstrained terms should account for infer vars being equated
Follow-up from the canonicalization PR, wanted to break this one out so I can approve the other PR.
r? `@lcnr`
Rollup of 8 pull requests
Successful merges:
- #106915 (Only load one CSS theme by default)
- #108294 (Place binder correctly for arbitrary trait bound suggestion)
- #108778 (x fmt: Don't print all modified files if there's more than 10)
- #108854 (feat/refactor: improve errors in case of ident with number at start)
- #108870 (Fix invalid inlining of reexport of reexport of private item)
- #108917 (Consider target_family as pal)
- #108922 (Add auto notification for changes to stable mir)
- #108929 (Fix typo in span_map.rs)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Add auto notification for changes to stable mir
Adds a new entry to the triagebot configuration file to notify subscribers about changes to the stable MIR. I added myself and `@oli-obk` for now.
r?oli-obk