mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Auto merge of #113769 - matthiaskrgr:rollup-p6i1rco, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #113042 (Add Platform Support documentation for MIPS Release 6 targets) - #113539 (fixed typo) - #113614 (platform-support.md: It's now verified that NetBSD/riscv64 can self-h…) - #113750 (Add missing italicization to `sort_unstable_by_key` complexity ) - #113755 (Normalize lazy type aliases when probing for ADTs) - #113756 (fix wrong link) - #113762 (Fix typo) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
f1eab64d4f
12
RELEASES.md
12
RELEASES.md
@ -203,7 +203,7 @@ Stabilized APIs
|
||||
- [`Default for std::collections::binary_heap::IntoIter`](https://doc.rust-lang.org/stable/std/collections/binary_heap/struct.IntoIter.html)
|
||||
- [`Default for std::collections::btree_map::{IntoIter, Iter, IterMut}`](https://doc.rust-lang.org/stable/std/collections/btree_map/struct.IntoIter.html)
|
||||
- [`Default for std::collections::btree_map::{IntoKeys, Keys}`](https://doc.rust-lang.org/stable/std/collections/btree_map/struct.IntoKeys.html)
|
||||
- [`Default for std::collections::btree_map::{IntoValues, Values}`](https://doc.rust-lang.org/stable/std/collections/btree_map/struct.IntoKeys.html)
|
||||
- [`Default for std::collections::btree_map::{IntoValues, Values}`](https://doc.rust-lang.org/stable/std/collections/btree_map/struct.IntoValues.html)
|
||||
- [`Default for std::collections::btree_map::Range`](https://doc.rust-lang.org/stable/std/collections/btree_map/struct.Range.html)
|
||||
- [`Default for std::collections::btree_set::{IntoIter, Iter}`](https://doc.rust-lang.org/stable/std/collections/btree_set/struct.IntoIter.html)
|
||||
- [`Default for std::collections::btree_set::Range`](https://doc.rust-lang.org/stable/std/collections/btree_set/struct.Range.html)
|
||||
@ -2618,7 +2618,7 @@ related tools.
|
||||
[`OsStr::to_ascii_lowercase`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.to_ascii_lowercase
|
||||
[`OsStr::to_ascii_uppercase`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.to_ascii_uppercase
|
||||
[`Peekable::peek_mut`]: https://doc.rust-lang.org/std/iter/struct.Peekable.html#method.peek_mut
|
||||
[`Rc::decrement_strong_count`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.increment_strong_count
|
||||
[`Rc::decrement_strong_count`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.decrement_strong_count
|
||||
[`Rc::increment_strong_count`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.increment_strong_count
|
||||
[`Vec::extend_from_within`]: https://doc.rust-lang.org/beta/std/vec/struct.Vec.html#method.extend_from_within
|
||||
[`array::from_mut`]: https://doc.rust-lang.org/beta/std/array/fn.from_mut.html
|
||||
@ -2627,7 +2627,7 @@ related tools.
|
||||
[`cmp::max_by`]: https://doc.rust-lang.org/beta/std/cmp/fn.max_by.html
|
||||
[`cmp::min_by_key`]: https://doc.rust-lang.org/beta/std/cmp/fn.min_by_key.html
|
||||
[`cmp::min_by`]: https://doc.rust-lang.org/beta/std/cmp/fn.min_by.html
|
||||
[`f32::is_subnormal`]: https://doc.rust-lang.org/std/primitive.f64.html#method.is_subnormal
|
||||
[`f32::is_subnormal`]: https://doc.rust-lang.org/std/primitive.f32.html#method.is_subnormal
|
||||
[`f64::is_subnormal`]: https://doc.rust-lang.org/std/primitive.f64.html#method.is_subnormal
|
||||
[ietf6943]: https://datatracker.ietf.org/doc/html/rfc6943#section-3.1.1
|
||||
|
||||
@ -2963,7 +2963,7 @@ Internal Only
|
||||
[`sync::OnceState`]: https://doc.rust-lang.org/stable/std/sync/struct.OnceState.html
|
||||
[`panic::panic_any`]: https://doc.rust-lang.org/stable/std/panic/fn.panic_any.html
|
||||
[`slice::strip_prefix`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.strip_prefix
|
||||
[`slice::strip_suffix`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.strip_prefix
|
||||
[`slice::strip_suffix`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.strip_suffix
|
||||
[`Arc::increment_strong_count`]: https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.increment_strong_count
|
||||
[`Arc::decrement_strong_count`]: https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.decrement_strong_count
|
||||
[`slice::fill_with`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.fill_with
|
||||
@ -8033,7 +8033,7 @@ Compatibility Notes
|
||||
[39379]: https://github.com/rust-lang/rust/pull/39379
|
||||
[41105]: https://github.com/rust-lang/rust/issues/41105
|
||||
[`<*const T>::wrapping_offset`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_offset
|
||||
[`<*mut T>::wrapping_offset`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_offset
|
||||
[`<*mut T>::wrapping_offset`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_offset-1
|
||||
[`Duration::checked_add`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.checked_add
|
||||
[`Duration::checked_div`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.checked_div
|
||||
[`Duration::checked_mul`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.checked_mul
|
||||
@ -9011,7 +9011,7 @@ Stabilized APIs
|
||||
* [`f64::to_radians`](https://doc.rust-lang.org/std/primitive.f64.html#method.to_radians)
|
||||
(in libcore - previously stabilized in libstd)
|
||||
* [`Iterator::sum`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.sum)
|
||||
* [`Iterator::product`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.sum)
|
||||
* [`Iterator::product`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.product)
|
||||
* [`Cell::get_mut`](https://doc.rust-lang.org/std/cell/struct.Cell.html#method.get_mut)
|
||||
* [`RefCell::get_mut`](https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.get_mut)
|
||||
|
||||
|
@ -302,7 +302,9 @@ impl<'a, 'tcx> AstConv<'tcx> for FnCtxt<'a, 'tcx> {
|
||||
match ty.kind() {
|
||||
ty::Adt(adt_def, _) => Some(*adt_def),
|
||||
// FIXME(#104767): Should we handle bound regions here?
|
||||
ty::Alias(ty::Projection | ty::Inherent, _) if !ty.has_escaping_bound_vars() => {
|
||||
ty::Alias(ty::Projection | ty::Inherent | ty::Weak, _)
|
||||
if !ty.has_escaping_bound_vars() =>
|
||||
{
|
||||
self.normalize(span, ty).ty_adt_def()
|
||||
}
|
||||
_ => None,
|
||||
|
@ -24,7 +24,7 @@ pub enum ValTree<'tcx> {
|
||||
Leaf(ScalarInt),
|
||||
|
||||
//SliceOrStr(ValSlice<'tcx>),
|
||||
// dont use SliceOrStr for now
|
||||
// don't use SliceOrStr for now
|
||||
/// The fields of any kind of aggregate. Structs, tuples and arrays are represented by
|
||||
/// listing their fields' values in order.
|
||||
///
|
||||
|
@ -570,7 +570,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
|
||||
));
|
||||
}
|
||||
ty::ConstKind::Expr(_) => {
|
||||
// FIXME(generic_const_exprs): this doesnt verify that given `Expr(N + 1)` the
|
||||
// FIXME(generic_const_exprs): this doesn't verify that given `Expr(N + 1)` the
|
||||
// trait bound `typeof(N): Add<typeof(1)>` holds. This is currently unnecessary
|
||||
// as `ConstKind::Expr` is only produced via normalization of `ConstKind::Unevaluated`
|
||||
// which means that the `DefId` would have been typeck'd elsewhere. However in
|
||||
|
@ -174,7 +174,7 @@ fn recurse_build<'tcx>(
|
||||
}
|
||||
// `ExprKind::Use` happens when a `hir::ExprKind::Cast` is a
|
||||
// "coercion cast" i.e. using a coercion or is a no-op.
|
||||
// This is important so that `N as usize as usize` doesnt unify with `N as usize`. (untested)
|
||||
// This is important so that `N as usize as usize` doesn't unify with `N as usize`. (untested)
|
||||
&ExprKind::Use { source } => {
|
||||
let arg = recurse_build(tcx, body, source, root_span)?;
|
||||
ty::Const::new_expr(tcx, Expr::Cast(CastKind::Use, arg, node.ty), node.ty)
|
||||
|
@ -749,7 +749,7 @@ impl<T, E> Result<T, E> {
|
||||
}
|
||||
|
||||
/// Returns the provided default (if [`Err`]), or
|
||||
/// applies a function to the contained value (if [`Ok`]),
|
||||
/// applies a function to the contained value (if [`Ok`]).
|
||||
///
|
||||
/// Arguments passed to `map_or` are eagerly evaluated; if you are passing
|
||||
/// the result of a function call, it is recommended to use [`map_or_else`],
|
||||
|
@ -2957,7 +2957,7 @@ impl<T> [T] {
|
||||
/// elements.
|
||||
///
|
||||
/// This sort is unstable (i.e., may reorder equal elements), in-place
|
||||
/// (i.e., does not allocate), and *O*(m \* *n* \* log(*n*)) worst-case, where the key function is
|
||||
/// (i.e., does not allocate), and *O*(*m* \* *n* \* log(*n*)) worst-case, where the key function is
|
||||
/// *O*(*m*).
|
||||
///
|
||||
/// # Current implementation
|
||||
|
@ -36,6 +36,7 @@
|
||||
- [m68k-unknown-linux-gnu](platform-support/m68k-unknown-linux-gnu.md)
|
||||
- [mips64-openwrt-linux-musl](platform-support/mips64-openwrt-linux-musl.md)
|
||||
- [mipsel-sony-psx](platform-support/mipsel-sony-psx.md)
|
||||
- [mipsisa\*r6\*-unknown-linux-gnu\*](platform-support/mips-release-6.md)
|
||||
- [nvptx64-nvidia-cuda](platform-support/nvptx64-nvidia-cuda.md)
|
||||
- [riscv32imac-unknown-xous-elf](platform-support/riscv32imac-unknown-xous-elf.md)
|
||||
- [*-pc-windows-gnullvm](platform-support/pc-windows-gnullvm.md)
|
||||
|
@ -277,10 +277,10 @@ target | std | host | notes
|
||||
[`mipsel-sony-psx`](platform-support/mipsel-sony-psx.md) | * | | MIPS (LE) Sony PlayStation 1 (PSX)
|
||||
`mipsel-unknown-linux-uclibc` | ✓ | | MIPS (LE) Linux with uClibc
|
||||
`mipsel-unknown-none` | * | | Bare MIPS (LE) softfloat
|
||||
`mipsisa32r6-unknown-linux-gnu` | ? | |
|
||||
`mipsisa32r6el-unknown-linux-gnu` | ? | |
|
||||
`mipsisa64r6-unknown-linux-gnuabi64` | ? | |
|
||||
`mipsisa64r6el-unknown-linux-gnuabi64` | ? | |
|
||||
[`mipsisa32r6-unknown-linux-gnu`](platform-support/mips-release-6.md) | ? | | 32-bit MIPS Release 6 Big Endian
|
||||
[`mipsisa32r6el-unknown-linux-gnu`](platform-support/mips-release-6.md) | ? | | 32-bit MIPS Release 6 Little Endian
|
||||
[`mipsisa64r6-unknown-linux-gnuabi64`](platform-support/mips-release-6.md) | ? | | 64-bit MIPS Release 6 Big Endian
|
||||
[`mipsisa64r6el-unknown-linux-gnuabi64`](platform-support/mips-release-6.md) | ✓ | ✓ | 64-bit MIPS Release 6 Little Endian
|
||||
`msp430-none-elf` | * | | 16-bit MSP430 microcontrollers
|
||||
`powerpc-unknown-linux-gnuspe` | ✓ | | PowerPC SPE Linux
|
||||
`powerpc-unknown-linux-musl` | ? | |
|
||||
@ -305,7 +305,7 @@ target | std | host | notes
|
||||
`riscv64gc-unknown-freebsd` | | | RISC-V FreeBSD
|
||||
`riscv64gc-unknown-fuchsia` | | | RISC-V Fuchsia
|
||||
`riscv64gc-unknown-linux-musl` | | | RISC-V Linux (kernel 4.20, musl 1.2.0)
|
||||
[`riscv64gc-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ? | RISC-V NetBSD
|
||||
[`riscv64gc-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | RISC-V NetBSD
|
||||
[`riscv64gc-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | OpenBSD/riscv64
|
||||
`s390x-unknown-linux-musl` | | | S390x Linux (kernel 3.2, MUSL)
|
||||
`sparc-unknown-linux-gnu` | ✓ | | 32-bit SPARC Linux
|
||||
|
181
src/doc/rustc/src/platform-support/mips-release-6.md
Normal file
181
src/doc/rustc/src/platform-support/mips-release-6.md
Normal file
@ -0,0 +1,181 @@
|
||||
# mipsisa\*r6\*-unknown-linux-gnu\*
|
||||
|
||||
**Tier: 3**
|
||||
|
||||
[MIPS Release 6](https://s3-eu-west-1.amazonaws.com/downloads-mips/documents/MD00083-2B-MIPS64INT-AFP-06.01.pdf), or simply MIPS R6, is the latest iteration of the MIPS instruction set architecture (ISA).
|
||||
|
||||
MIPS R6 is experimental in nature, as there is not yet real hardware. However, Qemu emulation is available and we have two Linux distros maintained for development and evaluation purposes. This documentation describes the Rust support for MIPS R6 targets under `mipsisa*r6*-unknown-linux-gnu*`.
|
||||
|
||||
The target name follow this format: `<machine>-<vendor>-<os><abi_suffix>`, where `<machine>` specifies the CPU family/model, `<vendor>` specifies the vendor and `<os>` the operating system name. The `<abi_suffix>` denotes the base ABI (32/n32/64/o64).
|
||||
|
||||
| ABI suffix | Description |
|
||||
|------------|------------------------------------|
|
||||
| abi64 | Uses the 64-bit (64) ABI |
|
||||
| abin32 | Uses the n32 ABI |
|
||||
| N/A | Uses the (assumed) 32-bit (32) ABI |
|
||||
|
||||
## Target Maintainers
|
||||
|
||||
- [Xuan Chen](https://github.com/chenx97) <henry.chen@oss.cipunited.com>
|
||||
- [Walter Ji](https://github.com/709924470) <walter.ji@oss.cipunited.com>
|
||||
- [Xinhui Yang](https://github.com/Cyanoxygen) <cyan@oss.cipunited.com>
|
||||
- [Lain Yang](https://github.com/Fearyncess) <lain.yang@oss.cipunited.com>
|
||||
|
||||
## Requirements
|
||||
|
||||
### C/C++ Toolchain
|
||||
|
||||
A GNU toolchain for one of the MIPS R6 target is required. [AOSC OS](https://aosc.io/) provides working native and cross-compiling build environments. You may also supply your own a toolchain consisting of recent versions of GCC and Binutils.
|
||||
|
||||
### Target libraries
|
||||
|
||||
A minimum set of libraries is required to perform dynamic linking:
|
||||
|
||||
- GNU glibc
|
||||
- OpenSSL
|
||||
- Zlib
|
||||
- Linux API Headers
|
||||
|
||||
This set of libraries should be installed to make up minimal target sysroot.
|
||||
|
||||
For AOSC OS, You may install such a sysroot with the following commands:
|
||||
|
||||
```sh
|
||||
cd /tmp
|
||||
|
||||
# linux+api, glibc, and file system structure are included in the toolchain.
|
||||
sudo apt install gcc+cross-mips64r6el binutils+cross-mips64r6el
|
||||
|
||||
# Download and extract required libraries.
|
||||
wget https://repo.aosc.io/debs/pool/stable/main/z/zlib_1.2.13-0_mips64r6el.deb -O zlib.deb
|
||||
wget https://repo.aosc.io/debs/pool/stable/main/o/openssl_1.1.1q-1_mips64r6el.deb -O openssl.deb
|
||||
|
||||
# Extract them to your desired location.
|
||||
for i in zlib openssl ; do
|
||||
sudo dpkg-deb -vx $i.deb /var/ab/cross-root/mips64r6el
|
||||
done
|
||||
|
||||
# Workaround a possible ld bug when using -Wl,-Bdynamic.
|
||||
sudo sed -i 's|/usr|=/usr|g' /var/ab/cross-root/mips64r6el/usr/lib/libc.so
|
||||
```
|
||||
|
||||
For other distros, you may build them manually.
|
||||
|
||||
## Building
|
||||
|
||||
The following procedure outlines the build process for the MIPS64 R6 target with 64-bit (64) ABI (`mipsisa64r6el-unknown-linux-gnuabi64`).
|
||||
|
||||
### Prerequisite: Disable debuginfo
|
||||
|
||||
A LLVM bug makes rustc crash if debug or debug info generation is enabled. You need to edit `config.toml` to disable this:
|
||||
|
||||
```toml
|
||||
[rust]
|
||||
debug = false
|
||||
debug-info-level = 0
|
||||
```
|
||||
|
||||
### Prerequisite: Enable rustix's libc backend
|
||||
|
||||
The crate `rustix` may try to link itself against MIPS R2 assembly, resulting in linkage error. To avoid this, you may force `rustix` to use its fallback `libc` backend by setting relevant `RUSTFLAGS`:
|
||||
|
||||
```sh
|
||||
export RUSTFLAGS="--cfg rustix_use_libc"
|
||||
```
|
||||
|
||||
This will trigger warnings during build, as `-D warnings` is enabled by default. Disable `-D warnings` by editing `config.toml` to append the following:
|
||||
|
||||
```toml
|
||||
[rust]
|
||||
deny-warnings = false
|
||||
```
|
||||
|
||||
### Prerequisite: Supplying OpenSSL
|
||||
|
||||
As a Tier 3 target, `openssl_sys` lacks the vendored OpenSSL library for this target. You will need to provide a prebuilt OpenSSL library to link `cargo`. Since we have a pre-configured sysroot, we can point to it directly:
|
||||
|
||||
```sh
|
||||
export MIPSISA64R6EL_UNKNOWN_LINUX_GNUABI64_OPENSSL_NO_VENDOR=y
|
||||
export MIPSISA64R6EL_UNKNOWN_LINUX_GNUABI64_OPENSSL_DIR="/var/ab/cross-root/mips64r6el/usr"
|
||||
```
|
||||
|
||||
On Debian, you may need to provide library path and include path separately:
|
||||
|
||||
```sh
|
||||
export MIPSISA64R6EL_UNKNOWN_LINUX_GNUABI64_OPENSSL_NO_VENDOR=y
|
||||
export MIPSISA64R6EL_UNKNOWN_LINUX_GNUABI64_OPENSSL_LIB_DIR="/usr/lib/mipsisa64r6el-linux-gnuabi64/"
|
||||
export MIPSISA64R6EL_UNKNOWN_LINUX_GNUABI64_OPENSSL_INCLUDE_DIR="/usr/include"
|
||||
```
|
||||
|
||||
### Launching `x.py`
|
||||
|
||||
```toml
|
||||
[build]
|
||||
target = ["mipsisa64r6el-unknown-linux-gnuabi64"]
|
||||
```
|
||||
|
||||
Make sure that `mipsisa64r6el-unknown-linux-gnuabi64-gcc` is available from your executable search path (`$PATH`).
|
||||
|
||||
Alternatively, you can specify the directories to all necessary toolchain executables in `config.toml`:
|
||||
|
||||
```toml
|
||||
[target.mipsisa64r6el-unknown-linux-gnuabi64]
|
||||
# Adjust the paths below to point to your toolchain installation prefix.
|
||||
cc = "/toolchain_prefix/bin/mipsisa64r6el-unknown-linux-gnuabi64-gcc"
|
||||
cxx = "/toolchain_prefix/bin/mipsisa64r6el-unknown-linux-gnuabi64-g++"
|
||||
ar = "/toolchain_prefix/bin/mipsisa64r6el-unknown-linux-gnuabi64-gcc-ar"
|
||||
ranlib = "/toolchain_prefix/bin/mipsisa64r6el-unknown-linux-gnuabi64-ranlib"
|
||||
linker = "/toolchain_prefix/bin/mipsisa64r6el-unknown-linux-gnuabi64-gcc"
|
||||
```
|
||||
|
||||
Or, you can specify your cross compiler toolchain with an environment variable:
|
||||
|
||||
```sh
|
||||
export CROSS_COMPILE="/opt/abcross/mips64r6el/bin/mipsisa64r6el-aosc-linux-gnuabi64-"
|
||||
```
|
||||
|
||||
Finally, launch the build script:
|
||||
|
||||
```sh
|
||||
./x.py build
|
||||
```
|
||||
|
||||
### Tips
|
||||
|
||||
- Avoid setting `cargo-native-static` to `false`, as this will result in a redundant artifact error while building clippy:
|
||||
```text
|
||||
duplicate artifacts found when compiling a tool, this typically means that something was recompiled because a transitive dependency has different features activated than in a previous build:
|
||||
|
||||
the following dependencies have different features:
|
||||
syn 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)
|
||||
`clippy-driver` additionally enabled features {"full"} at ...
|
||||
`cargo` additionally enabled features {} at ...
|
||||
|
||||
to fix this you will probably want to edit the local src/tools/rustc-workspace-hack/Cargo.toml crate, as that will update the dependency graph to ensure that these crates all share the same feature set
|
||||
thread 'main' panicked at 'tools should not compile multiple copies of the same crate', tool.rs:250:13
|
||||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
|
||||
```
|
||||
|
||||
## Building Rust programs
|
||||
|
||||
To build Rust programs for MIPS R6 targets, for instance, the `mipsisa64r6el-unknown-linux-gnuabi64` target:
|
||||
|
||||
```bash
|
||||
cargo build --target mipsisa64r6el-unknown-linux-gnuabi64
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
To test a cross-compiled binary on your build system, install the Qemu user emulator that support the MIPS R6 architecture (`qemu-user-mipsel` or `qemu-user-mips64el`). GCC runtime libraries (`libgcc_s`) for the target architecture should be present in target sysroot to run the program.
|
||||
|
||||
```sh
|
||||
env \
|
||||
CARGO_TARGET_MIPSISA64R6EL_UNKNOWN_LINUX_GNUABI64_LINKER="/opt/abcross/mips64r6el/bin/mipsisa64r6el-aosc-linux-gnuabi64-gcc" \
|
||||
CARGO_TARGET_MIPSISA64R6EL_UNKNOWN_LINUX_GNUABI64_RUNNER="qemu-mips64el-static -L /var/ab/cross-root/mips64r6el" \
|
||||
cargo run --release \
|
||||
--target mipsisa64r6el-unknown-linux-gnuabi64
|
||||
```
|
||||
|
||||
## Tips for building Rust programs for MIPS R6
|
||||
|
||||
- Until we finalize a fix, please make sure the aforementioned workarounds for `rustix` crate and LLVM are always applied. This can be achieved by setting the relevant environment variables, and editing `Cargo.toml` before building.
|
17
tests/ui/type-alias/lazy-type-alias-enum-variant.rs
Normal file
17
tests/ui/type-alias/lazy-type-alias-enum-variant.rs
Normal file
@ -0,0 +1,17 @@
|
||||
// Regression test for issue #113736.
|
||||
// check-pass
|
||||
|
||||
#![feature(lazy_type_alias)]
|
||||
|
||||
enum Enum {
|
||||
Unit,
|
||||
Tuple(),
|
||||
Struct {},
|
||||
}
|
||||
|
||||
fn main() {
|
||||
type Alias = Enum;
|
||||
let _ = Alias::Unit;
|
||||
let _ = Alias::Tuple();
|
||||
let _ = Alias::Struct {};
|
||||
}
|
Loading…
Reference in New Issue
Block a user