about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-02-26Avoid implementing Debug for QueryConfigJohn Kåre Alsaker-5/+14
2023-02-26Make `rustc_query_system` take `QueryConfig` by instance.John Kåre Alsaker-126/+185
2023-02-26Auto merge of #108474 - Jarcho:clippyup, r=Manishearthbors-628/+3023
Update Clippy Seems like `@flip1995` so this is a couple days late. r? `@Manishearth`
2023-02-26Auto merge of #108253 - nnethercote:ena-rm-VarValue-methods, r=joshtriplettbors-3/+3
Upgrade to ena-0.14.1. It avoids some inlining within its `inlined_probe_value` function, which seems to result in better codegen for the very large `process_obligations` function within rustc. It might also help with reducing the bimodal perf results we see for the `keccak` and `cranelift-codegen-0.82.1` benchmarks. r? `@ghost`
2023-02-26Auto merge of #108488 - matthiaskrgr:rollup-i61epcw, r=matthiaskrgrbors-427/+492
Rollup of 9 pull requests Successful merges: - #107941 (Treat `str` as containing `[u8]` for auto trait purposes) - #108299 (Require `literal`s for some `(u)int_impl!` parameters) - #108337 (hir-analysis: make a helpful note) - #108379 (Add `ErrorGuaranteed` to `hir::{Expr,Ty}Kind::Err` variants) - #108418 (Replace parse_[sth]_expr with parse_expr_[sth] function names) - #108424 (rustc_infer: Consolidate obligation elaboration de-duplication) - #108475 (Fix `VecDeque::shrink_to` and add tests.) - #108482 (statically guarantee that current error codes are documented) - #108484 (Remove `from` lang item) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-26Rollup merge of #108484 - ↵Matthias Krüger-8/+8
Nilstrieb:˂DiagnosticItem˂FromFn˃ as From˂˂LangItemFromFn˃˃˃꞉꞉from, r=cjgillot Remove `from` lang item It was probably a leftover from the old `?` desugaring but anyways, it's unused now except for clippy, which can just use a diagnostics item.
2023-02-26Rollup merge of #108482 - Ezrashaw:force-error-docs, r=GuillaumeGomezMatthias Krüger-88/+37
statically guarantee that current error codes are documented Closes #61137 (that's right!) Pretty simple refactor (often just a change from `Result<Option<&str>>` to `Result<&str>`) r? `@GuillaumeGomez` (could you specially look at 53044158eff0d64673a6100f701c57b484232aca? I believe you wrote that in the first place, just want to make sure you're happy with the change)
2023-02-26Rollup merge of #108475 - Sp00ph:fix_shrink_to, r=thomccMatthias Krüger-55/+104
Fix `VecDeque::shrink_to` and add tests. Fixes #108453. Also adds both a specific test with the code from #108453 and an exhaustive test that checks all possible head positions, lengths and target capacities for deques with capacity 16. cc `@trinity-1686a` `@scottmcm`
2023-02-26Rollup merge of #108424 - megakorre:elaborator_refactor, r=compiler-errorsMatthias Krüger-16/+15
rustc_infer: Consolidate obligation elaboration de-duplication # Explanation The obligations `Elaborator` is doing de-duplication of obligations in 3 different locations. 1 off which has a comment. This PR consolidates the functionality and comment to a single function.
2023-02-26Rollup merge of #108418 - est31:parser_function_names, r=NilstriebMatthias Krüger-131/+131
Replace parse_[sth]_expr with parse_expr_[sth] function names This resolves an inconsistency in naming style for functions on the parser, where: * functions parsing specific kinds of items are named `parse_item_[sth]` and * functions parsing specific kinds of *expressions* are named `parse_[sth]_expr` favoring the style used by functions for items. There are multiple advantages of that style: * functions of both categories are collected in the same place in the [rustdoc output](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/parser/struct.Parser.html). * it helps with autocompletion, as you can narrow down your search for a function to those about expressions. * it mirrors rust's path syntax where less specific things come first, then it gets more specific, i.e. `std::collections::hash_map::Entry`. The disadvantage is that it doesn't "read like a sentence" any more. But I think the advantages weigh more greatly. This change was mostly application of this command: ``` sed -i -E 's/(fn |\.)parse_([[:alnum:]_]+)_expr/\1parse_expr_\2/' compiler/rustc_parse/src/parser/*.rs ``` Plus very minor fixes outside of `rustc_parse`, and an invocation of `x fmt`.
2023-02-26Rollup merge of #108379 - compiler-errors:hir-error-guaranteed, r=cjgillotMatthias Krüger-88/+111
Add `ErrorGuaranteed` to `hir::{Expr,Ty}Kind::Err` variants First step in making the `Err` variants of `ExprKind` and `TyKind` require an `ErrorGuaranteed` during parsing. Making the corresponding AST versions require `ErrorGuaranteed` is a bit harder, whereas it was pretty easy to do this for HIR, so let's do that first. The only weird thing about this PR is that `ErrorGuaranteed` is moved to `rustc_span`. This is *certainly* not the right place to put it, but `rustc_hir` cannot depend on `rustc_error` because the latter already depends on the former. Should I just pull out some of the error machinery from `rustc_error` into an even more minimal crate that `rustc_hir` can depend on? Advice would be appreciated.
2023-02-26Rollup merge of #108337 - tshepang:translatable-hir-analysis, r=cjgillotMatthias Krüger-3/+4
hir-analysis: make a helpful note
2023-02-26Rollup merge of #108299 - scottmcm:literal-bits, r=NilstriebMatthias Krüger-36/+46
Require `literal`s for some `(u)int_impl!` parameters The point of these is to be seen *lexically* in the docs, so they should always be passed as the correct literal, not as an expression. (Otherwise we could just compute `Min`/`Max` from `BITS`, for example.) r? Nilstrieb
2023-02-26Rollup merge of #107941 - compiler-errors:str-has-u8-slice-for-auto, r=lcnrMatthias Krüger-2/+36
Treat `str` as containing `[u8]` for auto trait purposes Wanted to gauge ``@rust-lang/lang`` and ``@rust-lang/types`` teams' thoughts on treating `str` as "containing" a `[u8]` slice for auto-trait purposes. ``@dtolnay`` brought this up in https://github.com/rust-lang/rust/issues/13231#issuecomment-1399386472 as a blocker for future `str` type librarification, and I think it's both a valid concern and very easy to fix. I'm interested in actually doing that `str` type librarification (#107939), but this probably should be considered in the mean time regardless of that PR. r? types for the impl, though this definitely needs an FCP.
2023-02-26Auto merge of #108375 - Zoxc:query-inline, r=cjgillotbors-22/+24
Add inlining attributes for query system functions These only have a single caller, but don't always get inlined.
2023-02-26Remove `from_fn` lang itemNilstrieb-8/+8
It was probably a leftover from the old `?` desugaring but anyways, it's unused now except for clippy, which can just use a diagnostics item.
2023-02-26refactor: improve `error-index-generator` dependencyEzra Shaw-20/+3
2023-02-26refactor: statically guarantee that current error codes are documentedEzra Shaw-68/+34
2023-02-26Disambiguate commentsMarkus Everling-2/+2
2023-02-26Fix `VecDeque::shrink_to` and add tests.Markus Everling-55/+104
This adds both a test specific to #108453 as well as an exhaustive test that goes through all possible combinations of head index, length and target capacity for a deque with capacity 16.
2023-02-26Auto merge of #108473 - matthiaskrgr:rollup-qjyae58, r=matthiaskrgrbors-514/+1394
Rollup of 8 pull requests Successful merges: - #107062 (Do some cleanup of doc/index.md) - #107890 (Lint against `Iterator::map` receiving a callable that returns `()`) - #108431 (Add regression test for #107918) - #108432 (test: drop unused deps) - #108436 (make "proc macro panicked" translatable) - #108444 (docs/test: add UI test and docs for `E0476`) - #108449 (Do not lint ineffective unstable trait impl for unresolved trait) - #108456 (Complete migrating `ast_passes` to derive diagnostics) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-25Merge commit '149392b0baa4730c68f3c3eadf5c6ed7b16b85a4' into clippyupJason Newcomb-628/+3023
2023-02-26Rollup merge of #108456 - clubby789:ast-passes-diag-migrate, r=compiler-errorsMatthias Krüger-437/+833
Complete migrating `ast_passes` to derive diagnostics cc #100717 ```@rustbot``` label +A-translation
2023-02-26Rollup merge of #108449 - fee1-dead-contrib:do_not_lint_unresolved, ↵Matthias Krüger-1/+21
r=compiler-errors Do not lint ineffective unstable trait impl for unresolved trait
2023-02-26Rollup merge of #108444 - Ezrashaw:add-test+docs-for-e0476, r=GuillaumeGomezMatthias Krüger-3/+68
docs/test: add UI test and docs for `E0476` Final undocumented error code. Not entirely sure about wording in the docs. Part of https://github.com/rust-lang/rust/issues/61137. r? ```@compiler-errors``` cc ```@compiler-errors```
2023-02-26Rollup merge of #108436 - tshepang:translatable-proc-macro-panicked, r=estebankMatthias Krüger-5/+26
make "proc macro panicked" translatable
2023-02-26Rollup merge of #108432 - klensy:test-deps, r=Mark-SimulacrumMatthias Krüger-4/+0
test: drop unused deps Looks unused. Anyway, tests should catch any breakage.
2023-02-26Rollup merge of #108431 - GuillaumeGomez:regression-test-for-107918, r=notriddleMatthias Krüger-0/+21
Add regression test for #107918 Fixes https://github.com/rust-lang/rust/issues/107918. r? ```@notriddle```
2023-02-26Rollup merge of #107890 - obeis:mapping-to-unit, r=cjgillotMatthias Krüger-1/+260
Lint against `Iterator::map` receiving a callable that returns `()` Close #106991
2023-02-26Rollup merge of #107062 - tgross35:update-doc-index, r=ehussMatthias Krüger-63/+165
Do some cleanup of doc/index.md I think a lot of people get to this landing page from `rustup doc`, and it's a bit tricky to find some useful information. I attempted to clean it up here a bit, from the commit message: - Add quick link to API docs - Add marker for external links, to help offline users - Add information about using 'cargo doc' and the playground - Clean up some of the wording - Update body & header style to match rustdoc defaults - Bump heading levels so main page header is 1, others are 2 (all were level 1 before)
2023-02-25Auto merge of #10402 - Jarcho:rustup, r=Jarchobors-155/+186
Rustup Looks like `@flip1995` is busy. r? `@ghost` changelog: None
2023-02-25Auto merge of #108464 - compiler-errors:rollup-trl1g70, r=compiler-errorsbors-65/+627
Rollup of 7 pull requests Successful merges: - #105736 (Test that the compiler/library builds with validate-mir) - #107291 ([breaking change] Remove a rustdoc back compat warning) - #107675 (Implement -Zlink-directives=yes/no) - #107848 (Split `x setup` sub-actions to CLI arguments) - #107911 (Add check for invalid #[macro_export] arguments) - #108229 ([107049] Recognise top level keys in config.toml.example) - #108333 (Make object bound candidates sound in the new trait solver) Failed merges: - #108337 (hir-analysis: make a helpful note) r? `@ghost` `@rustbot` modify labels: rollup
2023-02-25Emit `unnecessary_def_path` in source order.Jason Newcomb-11/+11
2023-02-25Fix normalization of `custom_ice_message` test.Jason Newcomb-4/+3
2023-02-25Auto merge of #10401 - samueltardieu:issue-10148, r=Alexendoobors-16/+35
Do not panic when analyzing the malformed origin of a format string Fixes #10148. This will trigger only when generating format strings while accepting weird things in a procedural macro and setting the span to something which is not a string. changelog: none
2023-02-25Do not panic when analyzing the malformed origin of a format stringSamuel Tardieu-16/+35
2023-02-25Bump nightly version -> 2023-02-25Jason Newcomb-1/+1
2023-02-25Merge branch 'master' into rustupJason Newcomb-640/+3013
2023-02-26hir-analysis: make a helpful noteTshepang Mbambo-3/+4
2023-02-25Special note for str in auto traitsMichael Goulet-1/+2
2023-02-25Treat `str` as containing `[u8]` for auto trait purposesMichael Goulet-2/+35
2023-02-25Rollup merge of #108333 - compiler-errors:new-solver-object-sound, r=lcnrMichael Goulet-3/+309
Make object bound candidates sound in the new trait solver r? `@lcnr`
2023-02-25Rollup merge of #108229 - lionellloh:issue-107049, r=Mark-SimulacrumMichael Goulet-5/+21
[107049] Recognise top level keys in config.toml.example Closes #107049 Test Plan Configure changelog-seen ``` lionellloh@lionellloh-mbp rust % ./configure --set changelog-seen=1 configure: processing command line configure: configure: changelog-seen := 1 configure: build.configure-args := ['--set', 'changelog-seen=1'] configure: configure: writing `config.toml` in current directory configure: configure: run `python /Users/lionellloh/rust/x.py --help` lionellloh@lionellloh-mbp rust % diff config.toml config.toml.example 16c16 < changelog-seen = 1 --- > changelog-seen = 2 331c331 < configure-args = ['--set', 'changelog-seen=1'] --- > #configure-args = [] 675c675 < [target.x86_64-apple-darwin] --- > [target.x86_64-unknown-linux-gnu] 809d808 < ``` Configure profile ``` lionellloh@lionellloh-mbp rust % ./configure --set profile=xyz configure: processing command line configure: configure: profile := xyz configure: build.configure-args := ['--set', 'profile=xyz'] configure: configure: writing `config.toml` in current directory configure: configure: run `python /Users/lionellloh/rust/x.py --help` lionellloh@lionellloh-mbp rust % diff config.toml config.toml.example 26c26 < profile = xyz --- > #profile = <none> 331c331 < configure-args = ['--set', 'profile=xyz'] --- > #configure-args = [] 675c675 < [target.x86_64-apple-darwin] --- > [target.x86_64-unknown-linux-gnu] 809d808 < ```
2023-02-25Rollup merge of #107911 - blyxyas:issue-107231-fix, r=compiler-errorsMichael Goulet-4/+115
Add check for invalid #[macro_export] arguments Resolves #107231 Sorry if I made something wrong, this is my first contribution to the repo.
2023-02-25Rollup merge of #107848 - clubby789:x-setup-options, r=Mark-SimulacrumMichael Goulet-21/+114
Split `x setup` sub-actions to CLI arguments Closes #107846 This adds a new `none` profile option which simply skips the `config.toml` step. It also adds `hook` and `vscode` subcommands, for installing the pre-push hook and getting `settings.json` respectively.
2023-02-25Rollup merge of #107675 - jsgf:link-directives, r=davidtwcoMichael Goulet-1/+20
Implement -Zlink-directives=yes/no `-Zlink-directives=no` will ignored `#[link]` directives while compiling a crate, so nothing is emitted into the crate's metadata. The assumption is that the build system already knows about the crate's native dependencies and can provide them at link time without these directives. This is another way to address issue # #70093, which is currently addressed by `-Zlink-native-libraries` (implemented in #70095). The latter is implemented at link time, which has the effect of ignoring `#[link]` in *every* crate. This makes it a very large hammer as it requires all native dependencies to be known to the build system to be at all usable, including those in sysroot libraries. I think this means its effectively unused, and definitely under-used. Being able to control this on a crate-by-crate basis should make it much easier to apply when needed. I'm not sure if we need both mechanisms, but we can decide that later. cc `@pcwalton` `@cramertj`
2023-02-25Rollup merge of #107291 - oli-obk:rustdoc_breaking_change, r=estebankMichael Goulet-30/+32
[breaking change] Remove a rustdoc back compat warning This warning was introduced in https://github.com/rust-lang/rust/pull/62855 for users who use `rustdoc` directly on proc macro crates (instead of using `cargo doc`) without passing `--crate-type proc-macro` (which `cargo doc` passed automatically).
2023-02-25Rollup merge of #105736 - chenyukang:yukang/add-mir-opt-level-testing, r=jyn514Michael Goulet-1/+16
Test that the compiler/library builds with validate-mir Fixes #105706
2023-02-25Make clippy happyMichael Goulet-10/+10
2023-02-25Add ErrorGuaranteed to HIR ExprKind::ErrMichael Goulet-33/+50