Commit Graph

3265 Commits

Author SHA1 Message Date
mejrs 9745529523 Delete from_method from rustc_on_unimplemented documentation 2025-03-27 18:32:48 +01:00
Tshepang Mbambo 9975651be4
Merge pull request #2303 from rust-lang/tshepang-patch-2
typo
2025-03-24 10:41:46 +02:00
Tshepang Mbambo 55e47b61f5
typo 2025-03-24 10:41:19 +02:00
Tshepang Mbambo 4a7134202f
Merge pull request #2302 from rust-lang/tshepang-patch-1
add needed break
2025-03-24 10:40:38 +02:00
Tshepang Mbambo 07e905fbe6
add needed break 2025-03-24 10:40:03 +02:00
许杰友 Jieyou Xu (Joe) 354463193d
Merge pull request #2299 from jieyouxu/test-jobs-reorg
Slightly reorganize ecosystem tests, stub out codegen backend test pages
2025-03-24 16:29:25 +08:00
许杰友 Jieyou Xu (Joe) bc60f8a51a
Merge pull request #2300 from chiichen/dev/master/correct-config-to-bootstrap
doc: fix reference to #create-a-configtoml
2025-03-24 12:09:58 +08:00
Chiichen 6f9680da7a doc: fix reference to #create-a-configtoml 2025-03-23 12:38:46 +08:00
lcnr 6b982187ff
Merge pull request #2265 from BoxyUwU/typing_env
Update `ParamEnv` section for `TypingEnv` changes
2025-03-21 10:08:19 +01:00
Jieyou Xu b7fc809e0b
Stub out codegen backend test pages 2025-03-21 16:48:58 +08:00
Jieyou Xu 8c3302aa5f
Move Fuchsia and RfL under `ecosystem-test-jobs/` folder
Includes redirects to avoid breaking existing links.
2025-03-21 16:48:57 +08:00
Boxy b5522c1f58 Update `ParamEnv` section for `TypingEnv` changes 2025-03-20 17:30:22 +00:00
Vadim Petrochenkov c95537b30a
Merge pull request #2199 from sagudev/patch-1
Fix rib example
2025-03-20 15:26:12 +03:00
许杰友 Jieyou Xu (Joe) 047ccc0a28
Merge pull request #2295 from lolbinarycat/rustdoc-htmldocck
add new section on the `rustdoc` test suite
2025-03-20 14:49:50 +08:00
Tshepang Mbambo 21654649bf
Merge pull request #2297 from rust-lang/tshepang-patch-1
use correct code block markers
2025-03-19 18:08:53 +02:00
Tshepang Mbambo 86aa63456e
use correct code block markers
This makes this command pass

  mdbook test --chapter "Remarks on perma-unstable features"
2025-03-19 18:06:50 +02:00
许杰友 Jieyou Xu (Joe) eabec32066
Merge pull request #2296 from jieyouxu/no-external-linkcheck
Don't linkcheck external web links in PR CI
2025-03-19 17:25:37 +08:00
Jakub Beránek 531e5f9d35
Set linkcheck in `ci.yml` 2025-03-19 17:25:07 +08:00
binarycat 59f11cdfe5 update filename in link 2025-03-18 13:29:14 -05:00
binarycat 871280d6df normalize link titles 2025-03-18 13:25:39 -05:00
binarycat 2e1c4999c8 clean up wording/grammar and mention double quotes 2025-03-18 13:23:37 -05:00
binarycat 174678da35 rename htmldocck.md -> rustdoc-test-suite.md 2025-03-18 13:21:15 -05:00
binarycat 72aa06dff1 rustdoc test suite: clean up wording and intro 2025-03-18 13:19:33 -05:00
binarycat f248d2f57c htmldocck: expand limitations and mention compiletest directives 2025-03-18 13:10:26 -05:00
binarycat 8b501562a8 add htmldocck.md to SUMMARY.md 2025-03-18 12:10:43 -05:00
binarycat f00643aa1c add new section on the `rustdoc` test suite 2025-03-18 12:04:47 -05:00
Jakub Beránek f3d63db5b0
Merge pull request #2294 from Kobzol/ping-group
Add Fuchsia ping group page and mention Fuchsia and RfL ping groups in integration test pages
2025-03-18 16:32:12 +01:00
Jakub Beránek 1bcd02da96
Add Fuchsia ping group page 2025-03-18 16:22:57 +01:00
Jakub Beránek ba77a8030b
Reorder RfL tests page to move the "what if it breaks" section to the top 2025-03-18 16:17:59 +01:00
Jakub Beránek db56758b57
Add Fuchsia ping group notice 2025-03-18 16:16:28 +01:00
许杰友 Jieyou Xu (Joe) c3b9e8ae0a
Merge pull request #2268 from xizheyin/issue-137421
Add issue link for explaining that why rustc_private linker fails
2025-03-18 22:44:16 +08:00
xizheyin e0d9704841 Add chapter Remarks on perma-unstable features
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-03-18 20:49:20 +08:00
Jakub Beránek 9ad1c47333
Merge pull request #2293 from jieyouxu/rustc-pull
Rustc pull
2025-03-18 07:43:12 +01:00
Jieyou Xu af667b8696
Merge from rustc 2025-03-18 12:08:38 +08:00
Jieyou Xu bfe33b7ee0
Preparing for merge from rustc 2025-03-18 12:08:16 +08:00
bors 2995f2f2e7 Auto merge of #127173 - bjorn3:mangle_rustc_std_internal_symbol, r=wesleywiser,jieyouxu
Mangle rustc_std_internal_symbols functions

This reduces the risk of issues when using a staticlib or rust dylib compiled with a different rustc version in a rust program. Currently this will either (in the case of staticlib) cause a linker error due to duplicate symbol definitions, or (in the case of rust dylibs) cause rustc_std_internal_symbols functions to be silently overridden. As rust gets more commonly used inside the implementation of libraries consumed with a C interface (like Spidermonkey, Ruby YJIT (curently has to do partial linking of all rust code to hide all symbols not part of the C api), the Rusticl OpenCL implementation in mesa) this is becoming much more of an issue. With this PR the only symbols remaining with an unmangled name are rust_eh_personality (LLVM doesn't allow renaming it) and `__rust_no_alloc_shim_is_unstable`.

Helps mitigate https://github.com/rust-lang/rust/issues/104707

try-job: aarch64-gnu-debug
try-job: aarch64-apple
try-job: x86_64-apple-1
try-job: x86_64-mingw-1
try-job: i686-mingw-1
try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: test-various
try-job: armhf-gnu
2025-03-17 22:16:22 +00:00
bors ca6677d261 Auto merge of #138611 - matthiaskrgr:rollup-hmjbqva, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #133870 (Stabilize `asm_goto` feature gate)
 - #137449 (Denote `ControlFlow` as `#[must_use]`)
 - #137465 (mir_build: Avoid some useless work when visiting "primary" bindings)
 - #138349 (Emit function declarations for functions with `#[linkage="extern_weak"]`)
 - #138412 (Install licenses into `share/doc/rust/licenses`)
 - #138577 (rustdoc-json: Don't also include `#[deprecated]` in `Item::attrs`)
 - #138588 (Avoid double lowering of idents)

Failed merges:

 - #138321 ([bootstrap] Distribute split debuginfo if present)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-17 19:04:14 +00:00
bors 82393cf487 Auto merge of #137081 - Shourya742:2025-02-15-change-config.toml-to-bootstrap.toml, r=onur-ozkan,jieyouxu,kobzol
change config.toml to bootstrap.toml

Currently, both Bootstrap and Cargo uses same name as their configuration file, which can be confusing. This PR is based on a discussion to rename `config.toml` to `bootstrap.toml` for Bootstrap. Closes: https://github.com/rust-lang/rust/issues/126875.

I have split the PR into atomic commits to make it easier to review. Once the changes are finalized, I will squash them. I am particularly concerned about the changes made to modules that are not part of Bootstrap. How should we handle those changes? Should we ping the respective maintainers?
2025-03-17 15:51:28 +00:00
Matthias Krüger e52faca198
Rollup merge of #138412 - cuviper:licenses, r=jieyouxu
Install licenses into `share/doc/rust/licenses`

This changes the path from "licences" to "licenses" for consistency
across the repo, including the usage directly around this line. This is
a US/UK spelling difference, but I believe the US spelling is also more
common in open source in general.
2025-03-17 16:34:50 +01:00
Matthias Krüger 23280aeb9d
Rollup merge of #138349 - 1c3t3a:external-weak-cfi, r=rcvalle
Emit function declarations for functions with `#[linkage="extern_weak"]`

Currently, when declaring an extern weak function in Rust, we use the following syntax:
```rust
unsafe extern "C" {
   #[linkage = "extern_weak"]
   static FOO: Option<unsafe extern "C" fn() -> ()>;
}
```
This allows runtime-checking the extern weak symbol through the Option.

When emitting LLVM-IR, the Rust compiler currently emits this static as an i8, and a pointer that is initialized with the value of the global i8 and represents the nullabilty e.g.
```
`@FOO` = extern_weak global i8
`@_rust_extern_with_linkage_FOO` = internal global ptr `@FOO`
```

This approach does not work well with CFI, where we need to attach CFI metadata to a concrete function declaration, which was pointed out in https://github.com/rust-lang/rust/issues/115199.

This change switches to emitting a proper function declaration instead of a global i8. This allows CFI to work for extern_weak functions. Example:
```
`@_rust_extern_with_linkage_FOO` = internal global ptr `@FOO`
...
declare !type !61 !type !62 !type !63 !type !64 extern_weak void `@FOO(double)` unnamed_addr #6
```

We keep initializing the Rust internal symbol with the function declaration, which preserves the correct behavior for runtime checking the Option.

r? `@rcvalle`

cc `@jakos-sec`

try-job: test-various
2025-03-17 16:34:50 +01:00
DianQK cd1152a5ad
Merge pull request #2290 from jyn514/nvim-config
expand ${workspaceFolder} in sample vim config
2025-03-17 17:25:57 +08:00
bit-aloo e4ddc21c8a
replace config.toml to bootstrap.toml in src:doc:rustc-dev-guide 2025-03-17 12:56:44 +05:30
jyn bfda715ef4 expand ${workspaceFolder} in sample vim config 2025-03-16 21:06:18 -04:00
bors 277abcf650 Auto merge of #138363 - beetrees:f16-f128-integer-convert, r=Amanieu
Add `From<{integer}>` for `f16`/`f128` impls

This PR adds `impl From<{bool,i8,u8}> for f16` and `impl From<{bool,i8,u8,i16,u16,i32,u32}> for f128`.

The `From<{i64,u64}> for f128` impls are left commented out as adding them would allow using `f128` on stable before it is stabilised like in the following example:
```rust
fn f<T: From<u64>>(x: T) -> T { x }

fn main() {
    let x = f(1.0); // the type of the literal is inferred to be `f128`
}
```
None of the impls added in this PR have this issue as they are all, at minimum, also implemented by `f64`.

This PR will need a crater run for the `From<{i32,u32}>` impls, as `f64` is no longer the only float type to implement them (similar to the cause of #125198).

cc `@bjoernager`
r? `@tgross35`

Tracking issue: #116909
2025-03-17 00:33:36 +00:00
bors 1703bca76a Auto merge of #137011 - LuuuXXX:promote-ohos-with-host-tools, r=Amanieu
Promote ohos targets to tier2 with host tools.

### What does this PR try to resolve?

Try to promote the following [[Tier 2 without Host Tools](https://doc.rust-lang.org/rustc/platform-support.html#tier-2-without-host-tools)](https://doc.rust-lang.org/rustc/platform-support.html#tier-2-without-host-tools) targets to [[Tier 2 with Host Tools](https://doc.rust-lang.org/rustc/platform-support.html#tier-2-with-host-tools)](https://doc.rust-lang.org/rustc/platform-support.html#tier-2-with-host-tools):

- `aarch64-unknown-linux-ohos`
- `armv7-unknown-linux-ohos`
- `x86_64-unknown-linux-ohos`

### More Information?

see MCP: https://github.com/rust-lang/compiler-team/issues/811

### Blockage to be solved?

- [x] Submit an MCP
- [x] Submit code of promote ohos targets
- [x] Resolve related dependencies (`measureme`)

The modified code of the measureme has been merged (see https://github.com/rust-lang/measureme/pull/238). [done]
The new version will was released (https://github.com/rust-lang/measureme/pull/240). [done]
2025-03-16 18:42:18 +00:00
bors 721f56734e Auto merge of #137278 - heiseish:101210-extra-codegen-tests, r=scottmcm
added some new test to check for result and options opt

Apologies for the delay. Finally have some time to get back into contributing.

## Context
- Added some tests to show optimization on result and options for 64 and 128 bits
- Relevant issue https://github.com/rust-lang/rust/issues/101210

## Some newb questions from me
- [x] My local llvm IR has `nuw` in `result_nop_match_128` etc whereas [godbolt version](https://rust.godbolt.org/z/Td9zoT5zn) doesn't have. So I put optional there, but not sure if it's desirable (maybe I'm not using the compiled llvm in the repo). I ran the test with
```bash
./x test tests/codegen/try_question_mark_nop.rs
```
- [x] Unless I'm reading it wrongly, but `option_nop_match_128` and `option_nop_traits_128` look to be **not** optimized away?

Update:
Here's the test for future reference
```rust
// CHECK-LABEL: `@option_nop_match_128`
#[no_mangle]
pub fn option_nop_match_128(x: Option<i128>) -> Option<i128> {
    // CHECK: start:
    // CHECK-NEXT: %trunc = trunc nuw i128 %0 to i1
    // CHECK-NEXT: br i1 %trunc, label %bb3, label %bb4
    // CHECK: bb3:
    // CHECK-NEXT: %2 = getelementptr inbounds {{(nuw )?}}i8, ptr %_0, i64 16
    // CHECK-NEXT: store i128 %1, ptr %2, align 16
    // CHECK: bb4:
    // CHECK-NEXT: %storemerge = phi i128 [ 1, %bb3 ], [ 0, %start ]
    // CHECK-NEXT: store i128 %storemerge, ptr %_0, align 16
    // CHECK-NEXT: ret void
    match x {
        Some(x) => Some(x),
        None => None,
    }
}
```

r? `@scottmcm`
2025-03-16 05:17:07 +00:00
bors 3f0834ebd7 Auto merge of #137665 - Kobzol:update-sccache, r=marcoieni
Update sccache to 0.10.0

This time, does it also for Windows and macOS. This unifies the sccache version across all OSes that we use.

r? `@ghost`

try-job: dist-aarch64-apple
try-job: dist-x86_64-apple
try-job: dist-x86_64-msvc
try-job: dist-x86_64-msvc-alt
try-job: dist-i686-msvc
try-job: dist-aarch64-msvc
try-job: dist-x86_64-linux
try-job: dist-x86_64-netbsd
2025-03-15 20:13:16 +00:00
Tshepang Mbambo 077fae6ed9
Merge pull request #2287 from rust-lang/tshepang-running-chapter-cleaning
"Running tests" chapter cleaning
2025-03-15 11:36:30 +02:00
Tshepang Mbambo b04865b8d2 add some copy-paste goodness 2025-03-15 11:35:41 +02:00
Tshepang Mbambo 7d157cb36e make 'mdbook test --chapter "Running tests"' pass 2025-03-15 11:35:15 +02:00