Commit Graph

285822 Commits

Author SHA1 Message Date
Josh Stone
587012b85a fix clippy::unneeded-struct-pattern 2025-02-18 09:32:44 -08:00
Josh Stone
5a89237680 update STAGE0_MISSING_TARGETS 2025-02-18 09:32:44 -08:00
Josh Stone
3c45324e67 update cfg(bootstrap) 2025-02-18 09:32:44 -08:00
onur-ozkan
5408aaea59 fix rust-analyzer tests
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 20:21:50 +03:00
Frank Steffahn
d93926cb5d Fix typo in hidden internal docs of TrustedRandomAccess
I typoed the coercion direction here 4 years ago; fixing it now
2025-02-18 17:54:56 +01:00
Josh Stone
82ad08ea7f bump stage0 2025-02-18 08:51:01 -08:00
Josh Stone
fdba8a7c47 update version placeholders
(cherry picked from commit e4840ce59bdddb19394df008c5c26d9c493725f8)
2025-02-18 08:50:21 -08:00
Laurențiu Nicola
e6c1e6cb8a Merge pull request #19176 from BenjaminBrienen/patch-3
Fix dead link
2025-02-18 16:39:43 +00:00
Ed Page
5e92241b61 docs(dev): Access features as functions, not members
This was changed in #132027
2025-02-18 10:35:13 -06:00
Josh Triplett
ec2034d53d Reorder "This lock may be advisory or mandatory." earlier in the lock docs 2025-02-18 17:31:10 +01:00
Ed Page
aecde199ad docs(dev): Remove reference to features_untracked
This was removed in #114723
2025-02-18 10:28:36 -06:00
onur-ozkan
26f588bba4 fix cargo tests
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 16:28:05 +00:00
Josh Triplett
35674eff6f Clarify that locking on Windows also works for files opened with .read(true) 2025-02-18 17:26:33 +01:00
Benjamin Brienen
176d3ff78c Fix dead link 2025-02-18 17:22:45 +01:00
Xing Xue
0ffb771607 Use yes except target_os = "nto". 2025-02-18 16:22:16 +00:00
onur-ozkan
60ade6c1d7 add test coverage for tool::get_tool_rustc_compiler
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 16:07:42 +00:00
onur-ozkan
baef666f78 adapt tool module to ToolBuildResult
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 16:00:06 +00:00
onur-ozkan
5e5b1b054a document tool implementations
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 15:35:51 +00:00
Ralf Jung
803feb5dc6 x86-sse2 ABI: use SSE registers for floats and SIMD 2025-02-18 16:11:41 +01:00
Alejandra González
f49b4bc165 remove an unneeded #![feature] (#14245)
It seems as if `#![feature(binary_heap_into_iter_sorted)]` is not
required anymore.

changelog: none
2025-02-18 15:02:26 +00:00
onur-ozkan
6cf650fce7 remove manually handled stage offs
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 16:32:13 +03:00
bjorn3
768a5bd470 Remove scrutinee_hir_id from ExprKind::Match
It is unused
2025-02-18 13:51:32 +01:00
Samuel Tardieu
45f7a60d31 .last() to .next_back() requires a mutable receiver
In the case where `iter` is a `DoubleEndedIterator`, replacing a call to
`iter.last()` (which consumes `iter`) by `iter.next_back()` (which
requires a mutable reference to `iter`) cannot be done when `iter`
Is not a mutable binding or a mutable reference.

When `iter` is a local binding, it can be made mutable by fixing its
definition site.
2025-02-18 13:51:01 +01:00
onur-ozkan
a33843968c return ToolBuildResult to utilize them from callers
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 15:35:33 +03:00
onur-ozkan
8e011e5e67 migrate llvm-bitcode-linker to ToolBuild
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 15:34:55 +03:00
onur-ozkan
72e67e87da return more advanced type from ToolBuild
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 15:34:49 +03:00
onur-ozkan
7638abb580 bless tests
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 15:34:45 +03:00
onur-ozkan
164f2408a2 pass target_compiler from Rustdoc
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 15:34:43 +03:00
onur-ozkan
f012427aa6 handle ToolRustc build stages automatically
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 15:34:40 +03:00
Lukas Markeffsky
2fbc413d83 cosmetic changes
- change function parameter order to `cx, ty, ...` to match the other
  functions in this file
- use `ct` identifier for `ty::Const` to match the majority of the
  compiler codebase
- remove useless return
- bring match arms in a more natural order
2025-02-18 13:22:46 +01:00
Lukas Markeffsky
67345f9203 remove useless parameter
Remove the `repr` parameter from the wrappers around `calc.univariant`,
because it's always defaulted. Only ADTs can have a repr and those call
`calc.layout_of_struct_or_enum` and not `calc.univariant`.
2025-02-18 13:22:46 +01:00
Lukas Markeffsky
1d1ac3d310 remove redundant code
- we normalize before calling `layout_of_uncached`, so we don't need to
  normalize again later
- we check for type/const errors at the top of `layout_of_uncached`, so
  we don't need to check again later
2025-02-18 13:22:45 +01:00
Lukas Markeffsky
7a667d206c remove unreachable cases
`ty::Placeholder` is used by the trait solver and computing its layout
was necessary, because the `PointerLike` trait used to be automatically
implemented for all types with pointer-like layout.
Nowadays, `PointerLike` requires user-written impls and the trait solver
no longer computes any layouts, so this can be removed.

Unevaluated constants that aren't generic should have caused a const eval
error earlier during normalization.
2025-02-18 13:22:45 +01:00
Lukas Markeffsky
802b7abab7 clean up layout error diagnostics
- group the fluent slugs together
- reword (internal-only) "too generic" error to be more in line with
  the other errors
2025-02-18 13:22:45 +01:00
Lukas Markeffsky
d0a5bbbb8e document and test all LayoutError variants 2025-02-18 13:22:45 +01:00
Amanda Stjerna
53effa4566 eval_outlives: bail out early if both regions are in the same SCC 2025-02-18 13:02:05 +01:00
Lukas Wirth
78b739060f Merge pull request #19173 from rust-lang/revert-19122-master
Revert "pass struct fields to chalk"
2025-02-18 10:53:35 +00:00
Lukas Wirth
3457775827 Revert "pass struct fields to chalk" 2025-02-18 11:37:43 +01:00
cyrgani
758ec1d332 remove an unneeded #![feature] 2025-02-18 11:04:53 +01:00
cyrgani
a72402a0f9 add last std diagnostic items for clippy 2025-02-18 10:54:37 +01:00
lcnr
f910684616 don't ICE for alias-relate goals with error term 2025-02-18 10:30:37 +01:00
Jubilee
616fe134c2 cg_clif: Tweak formatting of global comments
Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
2025-02-18 01:29:23 -08:00
Jubilee
fa53181f42 cg_clif: Tweak formatting of global comments
Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
2025-02-18 01:29:23 -08:00
Jubilee Young
2d2de18166 compiler: Stop reexporting stuff in cg_llvm::abi
The reexports confuse tooling like rustdoc into thinking cg_llvm is
the source of key types that originate in rustc_target.
2025-02-18 00:31:29 -08:00
bors
3b022d8cee Auto merge of #133852 - x17jiri:cold_path, r=saethlin
improve cold_path()

#120370 added a new instrinsic `cold_path()` and used it to fix `likely` and `unlikely`

However, in order to limit scope, the information about cold code paths is only used in 2-target switch instructions. This is sufficient for `likely` and `unlikely`, but limits usefulness of `cold_path` for idiomatic rust. For example, code like this:

```
if let Some(x) = y { ... }
```

may generate 3-target switch:

```
switch y.discriminator:
0 => true branch
1 = > false branch
_ => unreachable
```

and therefore marking a branch as cold will have no effect.

This PR improves `cold_path()` to work with arbitrary switch instructions.

Note that for 2-target switches, we can use `llvm.expect`, but for multiple targets we need to manually emit branch weights. I checked Clang and it also emits weights in this situation. The Clang's weight calculation is more complex that this PR, which I believe is mainly because `switch` in `C/C++` can have multiple cases going to the same target.
2025-02-18 07:49:09 +00:00
Lukas Wirth
501471a621 Merge pull request #19157 from joshrotenberg/dev-guide-to-book
doc: move dev docs to manual
2025-02-18 07:00:23 +00:00
Chai T. Rex
410331c74c Add Zed to dev guide suggested workflows page 2025-02-17 23:56:38 -05:00
Peter Todd
4e4cb10b84 Add #[track_caller] to Duration Div impl
Previously the location of the divide-by-zero error condition would be
attributed to the code in the rust standard library, eg:

	thread 'main' panicked at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/time.rs:1172:31:
	divide by zero error when dividing duration by scalar

With #[track_caller] the error is correctly attributed to the callee.
2025-02-18 04:56:03 +00:00
Esteban Küber
693f7035f1 Make E0599 a structured error 2025-02-18 04:50:33 +00:00
bors
aaa8614934 Auto merge of #137162 - nnethercote:remove-Map-2, r=Zalathar
Move methods from `Map` to `TyCtxt`, part 2.

Continuing the work started in #136466.

Every method gains a `hir_` prefix, though for the ones that already have a `par_` or `try_par_` prefix I added the `hir_` after that.

r? Zalathar
2025-02-18 04:26:30 +00:00