about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-07-18Fix invalid display of inlined re-exportGuillaume Gomez-17/+42
2023-07-18Merge from rustcThe Miri Conjob Bot-11692/+19526
2023-07-18Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-07-18Try to build LLVM without LTOJakub Beránek-1/+31
2023-07-18Auto merge of #113801 - compiler-errors:iter-instantiated, r=oli-obkbors-5/+5
Rename `arg_iter` to `iter_instantiated` `arg_iter` doesn't make sense, and doesn't really indicate what it's doing (returning an iterator that ~~substitutes~~ instantiates its elements). `iter_instantiated_copied` is kinda awkward but i don't really wanna bikeshed it. r? `@oli-obk`
2023-07-18Auto merge of #113574 - GuillaumeGomez:rustdoc-json-strip-hidden-impl, ↵bors-24/+57
r=aDotInTheVoid,notriddle Strip impl if not re-exported and is doc(hidden) Part of #112852. r? `@aDotInTheVoid`
2023-07-18Auto merge of #113061 - Amanieu:x86_64-ohos, r=compiler-errorsbors-0/+37
Add x86_64-unknown-linux-ohos target This complements the existing `aarch64-unknown-linux-ohos` and `armv7-unknown-linux-ohos` targets. This should be covered by the existing MCP (https://github.com/rust-lang/compiler-team/issues/568), but I can also create a new MCP if that is preferred.
2023-07-17Use matches!() macro to improve readability (#5830)Jordan McQueen-14/+12
* Use matches!() macro to improve readability 1. Use `matches!()` macro in `is_line_comment` and `is_block_comment` to improve readability. 2. Very sightly improve the wording of the doc comment for these two functions. * Update wording on doc comment on is_line_comment()
2023-07-17Auto merge of #89132 - Cyborus04:rc_allocator_support, r=Amanieubors-5/+8
Add support for allocators in `Rc` & `Arc` Adds the ability for `std::rc:Rc`, `std::rc::Weak`, `std::sync::Arc`, and `std::sync::Weak` to live in custom allocators
2023-07-17Rename arg_iter to iter_instantiatedMichael Goulet-5/+5
2023-07-17Auto merge of #113720 - eduardosm:miri-target-feature, r=RalfJung,oli-obkbors-0/+38
miri: fail when calling a function that requires an unavailable target feature miri will report an UB when calling a function that has a `#[target_feature(enable = ...)]` attribute is called and the required feature is not available. "Available features" are the same that `is_x86_feature_detected!` (or equivalent) reports to be available during miri execution (which can be enabled or disabled with the `-C target-feature` flag).
2023-07-17Update natvis to match full type names for Arc, Rc, Weak, etcWesley Wiser-5/+8
Also update a test case to have the correct whitespace in a type name.
2023-07-17Resolve correct archive version name in `opt-dist`Jakub Beránek-6/+38
2023-07-17Auto merge of #113686 - flip1995:clippyup, r=Manishearthbors-2538/+5241
Update Clippy r? `@Manishearth`
2023-07-17Auto merge of #113714 - Kobzol:ci-cmake, r=nikicbors-3/+51
CI: build CMake 3.20 to support LLVM 17 LLVM 17 will require CMake at least 3.20, so we have to go back to building our own CMake on the Linux x64 dist builder. r? `@nikic`
2023-07-17bootstrap: use git merge-base for LLVM CI download logicRalf Jung-19/+28
2023-07-17Auto merge of #113791 - lnicola:sync-from-ra, r=lnicolabors-9096/+13686
:arrow_up: `rust-analyzer` r? `@ghost`
2023-07-17Merge commit '37f84c101bca43b11027f30ab0c2852f9325bc3d' into sync-from-raLaurențiu Nicola-9096/+13686
2023-07-17Rollup merge of #113535 - jonathanpallant:sparc-bare-metal, r=jackh726Matthias Krüger-0/+167
Add a sparc-unknown-none-elf target. # `sparc-unknown-none-elf` **Tier: 3** Rust for bare-metal 32-bit SPARC V7 and V8 systems, e.g. the Gaisler LEON3. ## Target maintainers - Jonathan Pallant, `jonathan.pallant@ferrous-systems.com`, https://ferrous-systems.com ## Requirements > Does the target support host tools, or only cross-compilation? Only cross-compilation. > Does the target support std, or alloc (either with a default allocator, or if the user supplies an allocator)? Only tested with `libcore` but I see no reason why you couldn't also support `liballoc`. > Document the expectations of binaries built for the target. Do they assume specific minimum features beyond the baseline of the CPU/environment/etc? What version of the OS or environment do they expect? Tested by linking with a standard SPARC bare-metal toolchain - specifically I used the [BCC2] toolchain from Gaisler (both GCC and clang variants, both pre-compiled for x64 Linux and compiling my own SPARC GCC from source to run on `aarch64-apple-darwin`). The target is set to use the lowest-common-denominator `SPARC V7` architecture (yes, they started at V7 - see [Wikipedia](https://en.wikipedia.org/wiki/SPARC#History)). [BCC2]: https://www.gaisler.com/index.php/downloads/compilers > Are there notable `#[target_feature(...)]` or `-C target-feature=` values that programs may wish to use? `-Ctarget-cpu=v8` adds the instructions added in V8. `-Ctarget-cpu=leon3` adds the V8 instructions and sets up scheduling to suit the Gaisler LEON3. > What calling convention does `extern "C"` use on the target? I believe this is defined by the SPARC architecture reference manuals and V7, V8 and V9 are all compatible. > What format do binaries use by default? ELF, PE, something else? ELF ## Building the target > If Rust doesn't build the target by default, how can users build it? Can users just add it to the `target` list in `config.toml`? Yes. I did: ```toml target = ["aarch64-apple-darwin", "sparc-unknown-none-elf"] ``` ## Building Rust programs > Rust does not yet ship pre-compiled artifacts for this target. To compile for this target, you will either need to build Rust with the target enabled (see "Building the target" above), or build your own copy of `core` by using `build-std` or similar. Correct. ## Testing > Does the target support running binaries, or do binaries have varying expectations that prevent having a standard way to run them? No - it's a bare metal platform. > If users can run binaries, can they do so in some common emulator, or do they need native hardware? But if you use [BCC2] as the linker, you get default memory map suitable for the LEON3, and a default BSP for the LEON3, and so you can run the binaries in the `tsim-leon3` simulator from Gaisler. ```console $ cat .cargo/config.toml | grep runner runner = "tsim-leon3 -c sim-commands.txt" $ cat sim-commands.txt run quit $ cargo +sparcrust run --targe=sparc-unknown-none-elf Compiling sparc-demo-rust v0.1.0 (/work/sparc-demo-rust) Finished dev [unoptimized + debuginfo] target(s) in 3.44s Running `tsim-leon3 -c sim-commands.txt target/sparc-unknown-none-elf/debug/sparc-demo-rust` TSIM3 LEON3 SPARC simulator, version 3.1.9 (evaluation version) Copyright (C) 2023, Frontgrade Gaisler - all rights reserved. This software may only be used with a valid license. For latest updates, go to https://www.gaisler.com/ Comments or bug-reports to support@gaisler.com This TSIM evaluation version will expire 2023-11-28 Number of CPUs: 2 system frequency: 50.000 MHz icache: 1 * 4 KiB, 16 bytes/line (4 KiB total) dcache: 1 * 4 KiB, 16 bytes/line (4 KiB total) Allocated 8192 KiB SRAM memory, in 1 bank at 0x40000000 Allocated 32 MiB SDRAM memory, in 1 bank at 0x60000000 Allocated 8192 KiB ROM memory at 0x00000000 section: .text, addr: 0x40000000, size: 104400 bytes section: .rodata, addr: 0x400197d0, size: 15616 bytes section: .data, addr: 0x4001d4d0, size: 1176 bytes read 1006 symbols Initializing and starting from 0x40000000 Hello, this is Rust! PANIC: PanicInfo { payload: Any { .. }, message: Some(I am a panic), location: Location { file: "src/main.rs", line: 33, col: 5 }, can_unwind: true } Program exited normally on CPU 0. ``` > Does the target support running the Rust testsuite? I don't think so, the testsuite requires `libstd` IIRC. ## Cross-compilation toolchains and C code > Does the target support C code? Yes. > If so, what toolchain target should users use to build compatible C code? (This may match the target triple, or it may be a toolchain for a different target triple, potentially with specific options or caveats.) I suggest [BCC2] from Gaisler. It comes in both GCC and Clang variants.
2023-07-17Rollup merge of #112741 - geometryolife:fix, r=workingjubileeMatthias Krüger-1/+1
fix typo in `rustdoc/src/what-is-rustdoc.md`
2023-07-17new lint: `format_collect`y21-2/+1
2023-07-17Another fix for incorrect_implsPhilipp Krones-4/+3
2023-07-17Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyupPhilipp Krones-0/+7
2023-07-17Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyupPhilipp Krones-2537/+5241
2023-07-17Rollup merge of #113614 - he32:netbsd-riscv64-more, r=JohnTitorMatthias Krüger-1/+1
platform-support.md: It's now verified that NetBSD/riscv64 can self-h… …ost.
2023-07-17Rollup merge of #113042 - Cyanoxygen:add-mipsr6-target-docs, r=JohnTitorMatthias Krüger-4/+186
Add Platform Support documentation for MIPS Release 6 targets This is a follow-up to our to-announce MCP, rust-lang/compiler-team#638, where we proposed to assign several maintainers for MIPS R6 targets and was told to explain that this set of targets are experimental in nature. This documentation describes Rust support for `mipsisa*r6*-unknown-linux-gnu*` targets (mainly `mipsisa64r6el-unknown-linux-gnuabi64`), including toolchain setup, building, and testing procedures.
2023-07-16link to a definition of soundnessRalf Jung-1/+2
2023-07-16CI: build CMake 3.20 to support LLVM 17Jakub Beránek-3/+51
2023-07-16clarify that we do not prove soundnessRalf Jung-0/+6
2023-07-16Auto merge of #2981 - RalfJung:style, r=RalfJungbors-2/+7
style checks: use latest rustc for cron job
2023-07-16style checks: use latest rustc for cron jobRalf Jung-2/+7
2023-07-16clippy-driver: Update bug URL to use the ice templatexFrednet-1/+1
2023-07-16Use log groups in `opt-dist`Jakub Beránek-20/+53
Some of the output was quite verbose in CI logs, this should help with that.
2023-07-16Merge from rustcThe Miri Conjob Bot-1360/+1546
2023-07-16Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-07-16Auto merge of #113738 - jyn514:rollup-mjcya4c, r=jyn514bors-90/+76
Rollup of 3 pull requests Successful merges: - #113643 (bootstrap: Clean up try_run) - #113731 (Remove unused `bootstrap::util::CiEnv` enum) - #113737 (update mailmap for myself) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-15Rollup merge of #113731 - jyn514:ci-env, r=ozkanonurjyn-10/+0
Remove unused `bootstrap::util::CiEnv` enum the right one is `build_helper::CiEnv`; this one wasn't even used.
2023-07-15Rollup merge of #113643 - jyn514:try-run, r=ozkanonurjyn-80/+76
bootstrap: Clean up try_run r? `@ozkanonur` since you reviewed `@GuillaumeGomez's` PR i recommend reviewing commit-by-commit
2023-07-16miri: fail when calling a function that requires an unavailable target featureEduardo Sánchez Muñoz-0/+38
miri will report an UB when calling a function that has a `#[target_feature(enable = ...)]` attribute is called and the required feature is not available. "Available features" are the same that `is_x86_feature_detected!` (or equivalent) reports to be available during miri execution (which can be enabled or disabled with the `-C target-feature` flag).
2023-07-15Auto merge of #113606 - jyn514:parallel-compiler-cleanup, r=cjgillotbors-3/+0
Don't require each rustc_interface tool to opt-in to parallel_compiler Previously, forgetting to call `interface::set_thread_safe_mode` would cause the following ICE: ``` thread 'rustc' panicked at 'uninitialized dyn_thread_safe mode!', /rustc/dfe0683138de0959b6ab6a039b54d9347f6a6355/compiler/rustc_data_structures/src/sync.rs:74:18 ``` This calls `set_thread_safe_mode` in `interface::run_compiler` to avoid requiring it in the caller. Fixes `tests/run-make-fulldeps/issue-19371` when parallel-compiler is enabled. r? `@SparrowLii` cc https://github.com/rust-lang/rust/issues/75760
2023-07-15Auto merge of #113697 - ↵bors-6/+1
GuillaumeGomez:rm-unneeded-externallocation-handling, r=lqd Remove unneeded handling for `ExternalLocation::Unknown` in rustdoc render context Should fix perf regression introduced in https://github.com/rust-lang/rust/pull/113623. r? `@lqd`
2023-07-15Rollup merge of #113709 - notriddle:notriddle/src, r=GuillaumeGomezMatthias Krüger-76/+76
rustdoc: use src consistently over source in CSS/JS The two terms have been used, inconsistently, in closely related spots like the `src/` directory vs `source-files.js`, and with things like `src-sidebar-toggle` vs the `source-sidebar`. This PR changes most use of `source` to `src` instead (except the localStorage configuration variables, which would be very complicated to migrate). It also renames `.srclink` to `.src`. This is mostly aiming to cut out one of those many little peanut-butter bits of bloat, and is consistent with how other link classes are done (like how you have `a.mod` stylesheet rules, but there's also a `mod` class put on the body tag).
2023-07-15Rollup merge of #113683 - ozkanonur:polished, r=jyn514Matthias Krüger-13/+1
remove outdated `FIXME`s in bootstrap internals self-explanatory
2023-07-15Rollup merge of #113644 - jyn514:bootstrap-cleanups, r=albertlarsan68Matthias Krüger-68/+56
misc bootstrap cleanups - rename `detail_exit_macro` to `exit` - remove unnecessary `Builder::new_standalone` function - support `x suggest` with build-metrics
2023-07-15Remove unused `bootstrap::util::CiEnv` enumjyn-10/+0
the right one is `build_helper::CiEnv`; this one wasn't even used.
2023-07-15Replace `builder::try_run_quiet` with `run_quiet_delaying_failure`jyn-17/+13
It was only used when a `builder` is available, and I want to encourage using the version that supports `--no-fail-fast`.
2023-07-15Rename `Builder::try_run` to `run_delaying_failure`jyn-16/+16
2023-07-15Deduplicate `Builder::try_run` and mark `Config::try_run` as deprecatedjyn-63/+63
This does three things: 1. Remove `forward!(Build, fn try_run())`. Having `try_run` behave differently as a free function than an associated function is confusing, and `Builder::try_run` is a very desirable name. 2. Move `test::try_run` and `run::try_run` to `Builder::try_run`. These functions are different than `Config::try_run` - they delay the failure and print it out at the end of the build. 3. Mark `Config::try_run` as deprecated to encourage people to use `Builder::try_run` instead.
2023-07-15Fix rpath for libdir is specifiedWANG Rui-2/+3
Signed-off-by: WANG Rui <wangrui@loongson.cn>
2023-07-14rustdoc: rename to `src-script.js`Michael Howell-0/+0
This is a separate commit to keep Git happy.