David Kurilla
421661553f
fix: fix immutable tree error
2024-11-12 22:43:48 +00:00
Matthias Krüger
978f592539
Rollup merge of #132948 - RalfJung:const_unicode_case_lookup, r=Noratrieb
...
stabilize const_unicode_case_lookup
Fixes https://github.com/rust-lang/rust/issues/101400
See there for t-libs-api FCP
2024-11-12 23:26:43 +01:00
Matthias Krüger
8f67b5b349
Rollup merge of #132657 - mustartt:aix-run-make-support, r=jieyouxu
...
AIX: add run-make support
On AIX, we are required explicit link against `c++` and `c++abi` to support running the run-make test suite.
2024-11-12 18:11:04 +01:00
Matthias Krüger
4a699fc475
Rollup merge of #132541 - RalfJung:const-stable-extern-crate, r=compiler-errors
...
Proper support for cross-crate recursive const stability checks
~~Stacked on top of https://github.com/rust-lang/rust/pull/132492 ; only the last three commits are new.~~
In a crate without `staged_api` but with `-Zforce-unstable-if-unmarked`, we now subject all functions marked with `#[rustc_const_stable_indirect]` to recursive const stability checks. We require an opt-in so that by default, a crate can be built with `-Zforce-unstable-if-unmarked` and use nightly features as usual. This property is recorded in the crate metadata so when a `staged_api` crate calls such a function, it sees the `#[rustc_const_stable_indirect]` and allows it to be exposed on stable. This, finally, will let us expose `const fn` from hashbrown on stable.
The second commit makes const stability more like regular stability: via `check_missing_const_stability`, we ensure that all publicly reachable functions have a const stability attribute -- both in `staged_api` crates and `-Zforce-unstable-if-unmarked` crates. To achieve this, we move around the stability computation so that const stability is computed after regular stability is done. This lets us access the final result of the regular stability computation, which we use so that `const fn` can inherit the regular stability (but only if that is "unstable"). Fortunately, this lets us get rid of an `Option` in `ConstStability`.
This is the last PR that I have planned in this series.
r? `@compiler-errors`
2024-11-12 18:11:04 +01:00
Matthias Krüger
134459ea3d
Rollup merge of #131831 - onur-ozkan:improve-rustc-if-unchanged-logic, r=Mark-Simulacrum
...
extend the "if-unchanged" logic for compiler builds
Implements the first item from [this tracking issue](https://github.com/rust-lang/rust/issues/131744 ).
In short, we want to make "if-unchanged" logic to check for changes outside of certain allowed directories, and this PR implements that.
See https://github.com/rust-lang/rust/issues/131658 for more context.
2024-11-12 18:11:03 +01:00
Ralf Jung
eddab479fd
stabilize const_unicode_case_lookup
2024-11-12 15:13:31 +01:00
Yoh Deadfall
bd7772d573
Renamed this to ecx
2024-11-12 12:45:32 +03:00
Jieyou Xu
a6dac708f5
tests/run-make: update mte-ffi to use gcc as the c compiler explicitly
2024-11-12 08:57:57 +00:00
Jieyou Xu
98c771c187
run_make_support: add a gcc wrapper command
2024-11-12 16:20:17 +08:00
bors
5700240aff
Auto merge of #132943 - matthiaskrgr:rollup-164l3ej, r=matthiaskrgr
...
Rollup of 8 pull requests
Successful merges:
- #132651 (Remove attributes from generics in built-in derive macros)
- #132668 (Feature gate yield expressions not in 2024)
- #132771 (test(configure): cover `parse_args` in `src/bootstrap/configure.py`)
- #132895 (Generalize `NonNull::from_raw_parts` per ACP362)
- #132914 (Update grammar in std::cell docs.)
- #132927 (Consolidate type system const evaluation under `traits::evaluate_const`)
- #132935 (Make sure to ignore elided lifetimes when pointing at args for fulfillment errors)
- #132941 (Subtree update of `rust-analyzer`)
r? `@ghost`
`@rustbot` modify labels: rollup
2024-11-12 08:15:38 +00:00
Matthias Krüger
38c2db4020
Rollup merge of #132941 - lnicola:sync-from-ra2, r=lnicola
...
Subtree update of `rust-analyzer`
r? `@ghost`
2024-11-12 08:07:20 +01:00
Matthias Krüger
52bb9fafd0
Rollup merge of #132793 - ehuss:update-mdbook, r=Mark-Simulacrum
...
Update mdbook to 0.4.42
This updates mdbook to 0.4.42
Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0441
There were some significant changes that I would like to get early testing on.
This also updates rust-by-example which was required due to an update to the theme file.
2024-11-12 06:27:18 +01:00
Boxy
bea0148ac6
Consolidate type system const evaluation under traits::evaluate_const
...
mew
2024-11-12 02:54:03 +00:00
Yoh Deadfall
e43a5c0ac5
Renamed this arguments to ecx
2024-11-11 22:31:47 +03:00
Kirill Bulatov
e646263abc
Update the file hash
2024-11-11 16:06:55 +01:00
Kirill Bulatov
572ae698be
Use completion item indices instead of property matching when searching for the completion item to resolve
2024-11-11 15:50:04 +01:00
bors
d4822c2d84
Auto merge of #127589 - notriddle:notriddle/search-sem-3, r=GuillaumeGomez
...
rustdoc-search: simplify rules for generics and type params
**Heads up!**: This PR is a follow-up that depends on #124544 . It adds 12dc24f460 , a change to the filtering behavior, and 9900ea48b5 , a minor ranking tweak.
Part of https://github.com/rust-lang/rust-project-goals/issues/112
This PR overturns https://github.com/rust-lang/rust/pull/109802
## Preview
* no results: [`Box<[A]> -> Vec<B>`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3/std/index.html?search=Box%3C%5BA%5D%3E%20-%3E%20Vec%3CB%3E )
* results: [`Box<[A]> -> Vec<A>`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3/std/index.html?search=Box%3C%5BA%5D%3E%20-%3E%20Vec%3CA%3E )
* [`T -> U`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3/std/index.html?search=T%20-%3E%20U )
* [`Cx -> TyCtxt`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3-compiler/rustdoc/index.html?search=Cx%20-%3E%20TyCtxt )

## Description
This commit is a response to feedback on the displayed type signatures results, by making generics act stricter.
- Order within generics is significant. This means `Vec<Allocator>` now matches only with a true vector of allocators, instead of matching the second type param. It also makes unboxing within generics stricter, so `Result<A, B>` only matches if `B` is in the error type and `A` is in the success type. The top level of the function search is unaffected.
- Generics are only "unboxed" if a type is explicitly opted into it. References and tuples are hardcoded to allow unboxing, and Box, Rc, Arc, Option, Result, and Future are opted in with an unstable attribute. Search result unboxing is the process that allows you to search for `i32 -> str` and get back a function with the type signature `&Future<i32> -> Box<str>`.
- Instead of ranking by set overlap, it ranks by the number of items in the type signature. This makes it easier to find single type signatures like transmute.
## Find the discussion on
* <https://rust-lang.zulipchat.com/#narrow/stream/393423-t-rustdoc.2Fmeetings/topic/meeting.202024-07-08/near/449965149 >
* <https://github.com/rust-lang/rust/pull/124544#issuecomment-2204272265 >
* <https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/deciding.20on.20semantics.20of.20generics.20in.20rustdoc.20search >
2024-11-11 12:26:00 +00:00
Ralf Jung
8ddc8964fe
stacked borrows tests: add those that fail under TB
2024-11-11 11:16:19 +01:00
onur-ozkan
bc7531089e
move src/tools/build_helper into src/build_helper
...
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-11 11:19:11 +03:00
Ralf Jung
ad16dc4b87
typo
2024-11-11 08:04:38 +01:00
Ralf Jung
424bc60a13
sync support: dont implicitly clone inside the general sync machinery
2024-11-11 08:02:43 +01:00
Laurențiu Nicola
c2ffafdc9a
Merge pull request #18482 from regexident/hir_trait_supertraits_accessors
...
internal: Add public `direct_supertraits(…)` & `all_supertraits(…)` accessor methods to `hir::Trait`
2024-11-11 06:58:17 +00:00
Ralf Jung
7137683543
Merge pull request #4002 from tiif/leakythread
...
Remove MutexID list
2024-11-11 06:21:54 +00:00
Henry Jiang
405017ac35
refactor flags
2024-11-10 21:52:18 -05:00
bors
42b2496320
Auto merge of #126597 - estebank:unicode-output, r=fmease
...
Add Unicode block-drawing compiler output support
Add nightly-only theming support to rustc output using Unicode box
drawing characters instead of ASCII-art to draw the terminal UI.
In order to enable, the flags `-Zunstable-options=yes --error-format=human-unicode` must be passed in.
After:
```
error: foo
╭▸ test.rs:3:3
│
3 │ X0 Y0 Z0
│ ┌───╿──│──┘
│ ┌│───│──┘
│ ┏││━━━┙
│ ┃││
4 │ ┃││ X1 Y1 Z1
5 │ ┃││ X2 Y2 Z2
│ ┃│└────╿──│──┘ `Z` label
│ ┃└─────│──┤
│ ┗━━━━━━┥ `Y` is a good letter too
│ `X` is a good letter
╰╴
note: bar
╭▸ test.rs:4:3
│
4 │ ┏ X1 Y1 Z1
5 │ ┃ X2 Y2 Z2
6 │ ┃ X3 Y3 Z3
│ ┗━━━━━━━━━━┛
├ note: bar
╰ note: baz
note: qux
╭▸ test.rs:4:3
│
4 │ X1 Y1 Z1
╰╴ ━━━━━━━━
```
Before:
```
error: foo
--> test.rs:3:3
|
3 | X0 Y0 Z0
| ___^__-__-
| |___|__|
| ||___|
| |||
4 | ||| X1 Y1 Z1
5 | ||| X2 Y2 Z2
| |||____^__-__- `Z` label
| ||_____|__|
| |______| `Y` is a good letter too
| `X` is a good letter
|
note: bar
--> test.rs:4:3
|
4 | / X1 Y1 Z1
5 | | X2 Y2 Z2
6 | | X3 Y3 Z3
| |__________^
= note: bar
= note: baz
note: qux
--> test.rs:4:3
|
4 | X1 Y1 Z1
| ^^^^^^^^
```
After:

Before:

2024-11-11 00:00:58 +00:00
Esteban Küber
1d78004575
Add Unicode block-drawing compiler output support
...
Add nightly-only theming support to rustc output using Unicode box
drawing characters instead of ASCII-art to draw the terminal UI:
After:
```
error: foo
╭▸ test.rs:3:3
│
3 │ X0 Y0 Z0
│ ┌───╿──│──┘
│ ┌│───│──┘
│ ┏││━━━┙
│ ┃││
4 │ ┃││ X1 Y1 Z1
5 │ ┃││ X2 Y2 Z2
│ ┃│└────╿──│──┘ `Z` label
│ ┃└─────│──┤
│ ┗━━━━━━┥ `Y` is a good letter too
│ `X` is a good letter
╰╴
note: bar
╭▸ test.rs:4:3
│
4 │ ┏ X1 Y1 Z1
5 │ ┃ X2 Y2 Z2
6 │ ┃ X3 Y3 Z3
│ ┗━━━━━━━━━━┛
├ note: bar
╰ note: baz
note: qux
╭▸ test.rs:4:3
│
4 │ X1 Y1 Z1
╰╴ ━━━━━━━━
```
Before:
```
error: foo
--> test.rs:3:3
|
3 | X0 Y0 Z0
| ___^__-__-
| |___|__|
| ||___|
| |||
4 | ||| X1 Y1 Z1
5 | ||| X2 Y2 Z2
| |||____^__-__- `Z` label
| ||_____|__|
| |______| `Y` is a good letter too
| `X` is a good letter
|
note: bar
--> test.rs:4:3
|
4 | / X1 Y1 Z1
5 | | X2 Y2 Z2
6 | | X3 Y3 Z3
| |__________^
= note: bar
= note: baz
note: qux
--> test.rs:4:3
|
4 | X1 Y1 Z1
| ^^^^^^^^
```
2024-11-10 23:57:18 +01:00
tiif
bfb36e35b9
Remove MutexID list
2024-11-11 02:52:34 +08:00
Laurențiu Nicola
a11877735c
Merge pull request #18492 from samestep/docs-dev-no-design-label
...
Replace Design label with C-Architecture
2024-11-10 18:46:57 +00:00
Sam Estep
29f84262a4
Replace with C-Architecture
2024-11-10 13:34:26 -05:00
Ralf Jung
fa827f8565
Preparing for merge from rustc
2024-11-10 16:26:34 +01:00
Ralf Jung
e8a3ffee49
fix linux-futex test being accidentally disabled
2024-11-10 12:36:40 +01:00
Ralf Jung
d1a4812164
store futexes in per-allocation data rather than globally
2024-11-10 11:01:57 +01:00
Ralf Jung
e96808162a
ensure that all publicly reachable const fn have const stability info
2024-11-10 10:16:26 +01:00
Ralf Jung
a01f37c7f4
Merge from rustc
2024-11-10 10:03:57 +01:00
Ralf Jung
ce7a56072b
Preparing for merge from rustc
2024-11-10 10:01:05 +01:00
Jubilee
61f51931b2
Rollup merge of #132801 - RalfJung:alloc-mutability, r=oli-obk
...
interpret: get_alloc_info: also return mutability
This will be needed for https://github.com/rust-lang/miri/pull/3971
This then tuned into a larger refactor where we introduce a new type for the `get_alloc_info` return data, and we move some code to methods on `GlobalAlloc` to avoid duplicating it between the validity check and `get_alloc_info`.
2024-11-09 20:28:43 -08:00
bors
303fc0527a
Auto merge of #132829 - weihanglo:update-cargo, r=weihanglo
...
Update cargo
16 commits in 0310497822a7a673a330a5dd068b7aaa579a265e..4a2d8dc636445b276288543882e076f254b3ae95
2024-11-01 19:27:56 +0000 to 2024-11-09 19:10:33 +0000
- test: adjust `cargo_test_env` to unblock rust submodule update (rust-lang/cargo#14803 )
- feat(warnings): add build.warnings option (rust-lang/cargo#14388 )
- Revert "feat: Add `CARGO_RUSTC_CURRENT_DIR`" (rust-lang/cargo#14799 )
- CI: make the `lint-docs` job required (rust-lang/cargo#14797 )
- Switch CI from bors to merge queue (rust-lang/cargo#14718 )
- docs(test): Document Execs assertions based on port effort (rust-lang/cargo#14793 )
- fix(test): Make redactions consistent with snapbox (rust-lang/cargo#14790 )
- test(gc): Update remaining unordered tests to snapbox (rust-lang/cargo#14785 )
- Normalize the `target` paths (rust-lang/cargo#14497 )
- rustfix: replace special-case duplicate handling with error (rust-lang/cargo#14782 )
- test: Update some emaining unordered tests to snapbox (rust-lang/cargo#14781 )
- Change config paths to only check CARGO_HOME for cargo-script (rust-lang/cargo#14749 )
- Enable transfer feature in triagebot (rust-lang/cargo#14777 )
- Add transactional semantics to `rustfix` (rust-lang/cargo#14747 )
- doc: fix `GlobalContext` reference (rust-lang/cargo#14773 )
- chore: update handlebars to v6, fix build error (rust-lang/cargo#14772 )
2024-11-10 00:23:56 +00:00
Weihang Lo
be30861174
Update cargo
2024-11-09 18:12:21 -05:00
bjorn3
3b02a3309e
Pass TyCtxt instead of Queries to the after_analysis callbacks
...
There is no other query that may need to be called at that point anyway.
2024-11-09 18:43:29 +00:00
Matthias Krüger
88acd493f9
Rollup merge of #132754 - Zalathar:opts, r=GuillaumeGomez,jieyouxu
...
Simplify the internal API for declaring command-line options
The internal APIs for declaring command-line options are old, and intimidatingly complex. This PR replaces them with a single function that takes explicit `stability` and `kind` arguments, making it easier to see how each option is handled, and whether it is treated as stable or unstable.
We also don't appear to have any tests for the output of `rustc --help` and similar, so I've added a run-make test to verify that this PR doesn't change any output. (There is already a similar run-make test for rustdoc's help output.)
---
The librustdoc changes are simply adjusting to updated compiler APIs; no functional change intended.
---
A side-effect of these changes is that rustfmt can once again format the entirety of these option declaration lists, which it was not doing before.
2024-11-09 19:16:44 +01:00
Ralf Jung
4a54ec8c18
make return type of get_alloc_info a struct, and reduce some code duplication with validity checking
2024-11-09 15:18:52 +01:00
Ralf Jung
5ff90d069a
Merge pull request #4020 from RalfJung/thread-sope
...
pthread-sync test: use thread::scope for more reliable thread scoping
2024-11-09 10:16:25 +00:00
Ralf Jung
30a2ae6f05
interpret: get_alloc_info: also return mutability
2024-11-09 11:13:44 +01:00
Ralf Jung
fe398880e0
pthread-sync: avoid confusing error when running with preemption
2024-11-09 10:52:01 +01:00
The Miri Cronjob Bot
15d883e5b7
Merge from rustc
2024-11-09 05:12:46 +00:00
The Miri Cronjob Bot
beb8d6fac1
Preparing for merge from rustc
2024-11-09 05:04:45 +00:00
Eric Huss
544b9f9a94
Update mdbook to 0.4.42
2024-11-08 15:38:32 -08:00
bors
59cec72a57
Auto merge of #132746 - flip1995:clippy-subtree-update, r=Manishearth
...
Clippy subtree update
r? `@Manishearth`
2024-11-08 16:49:13 +00:00
Ralf Jung
d7aceeea71
Merge pull request #4004 from YohDeadfall/thread-name-ice-fix
...
Get/set thread name shims return errors for invalid handles
2024-11-08 15:19:51 +00:00
Yoh Deadfall
1254d8e75e
Get/set thread name shims return errors for invalid handles
2024-11-08 17:54:10 +03:00