Commit Graph

303456 Commits

Author SHA1 Message Date
B I Mohammed Abbas
af15e048b2 Reserve x18 register for aarch64 wrs vxworks target 2025-01-07 09:18:31 +05:30
Trevor Gross
0359db23c7 Increase the allowed ULP for tgammaf
Extensive tests report that the precision isn't actually 0:

    ---- mp_extensive_tgammaf ----

        input:    (-0.00063536887,) (0xba268ee2,)
        expected: -1574.4668             0xc4c4cef0
        actual:   -1574.4667             0xc4c4ceef

    Caused by:
        ulp 1 > 0

Update ULP to reflect this. After this change, `tgammaf` extensive tests
pass.
2025-01-06 22:19:49 -05:00
Jacob Pratt
ee55b347c9 Rollup merge of #135170 - celinval:chores-vacation-end, r=jieyouxu
Update triagebot.toml: celinval vacation is over

I'm also removing myself from the MIR syntax changes notifications.
2025-01-06 22:04:18 -05:00
Jacob Pratt
e78b1321e5 Rollup merge of #135139 - c410-f3r:8-years-rfc, r=jhpratt
[generic_assert] Constify methods used by the formatting system

cc #44838

Starts the "constification" of all the elements required to allow the execution of the formatting system in constant environments.

```rust
const _: () = { panic!("{:?}", 1i32); };
```

Further stuff is blocked by #133999.
2025-01-06 22:04:17 -05:00
Jacob Pratt
44808ae798 Rollup merge of #135126 - klensy:deprecated-and-do-nothing, r=jieyouxu
mark deprecated option as deprecated in rustc_session to remove copypasta and small refactor

This marks deprecated options as deprecated via flag in options table in rustc_session, which removes copypasted deprecation text from rustc_driver_impl.

This also adds warning for deprecated `-C ar` option, which didn't emitted any warnings before.
Makes `inline_threshold` `[UNTRACKED]`, as it do nothing.
Adds few tests.

See individual commits.
2025-01-06 22:04:17 -05:00
Jacob Pratt
1b370d32d6 Rollup merge of #135116 - camelid:sidebar-case, r=fmease
rustdoc: Fix mismatched capitalization in sidebar

Previously, the main content used "Aliased Type", while the sidebar said "Aliased type". Now, they both say "Aliased Type", which is the more common capitalization in Rustdoc.

See the following link for an example.
https://doc.rust-lang.org/1.83.0/std/io/type.Result.html
2025-01-06 22:04:16 -05:00
Jacob Pratt
8b54f951e5 Rollup merge of #135090 - compiler-errors:invalid-tuple-ctor-projection, r=lqd,jieyouxu
Suggest to replace tuple constructor through projection

See the code example. when `Self::Assoc` normalizes to a struct that has a tuple constructor, you cannot construct the type via `Self::Assoc(field, field)`. Instead, suggest to replace it with the correct named struct.

Fixes #120871
2025-01-06 22:04:15 -05:00
Jacob Pratt
3deb5c289e Rollup merge of #134744 - compiler-errors:transmute-non-wf, r=lcnr
Don't ice on bad transmute in typeck in new solver

Old trait solver ends up getting its infcx tainted because we try to normalize the type, but the new trait solver doesn't. This means we try to compute the stalled transmute obligations, which tries to normalize a type an ICEs. Let's make this a delayed bug.

r? lcnr
2025-01-06 22:04:15 -05:00
Jacob Pratt
65f35be9fc Rollup merge of #134568 - BoxyUwU:relnotes_1_84, r=pietroalbini
Release notes for 1.84.0

cc ``@rust-lang/release`` r? ``@Mark-Simulacrum``
2025-01-06 22:04:14 -05:00
Jacob Pratt
b642740e4f Rollup merge of #132345 - compiler-errors:fx-diag, r=lcnr
Improve diagnostics for `HostEffectPredicate` in the new solver

Adds derived cause for host effect predicates. Some diagnostics regress, but that's connected to the fact that our predicate visitor doesn't play well with aliases just yet.
2025-01-06 22:04:13 -05:00
Jacob Pratt
4e4a93c2dd Rollup merge of #131830 - hoodmane:emscripten-wasm-eh, r=workingjubilee
Add support for wasm exception handling to Emscripten target

This is a draft because we need some additional setting for the Emscripten target to select between the old exception handling and the new exception handling. I don't know how to add a setting like that, would appreciate advice from Rust folks. We could maybe choose to use the new exception handling if `Ctarget-feature=+exception-handling` is passed? I tried this but I get errors from llvm so I'm not doing it right.
2025-01-06 22:04:13 -05:00
Scott McMurray
ad5f912d96 Transmute from NonNull to pointer when elaborating a box deref (MCP807) 2025-01-06 18:43:40 -08:00
Michael Goulet
999695bab9 Make sure to use Receiver trait when extracting object method candidate 2025-01-07 02:27:15 +00:00
Trevor Gross
ae2ef2031a Merge pull request #739 from rust-lang/release-plz-2025-01-03T03-17-10Z
chore: release v0.1.141
2025-01-06 21:09:59 -05:00
github-actions[bot]
1b0adb233c chore: release v0.1.141 2025-01-07 01:57:53 +00:00
Trevor Gross
e6ea2802d1 Update the libm submodule 2025-01-06 20:57:24 -05:00
Trevor Gross
f3ad123a09 Replace "intrinsic" config with "arch" config
WASM is the only architecture we use `intrinsics::` for. We probably
don't want to do this for any other architectures since it is better to
use assembly, or work toward getting the functions available in `core`.

To more accurately reflect the relationship between arch and intrinsics,
make wasm32 an `arch` module and call the intrinsics from there.
2025-01-06 20:17:01 -05:00
Matthew Maurer
3323e5a9ad llvm: Ignore error value that is always false
See llvm/llvm-project#121851

For LLVM 20+, this function (`renameModuleForThinLTO`) has no return
value. For prior versions of LLVM, this never failed, but had a
signature which allowed an error value people were handling.
2025-01-07 01:02:22 +00:00
Matthew Maurer
fc32dd49cb llvm: Ignore error value that is always false
See llvm/llvm-project#121851

For LLVM 20+, this function (`renameModuleForThinLTO`) has no return
value. For prior versions of LLVM, this never failed, but had a
signature which allowed an error value people were handling.
2025-01-07 01:02:22 +00:00
Catherine Flores
98b9a263bc clippy::redundant_locals is not a correctness lint (#13747)
Even its documentation says so. According to the documentation, it might
either be a "suspicious" or a "perf" lint.

changelog: [`redundant_locals`]: Reclassify as "suspicious" lint.
2025-01-07 00:50:22 +00:00
Trevor Gross
f4f942c3e9 Update the libm submodule 2025-01-06 19:17:41 -05:00
dianne
fe8b12f8cf only avoid blaming assignments from argument patterns 2025-01-06 16:12:11 -08:00
dianne
1b2281a493 point out unblamed constraints from Copy/Sized bounds in region errors 2025-01-06 16:12:11 -08:00
dianne
2c5815b285 make outlives constraints from pointer comparisons less boring 2025-01-06 16:12:11 -08:00
dianne
10061b3a4f make outlives constraints from generic arguments less boring 2025-01-06 16:12:11 -08:00
dianne
6421d4cf80 best_blame_constraint: prioritize blaming interesting-seeming constraints 2025-01-06 16:12:11 -08:00
dianne
45b2ae935d remove the unused ConstraintCategory::ClosureBounds 2025-01-06 16:12:11 -08:00
dianne
50222dba2e best_blame_constraint: avoid blaming assignments without user-provided types 2025-01-06 16:12:11 -08:00
dianne
31e4d8175a best_blame_constraint: avoid blaming constraints from MIR generated by desugaring 2025-01-06 16:12:11 -08:00
dianne
2864906fce best_blame_constraint: add a special case to recover object lifetime default notes 2025-01-06 16:12:04 -08:00
dianne
ac922245f0 best_blame_constraint: don't filter constraints by sup SCC
The SCCs of the region graph are not a reliable heuristic to use for blaming an interesting
constraint for diagnostics. For region errors, if the outlived region is `'static`, or the involved
types are invariant in their lifetiems, there will be cycles in the constraint graph containing both
the target region and the most interesting constraints to blame. To get better diagnostics in these
cases, this commit removes that heuristic.
2025-01-06 16:08:29 -08:00
Chayim Refael Friedman
78f89a6210 Merge pull request #18858 from davidbarsky/davidbarsky/fix-18854
fix: clear diagnostics on cancel unconditionally
2025-01-06 23:59:35 +00:00
dianne
2249232ad8 further clean up best_blame_constraint
This gets rid of `categorized_path`, as it was redundant given the `OutlivesConstraint`s in `path`
already have a category field.
2025-01-06 15:53:33 -08:00
dianne
aa8d5bff4c cleanup: remove ExtraConstraintInfo
`ExtraConstraintInfo` was used only for a single subdiagnostic, so this moves the logic for that
to its own function and eliminates the indirection. In order to do so cleanly, this also changes
the arguments to `BorrowExplanation::add_explanation_to_diagnostic`, which happens to simplify its
call sites.
2025-01-06 15:53:30 -08:00
Aaron Ang
e0625f4dd5 fix(adding_lints): usage of early vs late lint pass 2025-01-06 15:43:06 -08:00
David Barsky
e02b3ec9cc fix: clear diagnostics on cancel unconditionally, fixing #18854 2025-01-06 18:41:21 -05:00
Kornel
85a71ea0c7 More compelling env_clear() examples 2025-01-06 23:39:53 +00:00
Trevor Gross
c574145577 Don't use intrinsics abs for f16 and f128 on wasm32
This configuration was duplicated from `fabs` and `fabsf`, but wasm is
unlikely to have an intrinsic lowering for these float types. So, just
always use the generic.
2025-01-06 18:33:24 -05:00
Trevor Gross
b5a217b11c Remove an unused feature = "force-soft-floats" gate 2025-01-06 18:06:38 -05:00
bors
0f1e965fec Auto merge of #135172 - matthiaskrgr:rollup-8fe3fxi, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #134742 (Use `PostBorrowckAnalysis` in `check_coroutine_obligations`)
 - #134771 (Report correct `SelectionError` for `ConstArgHasType` in new solver fulfill)
 - #134951 (Suppress host effect predicates if underlying trait doesn't hold)
 - #135097 (bootstrap: Consolidate coverage test suite steps into a single step)
 - #135146 (Don't enable anyhow's `backtrace` feature in opt-dist)
 - #135153 (chore: remove redundant words in comment)
 - #135157 (Move the has_errors check in rustdoc back to after TyCtxt is created)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-06 22:39:16 +00:00
Trevor Gross
ac9fec04ef Switch from using unstable-intrinsics to intrinsics_enabled
Unlike `unstable-intrinsics`, `intrinsics_enabled` gets disabled with
`force-soft-floats` which is what we want here.
2025-01-06 17:28:01 -05:00
Noah Lev
b0aaa386d8 rustdoc: Fix mismatched capitalization in sidebar
Previously, the main content used "Aliased Type", while the sidebar said
"Aliased type". Now, they both say "Aliased Type", which is the more common
capitalization in Rustdoc.

See the following link for an example.
https://doc.rust-lang.org/1.83.0/std/io/type.Result.html
2025-01-06 14:26:07 -08:00
Xing Xue
7f31b579c7 Replace the random substring of a linker argument with a placeholder and nullify the timestamp field of XCOFF files for file comparison. 2025-01-06 16:59:46 -05:00
Giga Bowser
aa36ac8867 internal: Migrate if let <=> match assists to SyntaxEditor 2025-01-06 15:58:39 -06:00
Giga Bowser
b2fa162071 internal: Migrate replace_let_with_if_let assist to SyntaxEditor 2025-01-06 15:58:39 -06:00
Giga Bowser
fa8acfac7e internal: Add some pattern constructors to SyntaxFactory 2025-01-06 15:58:39 -06:00
Giga Bowser
396b56fd52 internal: Add some expr constructors to SyntaxFactory 2025-01-06 15:58:39 -06:00
Giga Bowser
cd803805b7 internal: Add some path constructors to SyntaxFactory 2025-01-06 15:58:39 -06:00
Giga Bowser
cce5f25f60 internal: make::expr_match should return ast::MatchExpr 2025-01-06 15:58:39 -06:00
Giga Bowser
0606db4373 internal: Generally improve make::match_arm
`make::match_arm` should take a single `ast::Pat`, and callers can handle creating an `ast::OrPat` if need be. It should also take a proper `ast::MatchGuard`, instead of making one itself.
2025-01-06 15:58:39 -06:00