33438 Commits

Author SHA1 Message Date
Laurențiu Nicola
85e627433b Use ubuntu-latest workers for releases 2025-02-20 09:34:19 +02:00
Laurențiu Nicola
99ea63459a
Merge pull request #19187 from BenjaminBrienen/patch-4
Update configuration.md
2025-02-20 07:06:39 +00:00
Laurențiu Nicola
1d1da786c9
Merge pull request #19186 from joshrotenberg/fix-source-link-line-anchor
doc: missed the L for the line number
2025-02-20 07:06:13 +00:00
Benjamin Brienen
92e9c76f15
Update configuration.md
fix dead links
2025-02-20 03:21:45 +01:00
Josh Rotenberg
5968782ce6 missed the L for the line number 2025-02-19 16:52:12 -08:00
Lukas Wirth
9691da7707
Merge pull request #19180 from joshrotenberg/fix-source-file-url
doc: use fully qualified url for source path
2025-02-19 06:37:01 +00:00
Chayim Refael Friedman
3028f844c5
Merge pull request #19179 from alibektas/19090_new
Ignore assists with many results if grouping not supported
2025-02-18 21:13:06 +00:00
Ali Bektas
9d5a97368a Add a check_assist_* overload and move tests under assists 2025-02-18 21:58:27 +01:00
Josh Rotenberg
ea9e179287 use fully qualified url for source path 2025-02-18 12:57:18 -08:00
Ali Bektas
fc10fe44de Fix 19090 2025-02-18 20:51:42 +01:00
Laurențiu Nicola
4a6ea31013
Merge pull request #19176 from BenjaminBrienen/patch-3
Fix dead link
2025-02-18 16:39:43 +00:00
Benjamin Brienen
e5484d9c73
Fix dead link 2025-02-18 17:22:45 +01:00
Lukas Wirth
957d3450da
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
6543225ad9
Revert "pass struct fields to chalk" 2025-02-18 11:37:43 +01:00
Lukas Wirth
e865b249e6
Merge pull request #19157 from joshrotenberg/dev-guide-to-book
doc: move dev docs to manual
2025-02-18 07:00:23 +00:00
Josh Rotenberg
f40ff2d8dc move dev docs to manual
fix formatting
2025-02-17 10:47:27 -08:00
Laurențiu Nicola
d10388096e
Merge pull request #19170 from lnicola/update-lockfile
minor: Update lockfile
2025-02-17 13:06:12 +00:00
Laurențiu Nicola
a8a329d968 Update lockfile 2025-02-17 14:50:39 +02:00
Laurențiu Nicola
cba236d9b7
Merge pull request #19169 from lnicola/sync-from-rust
minor: Sync from downstream
2025-02-17 12:30:13 +00:00
Laurențiu Nicola
b4feffa5d6 Bump rustc crates 2025-02-17 14:11:12 +02:00
Lukas Wirth
656daef4da
Merge pull request #19167 from ChayimFriedman2/fix-ref-pat
fix: Fix detection of ref patterns for path patterns
2025-02-17 11:23:18 +00:00
Laurențiu Nicola
bec6d6fbe3 Merge from rust-lang/rust 2025-02-17 13:20:12 +02:00
Laurențiu Nicola
d6ed3e9aa9 Preparing for merge from rust-lang/rust 2025-02-17 13:20:07 +02:00
Chayim Refael Friedman
eb69d3734c Fix detection of ref patterns for path patterns
I was wrong on #19127, I thought hir-def resolver is enough for them, but it turns out not because of paths like `<Enum>::Variant` and `Type::AssocThatIsEnum::Variant`.
2025-02-17 11:51:29 +02:00
Lukas Wirth
a3f937fc24
Merge pull request #19158 from PoignardAzur/expaned_pub_glob_imports
Implement expand_glob_reexport assist
2025-02-17 09:46:29 +00:00
Lukas Wirth
efdfdc448b
Merge pull request #19122 from Austaras/master
pass struct fields to chalk
2025-02-17 09:37:55 +00:00
Lukas Wirth
09db657439
Merge pull request #19127 from ChayimFriedman2/different-generic-args
feat: Refactor path lowering and serve a new path diagnostic
2025-02-17 08:30:10 +00:00
bors
65dcdc86f6 Auto merge of #137163 - matthiaskrgr:rollup-ovgfkns, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #136466 (Start removing `rustc_middle::hir::map::Map`)
 - #136671 (Overhaul `rustc_middle::limits`)
 - #136817 (Pattern Migration 2024: clean up and comment)
 - #136844 (Use `const_error!` when possible)
 - #137080 (bootstrap: add more tracing to compiler/std/llvm flows)
 - #137101 (`invalid_from_utf8[_unchecked]`: also lint inherent methods)
 - #137140 (Fix const items not being allowed to be called `r#move` or `r#static`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-17 08:10:13 +00:00
Laurențiu Nicola
84b6936e08
Merge pull request #19166 from ChayimFriedman2/runnables-order
fix: Fix sorting of runnables
2025-02-17
2025-02-17 05:58:35 +00:00
Matthias Krüger
b578c91b40
Rollup merge of #137140 - Noratrieb:const-move, r=jieyouxu,compiler-errors
Fix const items not being allowed to be called `r#move` or `r#static`

Because of an ambiguity with const closures, the parser needs to ensure that for a const item, the `const` keyword isn't followed by a `move` or `static` keyword, as that would indicate a const closure:

```rust
fn main() {
  const move // ...
}
```

This check did not take raw identifiers into account, therefore being unable to distinguish between `const move` and `const r#move`. The latter is obviously not a const closure, so it should be allowed as a const item.

This fixes the check in the parser to only treat `const ...` as a const closure if it's followed by the *proper keyword*, and not a raw identifier.

Additionally, this adds a large test that tests for all raw identifiers in all kinds of positions, including `const`, to prevent issues like this one from occurring again.

fixes #137128
2025-02-17 06:37:39 +01:00
Matthias Krüger
a708e3832a
Rollup merge of #137101 - GrigorenkoPV:str-inherent-lint, r=Urgau
`invalid_from_utf8[_unchecked]`: also lint inherent methods

Addressing https://github.com/rust-lang/rust/issues/131114#issuecomment-2646663535

Also corrected a typo: "_an_ invalid literal", not "_a_ invalid literal".
2025-02-17 06:37:38 +01:00
Matthias Krüger
2cd2c5356f
Rollup merge of #137080 - jieyouxu:more-tracing, r=onur-ozkan
bootstrap: add more tracing to compiler/std/llvm flows

- Add more tracing to compiler/std/llvm flows.
- Two drive-by nits:
    1. Take `TargetSelection` by-value for `builder.is_builder_target()`. Noticed while adding tracing; follow-up to #136767.
    2. Coalesce enzyme build logic into one branch.
- Document `COMPILER{,_FOR}` tracing targets for #96176.
- No functional changes.

### Testing

You can play with the tracing locally with:

```
$ BOOTSTRAP_TRACING=bootstrap=debug ./x build library
$ BOOTSTRAP_TRACING=bootstrap=trace ./x build library
$ BOOTSTRAP_TRACING=bootstrap=trace,COMPILER=trace,COMPILER_FOR=trace ./x build library
```

### Previews

```
$ BOOTSTRAP_TRACING=bootstrap=debug ./x build library
```

![Screenshot 2025-02-15 230824](https://github.com/user-attachments/assets/c3b02b62-d52e-4c03-a00a-da0d95618989)

```
$ BOOTSTRAP_TRACING=bootstrap=trace,COMPILER=trace,COMPILER_FOR=trace ./x build library
```

![Screenshot 2025-02-15 233859](https://github.com/user-attachments/assets/842e4ece-4c26-4191-acbb-5f93e42de4dc)

r? ``@onur-ozkan`` (or reroll)
2025-02-17 06:37:37 +01:00
Matthias Krüger
8be69f6d84
Rollup merge of #136844 - thaliaarchi:const-io-error, r=ChrisDenton
Use `const_error!` when possible

Replace usages of `io::Error::new(io::ErrorKind::Variant, "constant string")` with `io::const_error!(io::ErrorKind::Variant, "constant string")` to avoid allocations when possible. Additionally, fix `&&str` error messages in SGX and missing/misplaced trailing commas in `const_error!`.
2025-02-17 06:37:37 +01:00
Matthias Krüger
efd2c2832d
Rollup merge of #136817 - dianne:clean-and-comment-pat-migration, r=Nadrieril
Pattern Migration 2024: clean up and comment

This follows up on #136577 by moving the pattern migration logic to its own module, removing a bit of unnecessary complexity, and adding comments. Since there's quite a bit of pattern migration logic now (and potentially more in #136496), I think it makes sense to keep it separate from THIR construction, at least as much as is convenient.

r? ``@Nadrieril``
2025-02-17 06:37:36 +01:00
Matthias Krüger
cec1c9f382
Rollup merge of #136671 - nnethercote:middle-limits, r=Nadrieril
Overhaul `rustc_middle::limits`

In particular, to make `pattern_complexity` work more like other limits, which then enables some other simplifications.

r? ``@Nadrieril``
2025-02-17 06:37:35 +01:00
Chayim Refael Friedman
353616be8b Fix sorting of runnables
There were two mistakes: first, tests were sorted before test modules, and second, we re-sorted based on the name only, which cancelled the sort based on the kind.
2025-02-17 03:03:29 +02:00
Nicholas Nethercote
610f4c4046 Rename pattern_complexity attr as pattern_complexity_limit.
For consistency with `recursion_limit`, `move_size_limit`, and
`type_length_limit`.
2025-02-17 09:30:40 +11:00
Nicholas Nethercote
30bcf2a6b5 Add pattern_complexity_limit to Limits.
It's similar to the other limits, e.g. obtained via `get_limit`. So it
makes sense to handle it consistently with the other limits. We now use
`Limit`/`usize` in most places instead of `Option<usize>`, so we use
`Limit::new(usize::MAX)`/`usize::MAX` to emulate how `None` used to work.

The commit also adds `Limit::unlimited`.
2025-02-17 09:30:33 +11:00
Chayim Refael Friedman
55c04ab371 Refactor path lowering
And add a new diagnostic for non-`Fn` parenthesized generic args.

Path lowering started to look like a mess, with each function carrying additional parameters for the diagnostic callback (since paths can occur both in type and in expression/pattern position, and their diagnostic handling is different) and the segment index, for the diagnostics report. So I refactored it from stateless functions on `TyLoweringContext` into stateful struct, `PathLoweringContext`, that tracks the process of lowering a path from resolution til assoc types selection.
2025-02-16 19:44:50 +02:00
bors
1aac8756bd Auto merge of #136914 - marcoieni:arm-ubuntu-24, r=jdno
ci: use ubuntu 24 for free arm runner

try-job: aarch64-gnu
try-job: aarch64-gnu-debug
2025-02-16 15:07:36 +00:00
Lukas Wirth
2b485d7f23
Merge pull request #19137 from asuto15/highlight-extern-crate
fix: highlight `extern crate` in doc comments
2025-02-16 14:07:07 +00:00
Lukas Wirth
5ec9d9fd5f
Merge pull request #19155 from ShoyuVanilla/migrate-missing-match-arms
internal: Remove mutable syntax tree usages from `add_missing_match_arms` assist
2025-02-16 14:06:45 +00:00
Lukas Wirth
168f177fe0
Merge pull request #19163 from Veykril/push-owykwupqnzpq
fix: Stabilize sort order of `related_tests`
2025-02-16 12:33:40 +00:00
Lukas Wirth
1afbc220bc fix: Stabilize sort order of related_tests 2025-02-16 13:18:47 +01:00
Lukas Wirth
b332a053e0
Merge pull request #19161 from Veykril/push-prmuyxlnxzxo
fix: Improve sort order of runnables
2025-02-16 11:37:52 +00:00
Lukas Wirth
7128701947
Merge pull request #19160 from Veykril/push-f3601671f6a468a8cc0774253ddaddff
Improve error recovery when method-calling an assoc function
2025-02-16 11:26:02 +00:00
Lukas Wirth
e0d1fba739 fix: Stabilize sort order of runnables 2025-02-16 12:22:26 +01:00
Lukas Wirth
e6ea353d94 Improve error recovery when method-calling an assoc function 2025-02-16 11:49:48 +01:00
Lukas Wirth
fb8bc313ff
Merge pull request #19159 from Veykril/push-kwtzytsyktpv
fix: Set `RUSTUP_TOOLCHAIN` when loading sysroot workspace
2025-02-16 10:08:51 +00:00
Lukas Wirth
b9f76287c2 Set RUSTUP_TOOLCHAIN when loading sysroot workspace 2025-02-16 10:54:08 +01:00